Class PdfArc
Represents an arc shape.
Inheritance
Inherited Members
Namespace: Syncfusion.Pdf.Graphics
Assembly: Syncfusion.Pdf.UWP.dll
Syntax
public class PdfArc : PdfEllipsePart
Remarks
It ignores brush setting.
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Arc bounds.
RectangleF bounds = new RectangleF(0, 0, 200, 100);
//Create new instance of PdfArc.
PdfArc arc = new PdfArc(bounds, 0, 180);
//Draw the arc to PDF page.
arc.Draw(page, PointF.Empty);
//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()
'Arc bounds.
Dim bounds As New RectangleF(0, 0, 200, 100)
'Create new instance of PdfArc.
Dim arc As New PdfArc(bounds, 0, 180)
'Draw the arc to PDF page.
arc.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
Constructors
PdfArc()
Initializes a new instance of the PdfArc class.
Declaration
protected PdfArc()
PdfArc(PdfPen, RectangleF, Single, Single)
Initializes a new instance of the PdfArc class with the specified pen, System.Drawing.RectangleF structure and sweep angle
Declaration
public PdfArc(PdfPen pen, RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
PdfPen | pen | Pen that determines the color, width, and style of the arc. |
System.Drawing.RectangleF | rectangle | RectangleF structure that defines the boundaries of the arc. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the arc. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the arc. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Arc bounds.
RectangleF bounds = new RectangleF(0, 0, 200, 100);
//Create new PDF Pen.
PdfPen pen = new PdfPen(Color.Red);
//Create new instance of PdfArc.
PdfArc arc = new PdfArc(pen, bounds, 0, 180);
//Draw the arc to PDF page.
arc.Draw(page, PointF.Empty);
//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()
'Arc bounds.
Dim bounds As New RectangleF(0, 0, 200, 100)
'Create new PDF Pen.
Dim pen As New PdfPen(Color.Red)
'Create new instance of PdfArc.
Dim arc As New PdfArc(pen, bounds, 0, 180)
'Draw the arc to PDF page.
arc.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfArc(PdfPen, Single, Single, Single, Single)
Initializes a new instance of the PdfArc class with the specified pen, width, height and sweep angle
Declaration
public PdfArc(PdfPen pen, float width, float height, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
PdfPen | pen | Pen that determines the color, width, and style of the arc. |
System.Single | width | Width of the rectangle that defines the arc. |
System.Single | height | Height of the rectangle that defines the arc. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the arc. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the arc. |
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 PdfArc.
PdfArc arc = new PdfArc(pen, 200, 100, 0, 180);
//Draw the arc to PDF page.
arc.Draw(page, PointF.Empty);
//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 PdfArc.
Dim arc As New PdfArc(pen, 200, 100, 0, 180)
'Draw the arc to PDF page.
arc.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfArc(PdfPen, Single, Single, Single, Single, Single, Single)
Initializes a new instance of the PdfArc class with the specified pen, pair of coordinates, width, height and sweep angle
Declaration
public PdfArc(PdfPen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
PdfPen | pen | Pen that determines the color, width, and style of the arc. |
System.Single | x | The x-coordinate of the upper-left corner of the rectangle that defines the ellipse. |
System.Single | y | The y-coordinate of the upper-left corner of the rectangle that defines the ellipse. |
System.Single | width | Width of the rectangle that defines the arc. |
System.Single | height | Height of the rectangle that defines the arc. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the arc. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the arc. |
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 PdfArc.
PdfArc arc = new PdfArc(pen, 0, 0, 200, 100, 0, 180);
//Draw the arc to PDF page.
arc.Draw(page, PointF.Empty);
//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 PdfArc.
Dim arc As New PdfArc(pen, 0, 0, 200, 100, 0, 180)
'Draw the arc to PDF page.
arc.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfArc(RectangleF, Single, Single)
Initializes a new instance of the PdfArc class with the specified System.Drawing.RectangleF structure and sweep angle
Declaration
public PdfArc(RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | rectangle | RectangleF structure that defines the boundaries of the arc. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the arc. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the arc. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Arc bounds.
RectangleF bounds = new RectangleF(0, 0, 200, 100);
//Create new instance of PdfArc.
PdfArc arc = new PdfArc(bounds, 0, 180);
//Draw the arc to PDF page.
arc.Draw(page, PointF.Empty);
//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()
'Arc bounds.
Dim bounds As New RectangleF(0, 0, 200, 100)
'Create new instance of PdfArc.
Dim arc As New PdfArc(bounds, 0, 180)
'Draw the arc to PDF page.
arc.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfArc(Single, Single, Single, Single)
Initializes a new instance of the PdfArc class with the specified pair of coordinates, width, height and sweep angle
Declaration
public PdfArc(float width, float height, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
System.Single | width | Width of the rectangle that defines the arc. |
System.Single | height | Height of the rectangle that defines the arc. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the arc. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the arc. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Create new instance of PdfArc.
PdfArc arc = new PdfArc(200,100, 0, 180);
//Draw the arc to PDF page.
arc.Draw(page, PointF.Empty);
//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 PdfArc.
Dim arc As New PdfArc(200,100, 0, 180)
'Draw the arc to PDF page.
arc.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfArc(Single, Single, Single, Single, Single, Single)
Initializes a new instance of the PdfArc class.
Declaration
public PdfArc(float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | The x-coordinate of the upper-left corner of the rectangle that defines the ellipse. |
System.Single | y | The y-coordinate of the upper-left corner of the rectangle that defines the ellipse. |
System.Single | width | Width of the rectangle that defines the arc. |
System.Single | height | Height of the rectangle that defines the arc. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the arc. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the arc. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Create new instance of PdfArc.
PdfArc arc = new PdfArc(0,0,200,100, 0, 180);
//Draw the arc to PDF page.
arc.Draw(page, PointF.Empty);
//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 PdfArc.
Dim arc As New PdfArc(0,0,200,100, 0, 180)
'Draw the arc to PDF page.
arc.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)