Class PdfEllipsePart
Represents a base class of arc and pie shapes.
Inheritance
Inherited Members
Namespace: Syncfusion.Pdf.Graphics
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public abstract class PdfEllipsePart : PdfRectangleArea
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
PdfEllipsePart()
Initializes a new instance of the EllipsePart class.
Declaration
protected PdfEllipsePart()
PdfEllipsePart(RectangleF, Single, Single)
Initializes a new instance of the EllipsePart class with the specified RectangleF structure and sweep angle
Declaration
protected PdfEllipsePart(RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
RectangleF | rectangle | RectangleF structure that defines the boundaries of the ellipse. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the ellipse. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the ellipse. |
PdfEllipsePart(PdfPen, PdfBrush, RectangleF, Single, Single)
Initializes a new instance of the EllipsePart class.
Declaration
protected PdfEllipsePart(PdfPen pen, PdfBrush brush, RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
PdfPen | pen | Pen that determines the color, width, and style of the ellipse. |
PdfBrush | brush | Brush that determines the color and texture of the ellipse. |
RectangleF | rectangle | RectangleF structure that defines the boundaries of the ellipse. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the ellipse. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the ellipse. |
PdfEllipsePart(PdfPen, PdfBrush, Single, Single, Single, Single, Single, Single)
Initializes a new instance of the EllipsePart class with the specified pen, brush, pair of coordinates, width and height and sweep angle.
Declaration
protected PdfEllipsePart(PdfPen pen, PdfBrush brush, 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 ellipse. |
PdfBrush | brush | Brush that determines the color and texture of the ellipse. |
System.Single | x | The x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse. |
System.Single | y | The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse. |
System.Single | width | Width of the bounding rectangle that defines the ellipse. |
System.Single | height | Height of the bounding rectangle that defines the ellipse. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the ellipse. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the ellipse. |
PdfEllipsePart(Single, Single, Single, Single, Single, Single)
Initializes a new instance of the EllipsePart class with the specified pair of coordinates, width, height and sweep angle
Declaration
protected PdfEllipsePart(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 bounding rectangle that defines the ellipse. |
System.Single | y | The y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse. |
System.Single | width | Width of the bounding rectangle that defines the ellipse. |
System.Single | height | Height of the bounding rectangle that defines the ellipse. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the ellipse. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the ellipse. |
Properties
StartAngle
Gets or sets the start angle.
Declaration
public float StartAngle { get; set; }
Property Value
Type |
---|
System.Single |
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);
//Set start angle.
arc.StartAngle = 0;
//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)
'Set start angle.
arc.StartAngle = 0
'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)
SweepAngle
Gets or sets the sweep angle.
Declaration
public float SweepAngle { get; set; }
Property Value
Type |
---|
System.Single |
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);
//Set start angle.
arc.StartAngle = 0;
//Set sweep angle.
arc.SweepAngle = 90;
//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)
'Set start angle.
arc.StartAngle = 0
'Set sweep angle.
arc.SweepAngle = 90
'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)