AggRenderSurface CreateAggRenderSurface(int width, int height, int bitDepth) { if (width > 0 && height > 0) { if (bitDepth != 32) { throw new NotImplementedException("Don't support this bit depth yet."); } else { var actualImage = new ActualImage(width, height); bitmapBackBuffer.Initialize(width, height, bitDepth, actualImage); return(new AggRenderSurface(actualImage)); } } throw new NotSupportedException(); }
ImageGraphics2D Initialize(int width, int height, int bitDepth) { if (width > 0 && height > 0) { if (bitDepth != 32) { throw new NotImplementedException("Don't support this bit depth yet."); } else { var actualImage = new ActualImage(width, height, PixelFormat.ARGB32); bitmapBackBuffer.Initialize(width, height, bitDepth, actualImage); return(Graphics2D.CreateFromImage(actualImage)); } } throw new NotSupportedException(); }