public void SetClip(UG.GraphicsPath path, System.Drawing.Drawing2D.CombineMode mode) { // to mask we make a mask bitmap and draw the shapes to it as an alpha mask. RGBA_Bytes shapeMaskColor; RGBA_Bytes backgroundMaskColor; switch (mode) { case System.Drawing.Drawing2D.CombineMode.Exclude: shapeMaskColor = new RGBA_Bytes(0, 0, 0, 255); backgroundMaskColor = new RGBA_Bytes(255, 255, 255, 255); break; default: throw new NotImplementedException(); } // setup the clip buffer var bounds = aggGc.DestImage.GetBounds(); _clipBuffer = new ImageBuffer(bounds.Width, bounds.Height, 8, new blender_gray(1)); var clipGC = _clipBuffer.NewGraphics2D(); clipGC.Clear(backgroundMaskColor); clipGC.SetTransform(aggGc.GetTransform()); // apply our transform to the clipper clipGC.Render(path.path, shapeMaskColor); // ImageClippingProxy clippingProxy = new ImageClippingProxy (_clipBuffer); //clippingProxy.clear (backgroundMaskColor); // render our shapes to the clipbuf // ScanlineCachePacked8 sl = new ScanlineCachePacked8 (); // ScanlineRenderer scanlineRenderer = new ScanlineRenderer (); // ScanlineRasterizer rasterizer = new ScanlineRasterizer (); // rasterizer.add_path (path.path); // scanlineRenderer.render_scanlines_aa_solid (clippingProxy, rasterizer, sl, shapeMaskColor); // DEBUG_saveImageBuffer(_clipBuffer); }
public void SetClip(Region region, System.Drawing.Drawing2D.CombineMode combineMode) { g.SetClip(region, combineMode); }
public void SetClip(RectangleF rect, System.Drawing.Drawing2D.CombineMode combineMode) { g.SetClip(rect, combineMode); }
public void SetClip(System.Drawing.Drawing2D.GraphicsPath path, System.Drawing.Drawing2D.CombineMode combineMode) { g.SetClip(path, combineMode); }
public void SetClip(Graphics g, System.Drawing.Drawing2D.CombineMode combineMode) { throw new NotImplementedException(); }
public void SetClip(System.Drawing.Region region, System.Drawing.Drawing2D.CombineMode combineMode = System.Drawing.Drawing2D.CombineMode.Replace) { _transformator.Clip = region; }
public void SetClip(Rectangle rect, System.Drawing.Drawing2D.CombineMode combineMode) { }
public void SetClip(Graphics g, System.Drawing.Drawing2D.CombineMode combineMode) { }