public AggCanvasPainter(ImageGraphics2D graphic2d) { this.gx = graphic2d; this.sclineRas = gx.ScanlineRasterizer; this.stroke = new Stroke(1);//default this.scline = graphic2d.ScanlinePacked8; this.sclineRasToBmp = graphic2d.ScanlineRasToDestBitmap; }
private void button1_Click(object sender, EventArgs e) { if (g == null) { destImg = new ActualImage(400, 300, PixelFarm.Agg.Image.PixelFormat.ARGB32); imgGfx2d = new ImageGraphics2D(destImg, null); //no platform p = new AggCanvasPainter(imgGfx2d); winBmp = new Bitmap(400, 300, System.Drawing.Imaging.PixelFormat.Format32bppArgb); g = this.CreateGraphics(); } // ReadAndRender(@"..\..\segoeui.ttf"); ReadAndRender(@"..\..\tahoma.ttf"); //ReadAndRender(@"..\..\CompositeMS.ttf"); }