Class PdfPie
Represents a pie shape.
Inheritance
Inherited Members
Namespace: Syncfusion.Pdf.Graphics
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public class PdfPie : PdfEllipsePart
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create a new PDF pie instance.
PdfPie pie = new PdfPie(new RectangleF(0, 0, 200, 100), 0, 180);
//Draw the pie to PDF page.
pie.Draw(page, PointF.Empty);
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF pie instance.
Dim pie As New PdfPie(New RectangleF(0, 0, 200, 100), 0, 180)
'Draw the pie to PDF page.
pie.Draw(page, PointF.Empty)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)
Constructors
PdfPie()
Initializes a new instance of the PdfPie class.
Declaration
protected PdfPie()
PdfPie(RectangleF, Single, Single)
Initializes a new instance of the PdfPie class.
Declaration
public PdfPie(RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
RectangleF | rectangle | The rectangle region of the pie shape. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the pie. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the pie. |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create a new PDF pie instance.
PdfPie pie = new PdfPie(new RectangleF(0, 0, 200, 100), 0, 180);
//Draw the pie to PDF page.
pie.Draw(page, PointF.Empty);
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF pie instance.
Dim pie As New PdfPie(New RectangleF(0, 0, 200, 100), 0, 180)
'Draw the pie to PDF page.
pie.Draw(page, PointF.Empty)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)
PdfPie(PdfBrush, RectangleF, Single, Single)
Initializes a new instance of the PdfPie class.
Declaration
public PdfPie(PdfBrush brush, RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
PdfBrush | brush | The brush of the pie shape. |
RectangleF | rectangle | The rectangle region of the pie shape. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the pie. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the pie. |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create a new PDF pie instance.
PdfPie pie = new PdfPie(PdfBrushes.Red, new RectangleF(0, 0, 200, 100), 0, 180);
//Draw the pie to PDF page.
pie.Draw(page, PointF.Empty);
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF pie instance.
Dim pie As New PdfPie(PdfBrushes.Red, New RectangleF(0, 0, 200, 100), 0, 180)
'Draw the pie to PDF page.
pie.Draw(page, PointF.Empty)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)
PdfPie(PdfBrush, Single, Single, Single, Single)
Initializes a new instance of the PdfPie class.
Declaration
public PdfPie(PdfBrush brush, float width, float height, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
PdfBrush | brush | The brush of the pie shape. |
System.Single | width | The width of the bounding rectangle. |
System.Single | height | The height of the bounding rectangle. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the pie. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the pie. |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create a new PDF pie instance.
PdfPie pie = new PdfPie(PdfBrushes.Red, 200, 100, 0, 180);
//Draw the pie to PDF page.
pie.Draw(page, PointF.Empty);
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF pie instance.
Dim pie As New PdfPie(PdfBrushes.Red, 200, 100, 0, 180)
'Draw the pie to PDF page.
pie.Draw(page, PointF.Empty)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)
PdfPie(PdfBrush, Single, Single, Single, Single, Single, Single)
Initializes a new instance of the PdfPie class.
Declaration
public PdfPie(PdfBrush brush, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
PdfBrush | brush | The brush of the pie shape. |
System.Single | x | The x-coordinate of the upper-left corner of the bounding rectangle. |
System.Single | y | The y-coordinate of the upper-left corner of the bounding rectangle. |
System.Single | width | The width of the bounding rectangle. |
System.Single | height | The height of the bounding rectangle. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the pie. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the pie. |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create a new PDF pie instance.
PdfPie pie = new PdfPie(PdfBrushes.Red, 0, 0, 200, 100, 0, 180);
//Draw the pie to PDF page.
pie.Draw(page, PointF.Empty);
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF pie instance.
Dim pie As New PdfPie(PdfBrushes.Red, 0, 0, 200, 100, 0, 180)
'Draw the pie to PDF page.
pie.Draw(page, PointF.Empty)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)
PdfPie(PdfPen, RectangleF, Single, Single)
Initializes a new instance of the PdfPie class.
Declaration
public PdfPie(PdfPen pen, RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
PdfPen | pen | The pen of the pie. |
RectangleF | rectangle | The rectangle region of the pie shape. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the pie. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the pie. |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create a new PDF pie instance.
PdfPie pie = new PdfPie(PdfPens.Red, new RectangleF(0, 0, 200, 100), 0, 180);
//Draw the pie to PDF page.
pie.Draw(page, PointF.Empty);
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF pie instance.
Dim pie As New PdfPie(PdfPens.Red,New RectangleF(0, 0, 200, 100), 0, 180)
'Draw the pie to PDF page.
pie.Draw(page, PointF.Empty)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)
PdfPie(PdfPen, PdfBrush, RectangleF, Single, Single)
Initializes a new instance of the PdfPie class.
Declaration
public PdfPie(PdfPen pen, PdfBrush brush, RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
PdfPen | pen | The pen of the pie shape. |
PdfBrush | brush | The brush of the pie shape. |
RectangleF | rectangle | The rectangle region of the pie shape. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the pie. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the pie. |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create a new PDF pie instance.
PdfPie pie = new PdfPie(PdfPens.Black, PdfBrushes.Red, new RectangleF(0, 0, 200, 100), 0, 180);
//Draw the pie to PDF page.
pie.Draw(page, PointF.Empty);
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF pie instance.
Dim pie As New PdfPie(PdfPens.Black, PdfBrushes.Red, New RectangleF(0, 0, 200, 100), 0, 180)
'Draw the pie to PDF page.
pie.Draw(page, PointF.Empty)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)
PdfPie(PdfPen, PdfBrush, Single, Single, Single, Single)
Initializes a new instance of the PdfPie class.
Declaration
public PdfPie(PdfPen pen, PdfBrush brush, float width, float height, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
PdfPen | pen | The pen of the pie shape. |
PdfBrush | brush | The brush of the pie shape. |
System.Single | width | The width of the bounding rectangle. |
System.Single | height | The height of the bounding rectangle. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the pie. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the pie. |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create a new PDF pie instance.
PdfPie pie = new PdfPie(PdfPens.Black, PdfBrushes.Red, 200, 100, 0, 180);
//Draw the pie to PDF page.
pie.Draw(page, PointF.Empty);
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF pie instance.
Dim pie As New PdfPie(PdfPens.Black, PdfBrushes.Red, 200, 100, 0, 180)
'Draw the pie to PDF page.
pie.Draw(page, PointF.Empty)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)
PdfPie(PdfPen, PdfBrush, Single, Single, Single, Single, Single, Single)
Initializes a new instance of the PdfPie class.
Declaration
public PdfPie(PdfPen pen, PdfBrush brush, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
PdfPen | pen | The pen of the pie shape. |
PdfBrush | brush | The brush of the pie shape. |
System.Single | x | The x-coordinate of the upper-left corner of the bounding rectangle. |
System.Single | y | The y-coordinate of the upper-left corner of the bounding rectangle. |
System.Single | width | The width of the bounding rectangle. |
System.Single | height | The height of the bounding rectangle. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the pie. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the pie. |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create a new PDF pie instance.
PdfPie pie = new PdfPie(PdfPens.Black, PdfBrushes.Red, 0, 0, 200, 100, 0, 180);
//Draw the pie to PDF page.
pie.Draw(page, PointF.Empty);
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF pie instance.
Dim pie As New PdfPie(PdfPens.Black, PdfBrushes.Red, 0, 0, 200, 100, 0, 180)
'Draw the pie to PDF page.
pie.Draw(page, PointF.Empty)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)
PdfPie(PdfPen, Single, Single, Single, Single)
Initializes a new instance of the PdfPie class.
Declaration
public PdfPie(PdfPen pen, float width, float height, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
PdfPen | pen | The pen of the pie shape. |
System.Single | width | The width of the bounding rectangle. |
System.Single | height | The height of the bounding rectangle. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the pie. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the pie. |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create a new PDF pie instance.
PdfPie pie = new PdfPie(PdfPens.Red, 200, 100, 0, 180);
//Draw the pie to PDF page.
pie.Draw(page, PointF.Empty);
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF pie instance.
Dim pie As New PdfPie(PdfPens.Red, 200, 100, 0, 180)
'Draw the pie to PDF page.
pie.Draw(page, PointF.Empty)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)
PdfPie(PdfPen, Single, Single, Single, Single, Single, Single)
Initializes a new instance of the PdfPie class.
Declaration
public PdfPie(PdfPen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
PdfPen | pen | The pen of the pie shape. |
System.Single | x | The x-coordinate of the upper-left corner of the bounding rectangle. |
System.Single | y | The y-coordinate of the upper-left corner of the bounding rectangle. |
System.Single | width | The width of the bounding rectangle. |
System.Single | height | The height of the bounding rectangle. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the pie. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the pie. |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create a new PDF pie instance.
PdfPie pie = new PdfPie(PdfPens.Red, 0, 0, 200, 100, 0, 180);
//Draw the pie to PDF page.
pie.Draw(page, PointF.Empty);
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF pie instance.
Dim pie As New PdfPie(PdfPens.Red, 0, 0, 200, 100, 0, 180)
'Draw the pie to PDF page.
pie.Draw(page, PointF.Empty)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)
PdfPie(Single, Single, Single, Single)
Initializes a new instance of the PdfPie class.
Declaration
public PdfPie(float width, float height, float startAngle, float sweepAngle)
Parameters
Type | Name | Description |
---|---|---|
System.Single | width | The width of the bounding rectangle. |
System.Single | height | The height of the bounding rectangle. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the pie. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the pie. |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create a new PDF pie instance.
PdfPie pie = new PdfPie(200, 100, 0, 180);
//Draw the pie to PDF page.
pie.Draw(page, PointF.Empty);
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF pie instance.
Dim pie As New PdfPie(200, 100, 0, 180)
'Draw the pie to PDF page.
pie.Draw(page, PointF.Empty)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)
PdfPie(Single, Single, Single, Single, Single, Single)
Initializes a new instance of the PdfPie class.
Declaration
public PdfPie(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. |
System.Single | y | The y-coordinate of the upper-left corner of the bounding rectangle. |
System.Single | width | The width of the bounding rectangle. |
System.Single | height | The height of the bounding rectangle. |
System.Single | startAngle | Angle in degrees measured clockwise from the x-axis to the starting point of the pie. |
System.Single | sweepAngle | Angle in degrees measured clockwise from the startAngle parameter to ending point of the pie. |
Examples
//Create a new PDF document.
PdfDocument doc = new PdfDocument();
//Add a page to the document.
PdfPage page = doc.Pages.Add();
//Create a new PDF pie instance.
PdfPie pie = new PdfPie(0, 0, 200, 100, 0, 180);
//Draw the pie to PDF page.
pie.Draw(page, PointF.Empty);
//Save the document.
doc.Save("Output.pdf");
//Close the document.
doc.Close(true);
'Create a new PDF document.
Dim doc As New PdfDocument()
'Add a page to the document.
Dim page As PdfPage = doc.Pages.Add()
'Create a new PDF pie instance.
Dim pie As New PdfPie(0, 0, 200, 100, 0, 180)
'Draw the pie to PDF page.
pie.Draw(page, PointF.Empty)
'Save the document.
doc.Save("Output.pdf")
'Close the document.
doc.Close(True)