Class PdfPie
- Namespace
- Syncfusion.Pdf.Graphics
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents a pie shape.
public class PdfPie : PdfEllipsePart
- Inheritance
-
PdfPie
- Inherited Members
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.
protected PdfPie()
PdfPie(RectangleF, float, float)
Initializes a new instance of the PdfPie class.
public PdfPie(RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
rectangleRectangleFThe rectangle region of the pie shape.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAnglefloatAngle 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, float, float)
Initializes a new instance of the PdfPie class.
public PdfPie(PdfBrush brush, RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
brushPdfBrushThe brush of the pie shape.
rectangleRectangleFThe rectangle region of the pie shape.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAnglefloatAngle 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, float, float, float, float)
Initializes a new instance of the PdfPie class.
public PdfPie(PdfBrush brush, float width, float height, float startAngle, float sweepAngle)
Parameters
brushPdfBrushThe brush of the pie shape.
widthfloatThe width of the bounding rectangle.
heightfloatThe height of the bounding rectangle.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAnglefloatAngle 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, float, float, float, float, float, float)
Initializes a new instance of the PdfPie class.
public PdfPie(PdfBrush brush, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
brushPdfBrushThe brush of the pie shape.
xfloatThe x-coordinate of the upper-left corner of the bounding rectangle.
yfloatThe y-coordinate of the upper-left corner of the bounding rectangle.
widthfloatThe width of the bounding rectangle.
heightfloatThe height of the bounding rectangle.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAnglefloatAngle 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, float, float)
Initializes a new instance of the PdfPie class.
public PdfPie(PdfPen pen, RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
penPdfPenThe pen of the pie.
rectangleRectangleFThe rectangle region of the pie shape.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAnglefloatAngle 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, float, float)
Initializes a new instance of the PdfPie class.
public PdfPie(PdfPen pen, PdfBrush brush, RectangleF rectangle, float startAngle, float sweepAngle)
Parameters
penPdfPenThe pen of the pie shape.
brushPdfBrushThe brush of the pie shape.
rectangleRectangleFThe rectangle region of the pie shape.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAnglefloatAngle 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, float, float, float, float)
Initializes a new instance of the PdfPie class.
public PdfPie(PdfPen pen, PdfBrush brush, float width, float height, float startAngle, float sweepAngle)
Parameters
penPdfPenThe pen of the pie shape.
brushPdfBrushThe brush of the pie shape.
widthfloatThe width of the bounding rectangle.
heightfloatThe height of the bounding rectangle.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAnglefloatAngle 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, float, float, float, float, float, float)
Initializes a new instance of the PdfPie class.
public PdfPie(PdfPen pen, PdfBrush brush, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
penPdfPenThe pen of the pie shape.
brushPdfBrushThe brush of the pie shape.
xfloatThe x-coordinate of the upper-left corner of the bounding rectangle.
yfloatThe y-coordinate of the upper-left corner of the bounding rectangle.
widthfloatThe width of the bounding rectangle.
heightfloatThe height of the bounding rectangle.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAnglefloatAngle 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, float, float, float, float)
Initializes a new instance of the PdfPie class.
public PdfPie(PdfPen pen, float width, float height, float startAngle, float sweepAngle)
Parameters
penPdfPenThe pen of the pie shape.
widthfloatThe width of the bounding rectangle.
heightfloatThe height of the bounding rectangle.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAnglefloatAngle 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, float, float, float, float, float, float)
Initializes a new instance of the PdfPie class.
public PdfPie(PdfPen pen, float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
penPdfPenThe pen of the pie shape.
xfloatThe x-coordinate of the upper-left corner of the bounding rectangle.
yfloatThe y-coordinate of the upper-left corner of the bounding rectangle.
widthfloatThe width of the bounding rectangle.
heightfloatThe height of the bounding rectangle.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAnglefloatAngle 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(float, float, float, float)
Initializes a new instance of the PdfPie class.
public PdfPie(float width, float height, float startAngle, float sweepAngle)
Parameters
widthfloatThe width of the bounding rectangle.
heightfloatThe height of the bounding rectangle.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAnglefloatAngle 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(float, float, float, float, float, float)
Initializes a new instance of the PdfPie class.
public PdfPie(float x, float y, float width, float height, float startAngle, float sweepAngle)
Parameters
xfloatThe x-coordinate of the upper-left corner of the bounding rectangle.
yfloatThe y-coordinate of the upper-left corner of the bounding rectangle.
widthfloatThe width of the bounding rectangle.
heightfloatThe height of the bounding rectangle.
startAnglefloatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAnglefloatAngle 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)
Methods
DrawInternal(PdfGraphics)
Draws an element on the Graphics.
protected override void DrawInternal(PdfGraphics graphics)
Parameters
graphicsPdfGraphicsGraphics context where the element should be printed.