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

DrawBezier() public method

Draws a Bézier spline defined by four points.
public DrawBezier ( PdfSharp.Drawing.XPen pen, PointF pt1, PointF pt2, PointF pt3, PointF pt4 ) : void
pen PdfSharp.Drawing.XPen
pt1 System.Drawing.PointF
pt2 System.Drawing.PointF
pt3 System.Drawing.PointF
pt4 System.Drawing.PointF
return void
    public void DrawBezier(XPen pen, PointF pt1, PointF pt2, PointF pt3, PointF pt4)
    {
      DrawBezier(pen, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y);
    }
#endif

Same methods

XGraphics::DrawBezier ( PdfSharp.Drawing.XPen pen, System pt1, System pt2, System pt3, System pt4 ) : void
XGraphics::DrawBezier ( PdfSharp.Drawing.XPen pen, PdfSharp.Drawing.XPoint pt1, PdfSharp.Drawing.XPoint pt2, PdfSharp.Drawing.XPoint pt3, PdfSharp.Drawing.XPoint pt4 ) : void
XGraphics::DrawBezier ( XPen pen, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4 ) : void

Usage Example

コード例 #1
0
    /// <summary>
    /// Demonstrates the use of XGraphics.DrawBezier.
    /// </summary>
    public override void RenderPage(XGraphics gfx)
    {
      base.RenderPage(gfx);

      gfx.DrawEllipse(XBrushes.Red, MakeRect(50, 100));
      gfx.DrawEllipse(XBrushes.Red, MakeRect(450, 100));
      gfx.DrawEllipse(XBrushes.Red, MakeRect(550, 190));
      gfx.DrawEllipse(XBrushes.Red, MakeRect(150, 300));

      gfx.DrawLine(XPens.Red, 50, 100, 450, 100);
      gfx.DrawLine(XPens.Red, 550, 190, 150, 300);

      gfx.DrawBezier(properties.Pen2.Pen, 50, 100, 450, 100, 550, 190, 150, 300);

      //XPoint[] points = new XPoint[1 + 3 * 3];
      //Random rnd = new Random();
      //for (int idx = 0; idx < points.Length; idx++)
      //{
      //  points[idx].X = 100 + rnd.Next(400);
      //  points[idx].Y = 200 + rnd.Next(700);
      //}
      //gfx.DrawBeziers(properties.Pen1.Pen, points);
    }
All Usage Examples Of PdfSharp.Drawing.XGraphics::DrawBezier