Пример #1
0
        private static IGraphics CreateSurface(byte[] buffer, int offset, int count, BitmapImageType type)
        {
            if (!Graphics.HasDrawing())
            {
                throw new NotSupportedException();
            }

            return(new Internal.Bitmap(buffer, offset, count, type));
        }
Пример #2
0
        private static IGraphics CreateSurface(int width, int height)
        {
            if (!Graphics.HasDrawing())
            {
                return(new ManagedGraphics(new BufferDrawTargetRgb565(width, height)));
            }

            return(new Internal.Bitmap(width, height));
        }
Пример #3
0
        private static IGraphics CreateSurface(byte[] buffer)
        {
            if (!Graphics.HasDrawing())
            {
                throw new NotSupportedException();
            }

            return(new Internal.Bitmap(buffer, Internal.Bitmap.BitmapImageType.Bmp));
        }
Пример #4
0
        private static IGraphics CreateSurface(int width, int height)
        {
            if (!Graphics.HasDrawing())
            {
                throw new ArgumentException("Not supported");
            }

            return(new Internal.Bitmap(width, height));
        }