public static PDFPen Create(PDFBrush brush, PDFUnit width) { if (brush.FillStyle == FillType.Solid) { PDFSolidBrush solid = (PDFSolidBrush)brush; PDFPen pen = Create(solid.Color, width); pen.Opacity = solid.Opacity; return(pen); } else { return(new PDFNoPen()); } }
public void FillPath(PDFBrush brush, PDFPoint location, PDFGraphicsPath path) { if (null == path) { throw new ArgumentNullException("path"); } if (null == brush) { throw new ArgumentNullException("brush"); } this.SaveGraphicsState(); this.OutputPath(brush, null, location, path); this.RestoreGraphicsState(); }
public void FillElipse(PDFBrush brush, PDFUnit x, PDFUnit y, PDFUnit width, PDFUnit height) { if (brush == null) { throw new ArgumentNullException("brush"); } PDFRect bounds = new PDFRect(x, y, width, height); this.SaveGraphicsState(); brush.SetUpGraphics(this, bounds); OutputElipsePoints(x, y, width, height); this.RenderFillPathOp(); brush.ReleaseGraphics(this, bounds); this.RestoreGraphicsState(); }
private void OutputPath(PDFBrush brush, PDFPen pen, PDFPoint location, PDFGraphicsPath path) { PDFRect bounds = new PDFRect(path.Bounds.X + location.X, path.Bounds.Y + location.Y, path.Bounds.Width, path.Bounds.Height); if (null != brush) { brush.SetUpGraphics(this, bounds); } if (null != pen) { pen.SetUpGraphics(this, bounds); } PDFPoint cursor = PDFPoint.Empty; foreach (Path p in path.SubPaths) { RenderPathData(location, p, ref cursor); } if (null != brush && null != pen) { this.RenderFillAndStrokePathOp(path.Mode == GraphicFillMode.EvenOdd); } else if (null != brush) { this.RenderFillPathOp(path.Mode == GraphicFillMode.EvenOdd); } else if (null != pen) { this.RenderStrokePathOp(); } if (null != brush) { brush.ReleaseGraphics(this, bounds); } if (null != pen) { pen.ReleaseGraphics(this, bounds); } }
public void FillRoundRectangle(PDFBrush brush, PDFUnit x, PDFUnit y, PDFUnit width, PDFUnit height, Sides sides, PDFUnit cornerRadius) { if (brush == null) { throw new ArgumentNullException("brush"); } if (null != brush.UnderBrush) { this.FillRoundRectangle(brush.UnderBrush, x, y, width, height, sides, cornerRadius); } PDFRect bounds = new PDFRect(x, y, width, height); this.SaveGraphicsState(); brush.SetUpGraphics(this, bounds); this.DoOutputRoundRectangleWithSidesFill(x, y, width, height, cornerRadius, sides); this.RenderFillPathOp(); brush.ReleaseGraphics(this, bounds); this.RestoreGraphicsState(); }
public void FillRoundRectangle(PDFBrush brush, PDFRect rect, PDFUnit cornerRadius) { if (brush == null) { throw new ArgumentNullException("brush"); } if (null != brush.UnderBrush) { this.FillRoundRectangle(brush.UnderBrush, rect, cornerRadius); } this.SaveGraphicsState(); //PDFRect bounds = new PDFRect(x, y, width, height); brush.SetUpGraphics(this, rect); this.DoOutputRoundRectangle(rect.X, rect.Y, rect.Width, rect.Height, cornerRadius); this.RenderFillPathOp(); brush.ReleaseGraphics(this, rect); this.RestoreGraphicsState(); }
public void FillRectangle(PDFBrush brush, PDFUnit x, PDFUnit y, PDFUnit width, PDFUnit height) { if (brush == null) { throw new ArgumentNullException("brush"); } if (null != brush.UnderBrush) { FillRectangle(brush.UnderBrush, x, y, width, height); } this.SaveGraphicsState(); PDFRect bounds = new PDFRect(x, y, width, height); brush.SetUpGraphics(this, bounds); this.RenderRectangle(x, y, width, height); this.RenderFillPathOp(); brush.ReleaseGraphics(this, bounds); this.RestoreGraphicsState(); }
public void FillRectangle(PDFBrush brush, PDFRect rect) { this.FillRectangle(brush, rect.X, rect.Y, rect.Width, rect.Height); }
public void FillRoundRectangle(PDFBrush brush, PDFPoint pos, PDFSize size, Sides sides, PDFUnit cornerRadius) { this.FillRoundRectangle(brush, pos.X, pos.Y, size.Width, size.Height, sides, cornerRadius); }
public void FillRoundRectangle(PDFBrush brush, PDFRect rect, Sides sides, PDFUnit cornerRadius) { this.FillRoundRectangle(brush, rect.X, rect.Y, rect.Width, rect.Height, sides, cornerRadius); }
public void FillRoundRectangle(PDFBrush brush, PDFPoint pos, PDFSize size, PDFUnit cornerRadius) { PDFRect r = new PDFRect(pos, size); this.FillRoundRectangle(brush, r, cornerRadius); }
public void FillRoundRectangle(PDFBrush brush, PDFUnit x, PDFUnit y, PDFUnit width, PDFUnit height, PDFUnit cornerRadius) { PDFRect rect = new PDFRect(x, y, width, height); this.FillRoundRectangle(brush, rect, cornerRadius); }
public void FillRectangle(PDFBrush brush, PDFPoint location, PDFSize size) { this.FillRectangle(brush, location.X, location.Y, size.Width, size.Height); }
public void FillQuadrants(PDFBrush brush, PDFRect rect, Quadrants sides) { this.FillQuadrants(brush, rect.Location, rect.Size, sides); }
public void FillQuadrants(PDFBrush brush, PDFPoint pos, PDFSize size, Quadrants sides) { this.FillQuadrants(brush, pos.X, pos.Y, size.Width, size.Height, sides); }
public void FillElipse(PDFBrush brush, PDFPoint pos, PDFSize size) { this.FillElipse(brush, pos.X, pos.Y, size.Width, size.Height); }
public void FillElipse(PDFBrush brush, PDFRect rect) { this.FillElipse(brush, rect.Location, rect.Size); }