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 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 void DrawBorder(Graphics graphics, Rectangle rectangle) { if (graphics == null) { throw new ArgumentNullException("graphics"); } using (Pen p = baseline.CreatePen(baseline.Thickness)) { Rectangle r = System.Drawing.Rectangle.Inflate(rectangle, 1, 1); graphics.DrawRectangle(p, rectangle); } }
// 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); } } }
// 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); } } }