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
rectangle
RectangleFThe rectangle region of the pie shape.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAngle
floatAngle 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
brush
PdfBrushThe brush of the pie shape.
rectangle
RectangleFThe rectangle region of the pie shape.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAngle
floatAngle 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
brush
PdfBrushThe brush of the pie shape.
width
floatThe width of the bounding rectangle.
height
floatThe height of the bounding rectangle.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAngle
floatAngle 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
brush
PdfBrushThe brush of the pie shape.
x
floatThe x-coordinate of the upper-left corner of the bounding rectangle.
y
floatThe y-coordinate of the upper-left corner of the bounding rectangle.
width
floatThe width of the bounding rectangle.
height
floatThe height of the bounding rectangle.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAngle
floatAngle 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
pen
PdfPenThe pen of the pie.
rectangle
RectangleFThe rectangle region of the pie shape.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAngle
floatAngle 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
pen
PdfPenThe pen of the pie shape.
brush
PdfBrushThe brush of the pie shape.
rectangle
RectangleFThe rectangle region of the pie shape.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAngle
floatAngle 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
pen
PdfPenThe pen of the pie shape.
brush
PdfBrushThe brush of the pie shape.
width
floatThe width of the bounding rectangle.
height
floatThe height of the bounding rectangle.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAngle
floatAngle 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
pen
PdfPenThe pen of the pie shape.
brush
PdfBrushThe brush of the pie shape.
x
floatThe x-coordinate of the upper-left corner of the bounding rectangle.
y
floatThe y-coordinate of the upper-left corner of the bounding rectangle.
width
floatThe width of the bounding rectangle.
height
floatThe height of the bounding rectangle.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAngle
floatAngle 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
pen
PdfPenThe pen of the pie shape.
width
floatThe width of the bounding rectangle.
height
floatThe height of the bounding rectangle.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAngle
floatAngle 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
pen
PdfPenThe pen of the pie shape.
x
floatThe x-coordinate of the upper-left corner of the bounding rectangle.
y
floatThe y-coordinate of the upper-left corner of the bounding rectangle.
width
floatThe width of the bounding rectangle.
height
floatThe height of the bounding rectangle.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAngle
floatAngle 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
width
floatThe width of the bounding rectangle.
height
floatThe height of the bounding rectangle.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAngle
floatAngle 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
x
floatThe x-coordinate of the upper-left corner of the bounding rectangle.
y
floatThe y-coordinate of the upper-left corner of the bounding rectangle.
width
floatThe width of the bounding rectangle.
height
floatThe height of the bounding rectangle.
startAngle
floatAngle in degrees measured clockwise from the x-axis to the starting point of the pie.
sweepAngle
floatAngle 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
graphics
PdfGraphicsGraphics context where the element should be printed.