public FloodFillDemo() { // _magicWandConfigs = new MagicWandConfigGroup(); BackgroundColor = Color.White; _defaultImg = new MemBitmap(400, 300); AggPainter p = AggPainter.Create(_defaultImg); p.Clear(Color.White); p.FillColor = Color.Black; p.FillEllipse(20, 20, 30, 30); for (int i = 0; i < 20; i++) { p.StrokeColor = Color.Black; p.DrawEllipse(i * 10, i * 10, 20, 20); } // this.PixelSize = 32; this.Gamma = 1; _tolerance = 30; _floodFill = new ColorBucket(Color.Red, _tolerance); _magicWand = new MagicWand(_tolerance); // //_lionPng = MemBitmapExtensions.LoadBitmap("../Data/lion1_v2_2.png"); //_lionPng = MemBitmapExtensions.LoadBitmap("../Data/lion1_v2_4_1.png"); _lionPng = MemBitmapExt.LoadBitmap("../Data/lion1.png"); //_lionPng = MemBitmapExtensions.LoadBitmap("../Data/lion_1_v3_2.png"); //_lionPng = MemBitmapExtensions.LoadBitmap("../Data/glyph_a.png"); _starsPng = MemBitmapExt.LoadBitmap("../Data/stars.png"); _test_glyphs = MemBitmapExt.LoadBitmap("../Data/test_glyphs.png"); _rect01 = MemBitmapExt.LoadBitmap("../Data/rect01.png"); //_v_shape = MemBitmapExtensions.LoadBitmap("../Data/shape_v.png"); //_v_shape = MemBitmapExtensions.LoadBitmap("../Data/shape_v3.png"); _bmpToFillOn = _defaultImg; OutlineReconstruction = true; WithOutlineSimplifier = true; }
public FloodFillDemo() { // BackgroundColor = Color.White; imageToFillOn = new ActualImage(400, 300, PixelFormat.ARGB32); AggRenderSurface aggsx = new AggRenderSurface(imageToFillOn); AggPainter p = new AggPainter(aggsx); p.Clear(Color.White); p.FillColor = Color.Black; p.FillEllipse(20, 20, 30, 30); for (int i = 0; i < 20; i++) { p.StrokeColor = Color.Black; p.DrawEllipse(i * 10, i * 10, 20, 20); } // this.PixelSize = 32; this.Gamma = 1; }