PdfSharp.Drawing.XGraphics.DrawLines C# (CSharp) Method

DrawLines() public method

Draws a series of line segments that connect an array of points.
public DrawLines ( XPen pen, PointF points ) : void
pen XPen
points PointF
return void
    public void DrawLines(XPen pen, PointF[] points)
    {
      if (pen == null)
        throw new ArgumentNullException("pen");
      if (points == null)
        throw new ArgumentNullException("points");
      if (points.Length < 2)
        throw new ArgumentException("points", PSSR.PointArrayAtLeast(2));

      if (this.drawGraphics)
        this.gfx.DrawLines(pen.RealizeGdiPen(), points);

      if (this.renderer != null)
        this.renderer.DrawLines(pen, MakeXPointArray(points));
    }
#endif

Same methods

XGraphics::DrawLines ( XPen pen, System points ) : void
XGraphics::DrawLines ( XPen pen, XPoint points ) : void
XGraphics::DrawLines ( XPen pen, double x, double y ) : void

Usage Example

Exemplo n.º 1
0
    /// <summary>
    /// Demonstrates the use of XGraphics.DrawLines.
    /// </summary>
    public override void RenderPage(XGraphics gfx)
    {
      //base.RenderPage(gfx);

      XPoint[] points = new XPoint[]
      {
        new XPoint(50, 100),
        new XPoint(450, 120),
        new XPoint(550, 300),
        new XPoint(150, 380),
        new XPoint(120, 190),
      };

      gfx.DrawLines(properties.Pen2.Pen, points);
    }
All Usage Examples Of PdfSharp.Drawing.XGraphics::DrawLines