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)); }
private static IGraphics CreateSurface(int width, int height) { if (!Graphics.HasDrawing()) { return(new ManagedGraphics(new BufferDrawTargetRgb565(width, height))); } return(new Internal.Bitmap(width, height)); }
private static IGraphics CreateSurface(byte[] buffer) { if (!Graphics.HasDrawing()) { throw new NotSupportedException(); } return(new Internal.Bitmap(buffer, Internal.Bitmap.BitmapImageType.Bmp)); }
private static IGraphics CreateSurface(int width, int height) { if (!Graphics.HasDrawing()) { throw new ArgumentException("Not supported"); } return(new Internal.Bitmap(width, height)); }