public GdiPlusCanvasPainter(System.Drawing.Bitmap gfxBmp) { _width = 800; // gfxBmp.Width; _height = 600; // gfxBmp.Height; _gfxBmp = gfxBmp; _gfx = System.Drawing.Graphics.FromImage(_gfxBmp); //credit: //http://stackoverflow.com/questions/1485745/flip-coordinates-when-drawing-to-control _gfx.ScaleTransform(1.0F, -1.0F); // Flip the Y-Axis _gfx.TranslateTransform(0.0F, -(float)Height); // Translate the drawing area accordingly _currentFillBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); _currentPen = new System.Drawing.Pen(System.Drawing.Color.Black); // _bmpStore = new BufferBitmapStore(_width, _height); }
public GdiPlusCanvasPainter(System.Drawing.Bitmap gfxBmp) { _width = 800;// gfxBmp.Width; _height = 600;// gfxBmp.Height; _gfxBmp = gfxBmp; _gfx = System.Drawing.Graphics.FromImage(_gfxBmp); //credit: //http://stackoverflow.com/questions/1485745/flip-coordinates-when-drawing-to-control _gfx.ScaleTransform(1.0F, -1.0F);// Flip the Y-Axis _gfx.TranslateTransform(0.0F, -(float)Height);// Translate the drawing area accordingly _currentFillBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); _currentPen = new System.Drawing.Pen(System.Drawing.Color.Black); // _bmpStore = new BufferBitmapStore(_width, _height); }