Class PdfArc
- Namespace
- Syncfusion.Pdf.Graphics
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents an arc shape.
public class PdfArc : PdfEllipsePart
- Inheritance
-
PdfArc
- Inherited Members
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)
Remarks
It ignores brush setting.
Constructors
PdfArc()
Initializes a new instance of the PdfArc class.
protected PdfArc()
PdfArc(RectangleF, float, float)
Initializes a new instance of the PdfArc class with the specified Syncfusion.Drawing.RectangleF structure and sweep angle
public PdfArc(RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
rectangleRectangleFRectangleF structure that defines the boundaries of the arc.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAnglefloatAngle 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(PdfPen, RectangleF, float, float)
Initializes a new instance of the PdfArc class with the specified pen, Syncfusion.Drawing.RectangleF structure and sweep angle
public PdfArc(PdfPen pen, RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
penPdfPenPen that determines the color, width, and style of the arc.
rectangleRectangleFRectangleF structure that defines the boundaries of the arc.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAnglefloatAngle 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, float, float, float, float)
Initializes a new instance of the PdfArc class with the specified pen, width, height and sweep angle
public PdfArc(PdfPen pen, float width, float height, float startAngle, float sweepAngle)
Parameters
penPdfPenPen that determines the color, width, and style of the arc.
widthfloatWidth of the rectangle that defines the arc.
heightfloatHeight of the rectangle that defines the arc.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAnglefloatAngle 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, float, float, float, float, float, float)
Initializes a new instance of the PdfArc class with the specified pen, pair of coordinates, width, height and sweep angle
public PdfArc(PdfPen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
penPdfPenPen that determines the color, width, and style of the arc.
xfloatThe x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
yfloatThe y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
widthfloatWidth of the rectangle that defines the arc.
heightfloatHeight of the rectangle that defines the arc.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAnglefloatAngle 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(float, float, float, float)
Initializes a new instance of the PdfArc class with the specified pair of coordinates, width, height and sweep angle
public PdfArc(float width, float height, float startAngle, float sweepAngle)
Parameters
widthfloatWidth of the rectangle that defines the arc.
heightfloatHeight of the rectangle that defines the arc.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAnglefloatAngle 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(float, float, float, float, float, float)
Initializes a new instance of the PdfArc class.
public PdfArc(float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
xfloatThe x-coordinate of the upper-left corner of the rectangle that defines the ellipse.
yfloatThe y-coordinate of the upper-left corner of the rectangle that defines the ellipse.
widthfloatWidth of the rectangle that defines the arc.
heightfloatHeight of the rectangle that defines the arc.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the arc.
sweepAnglefloatAngle 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)
Methods
DrawInternal(PdfGraphics)
Draws an element on the Graphics.
protected override void DrawInternal(PdfGraphics graphics)
Parameters
graphicsPdfGraphicsGraphics context where the element should be printed.