Class PdfBezierCurve
Represents Bezier curve shape.
Inheritance
Inherited Members
Namespace: Syncfusion.Pdf.Graphics
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public class PdfBezierCurve : PdfDrawElement
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Create new instance of PdfBezierCurve.
PdfBezierCurve bezier = new PdfBezierCurve(0, 0, 100, 50, 50, 50, 100, 100);
//Draw the bezier curve to PDF page.
bezier.Draw(page, new PointF(300, 200));
//Save the PDF docment.
document.Save("output.pdf");
//Close the PDF document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Add a new PDF page.
Dim page As PdfPage = document.Pages.Add()
'Create new instance of PdfBezierCurve.
Dim bezier As New PdfBezierCurve(0, 0, 100, 50, 50, 50, 100, 100)
'Draw the bezier curve to PDF page.
bezier.Draw(page, New PointF(300, 200))
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
Constructors
PdfBezierCurve()
Initializes a new instance of the PdfBezierCurve class.
Declaration
protected PdfBezierCurve()
PdfBezierCurve(PointF, PointF, PointF, PointF)
Initializes a new instance of the PdfBezierCurve class with the specified PointF structure
Declaration
public PdfBezierCurve(PointF startPoint, PointF firstControlPoint, PointF secondControlPoint, PointF endPoint)
Parameters
Type | Name | Description |
---|---|---|
PointF | startPoint | PointF structure that represents the starting point of the curve. |
PointF | firstControlPoint | PointF structure that represents the first control point for the curve. |
PointF | secondControlPoint | PointF structure that represents the second control point for the curve. |
PointF | endPoint | PointF structure that represents the ending point of the curve. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Create new instance of PdfBezierCurve.
PdfBezierCurve bezier = new PdfBezierCurve(new PointF(0, 0), new PointF(100, 50), new PointF(50, 50), new PointF(100, 100));
//Draw the bezier curve to PDF page.
bezier.Draw(page, new PointF(300, 200));
//Save the PDF docment.
document.Save("output.pdf");
//Close the PDF document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Add a new PDF page.
Dim page As PdfPage = document.Pages.Add()
'Create new instance of PdfBezierCurve.
Dim bezier As New PdfBezierCurve(New PointF(0, 0), New PointF(100, 50), New PointF(50, 50), New PointF(100, 100))
'Draw the bezier curve to PDF page.
bezier.Draw(page, New PointF(300, 200))
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfBezierCurve(PdfPen, PointF, PointF, PointF, PointF)
Initializes a new instance of the PdfBezierCurve class with the specified pen and PointF structure.
Declaration
public PdfBezierCurve(PdfPen pen, PointF startPoint, PointF firstControlPoint, PointF secondControlPoint, PointF endPoint)
Parameters
Type | Name | Description |
---|---|---|
PdfPen | pen | Pen that determines the color, width, and style of the curve. |
PointF | startPoint | PointF structure that represents the starting point of the curve. |
PointF | firstControlPoint | PointF structure that represents the first control point for the curve. |
PointF | secondControlPoint | PointF structure that represents the second control point for the curve. |
PointF | endPoint | PointF structure that represents the ending point of the curve. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Create new PDF Pen.
PdfPen pen = new PdfPen(Color.Red);
//Create new instance of PdfBezierCurve.
PdfBezierCurve bezier = new PdfBezierCurve(pen, new PointF(0, 0), new PointF(100, 50), new PointF(50, 50), new PointF(100, 100));
//Draw the bezier curve to PDF page.
bezier.Draw(page, new PointF(300, 200));
//Save the PDF docment.
document.Save("output.pdf");
//Close the PDF document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Add a new PDF page.
Dim page As PdfPage = document.Pages.Add()
'Create new PDF Pen.
Dim pen As New PdfPen(Color.Red)
'Create new instance of PdfBezierCurve.
Dim bezier As New PdfBezierCurve(pen, New PointF(0, 0), New PointF(100, 50), New PointF(50, 50), New PointF(100, 100))
'Draw the bezier curve to PDF page.
bezier.Draw(page, New PointF(300, 200))
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfBezierCurve(PdfPen, Single, Single, Single, Single, Single, Single, Single, Single)
Initializes a new instance of the PdfBezierCurve class with the specified pair of coordinates and control points
Declaration
public PdfBezierCurve(PdfPen pen, float startPointX, float startPointY, float firstControlPointX, float firstControlPointY, float secondControlPointX, float secondControlPointY, float endPointX, float endPointY)
Parameters
Type | Name | Description |
---|---|---|
PdfPen | pen | Pen that determines the color, width, and style of the curve. |
System.Single | startPointX | The x-coordinate of the starting point of the curve. |
System.Single | startPointY | The y-coordinate of the starting point of the curve. |
System.Single | firstControlPointX | The x-coordinate of the first control point of the curve. |
System.Single | firstControlPointY | The y-coordinate of the first control point of the curve. |
System.Single | secondControlPointX | The x-coordinate of the second control point of the curve. |
System.Single | secondControlPointY | The y-coordinate of the second control point of the curve. |
System.Single | endPointX | The x-coordinate of the ending point of the curve. |
System.Single | endPointY | The y-coordinate of the ending point of the curve. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Create new PDF Pen.
PdfPen pen = new PdfPen(Color.Red);
//Create new instance of PdfBezierCurve.
PdfBezierCurve bezier = new PdfBezierCurve(pen, 0, 0, 100, 50, 50, 50, 100, 100);
//Draw the bezier curve to PDF page.
bezier.Draw(page, new PointF(300, 200));
//Save the PDF docment.
document.Save("output.pdf");
//Close the PDF document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Add a new PDF page.
Dim page As PdfPage = document.Pages.Add()
'Create new PDF Pen.
Dim pen As New PdfPen(Color.Red)
'Create new instance of PdfBezierCurve.
Dim bezier As New PdfBezierCurve(pen, 0, 0, 100, 50, 50, 50, 100, 100)
'Draw the bezier curve to PDF page.
bezier.Draw(page, New PointF(300, 200))
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfBezierCurve(Single, Single, Single, Single, Single, Single, Single, Single)
Initializes a new instance of the PdfBezierCurve class with the specified pair of coordinates and control points
Declaration
public PdfBezierCurve(float startPointX, float startPointY, float firstControlPointX, float firstControlPointY, float secondControlPointX, float secondControlPointY, float endPointX, float endPointY)
Parameters
Type | Name | Description |
---|---|---|
System.Single | startPointX | The x-coordinate of the starting point of the curve. |
System.Single | startPointY | The y-coordinate of the starting point of the curve. |
System.Single | firstControlPointX | The x-coordinate of the first control point of the curve. |
System.Single | firstControlPointY | The y-coordinate of the first control point of the curve. |
System.Single | secondControlPointX | The x-coordinate of the second control point of the curve. |
System.Single | secondControlPointY | The y-coordinate of the second control point of the curve. |
System.Single | endPointX | The x-coordinate of the ending point of the curve. |
System.Single | endPointY | The y-coordinate of the ending point of the curve. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Create new instance of PdfBezierCurve.
PdfBezierCurve bezier = new PdfBezierCurve(0, 0, 100, 50, 50, 50, 100, 100);
//Draw the bezier curve to PDF page.
bezier.Draw(page, new PointF(300, 200));
//Save the PDF docment.
document.Save("output.pdf");
//Close the PDF document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Add a new PDF page.
Dim page As PdfPage = document.Pages.Add()
'Create new instance of PdfBezierCurve.
Dim bezier As New PdfBezierCurve(0, 0, 100, 50, 50, 50, 100, 100)
'Draw the bezier curve to PDF page.
bezier.Draw(page, New PointF(300, 200))
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
Properties
EndPoint
Gets or sets the ending point of the curve.
Declaration
public PointF EndPoint { get; set; }
Property Value
Type |
---|
PointF |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Create new PDF Pen.
PdfPen pen = new PdfPen(Color.Red);
PointF startPoint = new PointF(0, 0);
PointF firstControlPoint = new PointF(100, 50);
PointF secondControlPoint = new PointF(50, 50);
PointF endPoint = new PointF(100, 100);
//Create new instance of PdfBezierCurve.
PdfBezierCurve bezier = new PdfBezierCurve(pen, startPoint, firstControlPoint, secondControlPoint, endPoint);
//Set start point.
bezier.StartPoint = startPoint;
//Set first control point.
bezier.FirstControlPoint = firstControlPoint;
//Set second control point.
bezier.SecondControlPoint = secondControlPoint;
//Set end point.
bezier.EndPoint = endPoint;
//Draw the bezier curve to PDF page.
bezier.Draw(page, new PointF(300, 200));
//Save the PDF docment.
document.Save("output.pdf");
//Close the PDF document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Add a new PDF page.
Dim page As PdfPage = document.Pages.Add()
'Create new PDF Pen.
Dim pen As New PdfPen(Color.Red)
Dim startPoint As New PointF(0, 0)
Dim firstControlPoint As New PointF(100, 50)
Dim secondControlPoint As New PointF(50, 50)
Dim endPoint As New PointF(100, 100)
'Create new instance of PdfBezierCurve.
Dim bezier As New PdfBezierCurve(pen, startPoint, firstControlPoint, secondControlPoint, endPoint)
'Set start point.
bezier.StartPoint = startPoint
'Set first control point.
bezier.FirstControlPoint = firstControlPoint
'Set second control point.
bezier.SecondControlPoint = secondControlPoint
'Set end point.
bezier.EndPoint = endPoint
'Draw the bezier curve to PDF page.
bezier.Draw(page, New PointF(300, 200))
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
FirstControlPoint
Gets or sets the first control point of the curve.
Declaration
public PointF FirstControlPoint { get; set; }
Property Value
Type |
---|
PointF |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Create new PDF Pen.
PdfPen pen = new PdfPen(Color.Red);
PointF startPoint = new PointF(0, 0);
PointF firstControlPoint = new PointF(100, 50);
PointF secondControlPoint = new PointF(50, 50);
PointF endPoint = new PointF(100, 100);
//Create new instance of PdfBezierCurve.
PdfBezierCurve bezier = new PdfBezierCurve(pen, startPoint, firstControlPoint, secondControlPoint, endPoint);
//Set start point.
bezier.StartPoint = startPoint;
//Set first control point.
bezier.FirstControlPoint = firstControlPoint;
//Set second control point.
bezier.SecondControlPoint = secondControlPoint;
//Set end point.
bezier.EndPoint = endPoint;
//Draw the bezier curve to PDF page.
bezier.Draw(page, new PointF(300, 200));
//Save the PDF docment.
document.Save("output.pdf");
//Close the PDF document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Add a new PDF page.
Dim page As PdfPage = document.Pages.Add()
'Create new PDF Pen.
Dim pen As New PdfPen(Color.Red)
Dim startPoint As New PointF(0, 0)
Dim firstControlPoint As New PointF(100, 50)
Dim secondControlPoint As New PointF(50, 50)
Dim endPoint As New PointF(100, 100)
'Create new instance of PdfBezierCurve.
Dim bezier As New PdfBezierCurve(pen, startPoint, firstControlPoint, secondControlPoint, endPoint)
'Set start point.
bezier.StartPoint = startPoint
'Set first control point.
bezier.FirstControlPoint = firstControlPoint
'Set second control point.
bezier.SecondControlPoint = secondControlPoint
'Set end point.
bezier.EndPoint = endPoint
'Draw the bezier curve to PDF page.
bezier.Draw(page, New PointF(300, 200))
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
SecondControlPoint
Gets or sets the second control point of the curve
Declaration
public PointF SecondControlPoint { get; set; }
Property Value
Type |
---|
PointF |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Create new PDF Pen.
PdfPen pen = new PdfPen(Color.Red);
PointF startPoint = new PointF(0, 0);
PointF firstControlPoint = new PointF(100, 50);
PointF secondControlPoint = new PointF(50, 50);
PointF endPoint = new PointF(100, 100);
//Create new instance of PdfBezierCurve.
PdfBezierCurve bezier = new PdfBezierCurve(pen, startPoint, firstControlPoint, secondControlPoint, endPoint);
//Set start point.
bezier.StartPoint = startPoint;
//Set first control point.
bezier.FirstControlPoint = firstControlPoint;
//Set second control point.
bezier.SecondControlPoint = secondControlPoint;
//Set end point.
bezier.EndPoint = endPoint;
//Draw the bezier curve to PDF page.
bezier.Draw(page, new PointF(300, 200));
//Save the PDF docment.
document.Save("output.pdf");
//Close the PDF document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Add a new PDF page.
Dim page As PdfPage = document.Pages.Add()
'Create new PDF Pen.
Dim pen As New PdfPen(Color.Red)
Dim startPoint As New PointF(0, 0)
Dim firstControlPoint As New PointF(100, 50)
Dim secondControlPoint As New PointF(50, 50)
Dim endPoint As New PointF(100, 100)
'Create new instance of PdfBezierCurve.
Dim bezier As New PdfBezierCurve(pen, startPoint, firstControlPoint, secondControlPoint, endPoint)
'Set start point.
bezier.StartPoint = startPoint
'Set first control point.
bezier.FirstControlPoint = firstControlPoint
'Set second control point.
bezier.SecondControlPoint = secondControlPoint
'Set end point.
bezier.EndPoint = endPoint
'Draw the bezier curve to PDF page.
bezier.Draw(page, New PointF(300, 200))
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
StartPoint
Gets or sets the starting point of the curve
Declaration
public PointF StartPoint { get; set; }
Property Value
Type |
---|
PointF |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Create new PDF Pen.
PdfPen pen = new PdfPen(Color.Red);
PointF startPoint = new PointF(0, 0);
PointF firstControlPoint = new PointF(100, 50);
PointF secondControlPoint = new PointF(50, 50);
PointF endPoint = new PointF(100, 100);
//Create new instance of PdfBezierCurve.
PdfBezierCurve bezier = new PdfBezierCurve(pen, startPoint, firstControlPoint, secondControlPoint, endPoint);
//Set start point.
bezier.StartPoint = startPoint;
//Set first control point.
bezier.FirstControlPoint = firstControlPoint;
//Set second control point.
bezier.SecondControlPoint = secondControlPoint;
//Set end point.
bezier.EndPoint = endPoint;
//Draw the bezier curve to PDF page.
bezier.Draw(page, new PointF(300, 200));
//Save the PDF docment.
document.Save("output.pdf");
//Close the PDF document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Add a new PDF page.
Dim page As PdfPage = document.Pages.Add()
'Create new PDF Pen.
Dim pen As New PdfPen(Color.Red)
Dim startPoint As New PointF(0, 0)
Dim firstControlPoint As New PointF(100, 50)
Dim secondControlPoint As New PointF(50, 50)
Dim endPoint As New PointF(100, 100)
'Create new instance of PdfBezierCurve.
Dim bezier As New PdfBezierCurve(pen, startPoint, firstControlPoint, secondControlPoint, endPoint)
'Set start point.
bezier.StartPoint = startPoint
'Set first control point.
bezier.FirstControlPoint = firstControlPoint
'Set second control point.
bezier.SecondControlPoint = secondControlPoint
'Set end point.
bezier.EndPoint = endPoint
'Draw the bezier curve to PDF page.
bezier.Draw(page, New PointF(300, 200))
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)