// http://www.mikesdotnetting.com/Article/88/iTextSharp-Drawing-shapes-and-Graphics public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte, BaseLine line, IBaseStyleDecorator style, iTextSharp.text.Rectangle rectangle) { if (contentByte == null) { throw new ArgumentNullException("contentByte"); } if (style == null) { throw new ArgumentNullException("style"); } if (rectangle == null) { throw new ArgumentNullException("rectangle"); } if (line == null) { BaseShape.FillBackGround(contentByte,style,rectangle); } else { BaseShape.SetupShape(contentByte,style); contentByte.SetLineWidth(UnitConverter.FromPixel(line.Thickness).Point); contentByte.RoundRectangle(rectangle.Left, rectangle.Bottom, rectangle.Width, rectangle.Height, CornerRadius); BaseShape.FinishShape(contentByte); } }
public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte, BaseLine line, IBaseStyleDecorator style, iTextSharp.text.Rectangle rectangle) { if (contentByte == null) { throw new ArgumentNullException("contentByte"); } if (style == null) { throw new ArgumentNullException("style"); } if (rectangle == null) { throw new ArgumentNullException("rectangle"); } if ((line == null)||(line.Thickness < 1)) { BaseShape.FillBackGround(contentByte,style,rectangle); } else if ((style.BackColor == GlobalValues.DefaultBackColor)) { BaseShape.SetupShape(contentByte,style); contentByte.SetLineWidth(UnitConverter.FromPixel(line.Thickness).Point); contentByte.MoveTo(rectangle.Left ,rectangle.Top ); contentByte.LineTo(rectangle.Left, rectangle.Top - rectangle.Height); contentByte.LineTo(rectangle.Left + rectangle.Width, rectangle.Top - rectangle.Height); contentByte.LineTo(rectangle.Left + rectangle.Width, rectangle.Top); contentByte.LineTo(rectangle.Left, rectangle.Top); BaseShape.FinishShape(contentByte); } else { BaseShape.FillBackGround(contentByte,style,rectangle); } }
public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte, BaseLine line, IBaseStyleDecorator style, iTextSharp.text.Rectangle rectangle) { throw new NotImplementedException(); }
public void DrawShape(PdfContentByte cb, BaseLine line, IBaseStyleDecorator style, iTextSharp.text.Rectangle r) { this.CreatePath(cb, line, style, r); }
public void DrawShape(PdfContentByte cb, BaseLine line, IBaseStyleDecorator style, Point from, Point to) { this.CreatePath(cb, line, style, from, to); }
public override void Render(ReportPageEventArgs rpea) { if (rpea == null) { throw new ArgumentNullException("rpea"); } base.Render(rpea); Rectangle rectangle = base.DisplayRectangle; StandardPrinter.FillBackground(rpea.PrintPageEventArgs.Graphics, this.BaseStyleDecorator); BaseLine line = new BaseLine(base.ForeColor, base.DashStyle, base.Thickness, LineCap.Round, LineCap.Round, DashCap.Round); using (Pen pen = line.CreatePen(line.Thickness)){ if (pen != null) { shape.CornerRadius = this.CornerRadius; GraphicsPath gfxPath = shape.CreatePath(rectangle); rpea.PrintPageEventArgs.Graphics.FillPath(new SolidBrush(BackColor), gfxPath);; rpea.PrintPageEventArgs.Graphics.DrawPath(pen, gfxPath); } } }
public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte, BaseLine line, IBaseStyleDecorator style, Point from,Point to) { throw new NotImplementedException(); }
// http://www.mikesdotnetting.com/Article/88/iTextSharp-Drawing-shapes-and-Graphics public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte, BaseLine line, IBaseStyleDecorator style, iTextSharp.text.Rectangle rectangle) { if (contentByte == null) { throw new ArgumentNullException("contentByte"); } if (style == null) { throw new ArgumentNullException("style"); } if (rectangle == null) { throw new ArgumentNullException("rectangle"); } if (line == null) { BaseShape.FillBackGround(contentByte, style, rectangle); } else { BaseShape.SetupShape(contentByte, style); contentByte.SetLineWidth(UnitConverter.FromPixel(line.Thickness).Point); contentByte.RoundRectangle(rectangle.Left, rectangle.Bottom, rectangle.Width, rectangle.Height, CornerRadius); BaseShape.FinishShape(contentByte); } }
public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte, BaseLine line, IBaseStyleDecorator style, iTextSharp.text.Rectangle rectangle) { if (contentByte == null) { throw new ArgumentNullException("contentByte"); } if (rectangle == null) { throw new ArgumentNullException("rectangle"); } if ((line == null) || (line.Thickness < 1)) { BaseShape.FillBackGround(contentByte, style, rectangle); } else if ((style.BackColor == GlobalValues.DefaultBackColor)) { BaseShape.SetupShape(contentByte, style); contentByte.SetLineWidth(UnitConverter.FromPixel(line.Thickness).Point); contentByte.Ellipse(rectangle.Left, rectangle.Top, rectangle.Left + rectangle.Width, rectangle.Top - rectangle.Height); BaseShape.FinishShape(contentByte); } else { BaseShape.FillBackGround(contentByte, style, rectangle); } }
public override void Draw(Graphics graphics) { if (graphics == null) { throw new ArgumentNullException("graphics"); } Rectangle rect = new Rectangle(this.ClientRectangle.Left,this.ClientRectangle.Top, this.ClientRectangle.Right -1, this.ClientRectangle.Bottom -1); // backgroundShape.FillShape(graphics, // new SolidFillPattern(this.BackColor), // rect); Border b = new Border(new BaseLine (this.ForeColor,System.Drawing.Drawing2D.DashStyle.Solid,1)); // DrawFrame(graphics,b); BaseLine line = new BaseLine(base.ForeColor,DashStyle,Thickness,LineCap.Round,LineCap.Round,DashCap.Round); using (Pen pen = line.CreatePen(line.Thickness)){ shape.CornerRadius = this.CornerRadius; GraphicsPath path1 = shape.CreatePath(rect); graphics.DrawPath(pen, path1); } // shape.DrawShape (graphics, // this.Baseline(), // rect); }
public Border(BaseLine baseLine) { this.baseline = baseLine; this.left = baseLine; this.top = baseLine; this.right = baseLine; this.bottom = baseLine; }
public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte, BaseLine line, IBaseStyleDecorator style, Point from,Point to) { if (contentByte == null) { throw new ArgumentNullException("contentByte"); } BaseShape.SetupShape(contentByte,style); contentByte.SetLineWidth(UnitConverter.FromPixel(line.Thickness).Point); contentByte.MoveTo(from.X,from.Y ); contentByte.LineTo(to.X,to.Y); BaseShape.FinishShape(contentByte); }
// Draw a Line public void DrawShape(Graphics graphics, BaseLine line, Point from,Point to) { if (graphics == null) { throw new ArgumentNullException("graphics"); } if (line == null) { throw new ArgumentNullException("line"); } using (Pen pen = line.CreatePen(line.Thickness)){ if (pen != null){ GraphicsPath path1 = this.CreatePath(from,to); graphics.DrawPath(pen, path1); } } }
public override void CreatePath(iTextSharp.text.pdf.PdfContentByte contentByte, BaseLine line, IBaseStyleDecorator style, Point from, Point to) { if (contentByte == null) { throw new ArgumentNullException("contentByte"); } BaseShape.SetupShape(contentByte, style); contentByte.SetLineWidth(UnitConverter.FromPixel(line.Thickness).Point); contentByte.MoveTo(from.X, from.Y); contentByte.LineTo(to.X, to.Y); BaseShape.FinishShape(contentByte); }
// Draw a Line public void DrawShape(Graphics graphics, BaseLine line, Point from, Point to) { if (graphics == null) { throw new ArgumentNullException("graphics"); } if (line == null) { throw new ArgumentNullException("line"); } using (Pen pen = line.CreatePen(line.Thickness)){ if (pen != null) { GraphicsPath path1 = this.CreatePath(from, to); graphics.DrawPath(pen, path1); } } }
public virtual void DrawShape(Graphics graphics, BaseLine line, Rectangle rectangle) { if (graphics == null) { throw new ArgumentNullException("graphics"); } if (line == null) { throw new ArgumentNullException("line"); } using (Pen pen = line.CreatePen(line.Thickness)){ if (pen != null) { GraphicsPath path1 = this.CreatePath(rectangle); graphics.DrawPath(pen, path1); } } }
public override void Render(ReportPageEventArgs rpea) { if (rpea == null) { throw new ArgumentNullException("rpea"); } base.Render(rpea); Rectangle rectangle = base.DisplayRectangle; StandardPrinter.FillBackground(rpea.PrintPageEventArgs.Graphics,this.BaseStyleDecorator); BaseLine line = new BaseLine(base.ForeColor,base.DashStyle,base.Thickness,LineCap.Round,LineCap.Round,DashCap.Round); using (Pen pen = line.CreatePen(line.Thickness)){ if (pen != null) { shape.CornerRadius = this.CornerRadius; GraphicsPath gfxPath = shape.CreatePath(rectangle); rpea.PrintPageEventArgs.Graphics.FillPath(new SolidBrush(BackColor), gfxPath);; rpea.PrintPageEventArgs.Graphics.DrawPath(pen, gfxPath); } } }
public virtual void DrawShape(Graphics graphics, BaseLine line, Rectangle rectangle) { if (graphics == null) { throw new ArgumentNullException("graphics"); } if (line == null) { throw new ArgumentNullException("line"); } using (Pen pen = line.CreatePen(line.Thickness)){ if (pen != null){ GraphicsPath path1 = this.CreatePath(rectangle); graphics.DrawPath(pen, path1); } } }
public void DrawShape(PdfContentByte cb, BaseLine line, IBaseStyleDecorator style, Point from,Point to) { this.CreatePath(cb,line,style,from,to); }
public override void DrawShape(Graphics graphics, BaseLine line, Rectangle rectangle) { base.DrawShape(graphics, line, rectangle); }
public abstract void CreatePath(PdfContentByte contentByte, BaseLine line, IBaseStyleDecorator style, Point from, Point to);
public abstract void CreatePath(PdfContentByte contentByte, BaseLine line, IBaseStyleDecorator style, iTextSharp.text.Rectangle rectangle);
public void DrawShape(PdfContentByte cb, BaseLine line, IBaseStyleDecorator style, iTextSharp.text.Rectangle r) { this.CreatePath(cb,line,style,r); }
public abstract void CreatePath (PdfContentByte contentByte, BaseLine line, IBaseStyleDecorator style, iTextSharp.text.Rectangle rectangle);
public abstract void CreatePath (PdfContentByte contentByte, BaseLine line, IBaseStyleDecorator style, Point from, Point to);