Class PdfEllipse
- Namespace
- Syncfusion.Pdf.Graphics
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents an ellipse shape.
public class PdfEllipse : PdfRectangleArea
- Inheritance
-
PdfEllipse
- Inherited Members
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Bounds
RectangleF bounds = new RectangleF(0, 0, 200, 100);
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(bounds);
//Draw the ellipse to PDF page.
ellipse.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()
'Bounds
Dim bounds As New RectangleF(0, 0, 200, 100)
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(bounds)
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
Constructors
PdfEllipse()
Initializes a new instance of the PdfEllipse class.
protected PdfEllipse()
PdfEllipse(RectangleF)
Initializes a new instance of the PdfEllipse class with the rectangle.
public PdfEllipse(RectangleF rectangle)
Parameters
rectangle
RectangleFRectangleF structure that defines the boundaries of the ellipse.
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Bounds
RectangleF bounds = new RectangleF(0, 0, 200, 100);
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(bounds);
//Draw the ellipse to PDF page.
ellipse.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()
'Bounds
Dim bounds As New RectangleF(0, 0, 200, 100)
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(bounds)
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfEllipse(PdfBrush, RectangleF)
Initializes a new instance of the PdfEllipse class with the specified brush and Syncfusion.Drawing.RectangleF structure
public PdfEllipse(PdfBrush brush, RectangleF rectangle)
Parameters
brush
PdfBrushBrush that determines the color and texture of the ellipse.
rectangle
RectangleFRectangleF structure that defines the boundaries of the ellipse.
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
PdfBrush brush = new PdfSolidBrush(Color.Red);
//Creat new PdfEllipse instance.
//Bounds
RectangleF bounds = new RectangleF(0, 0, 200, 100);
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(brush, bounds);
//Draw the ellipse to PDF page.
ellipse.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 solid brush.
Dim brush As PdfBrush = New PdfSolidBrush(Color.Red)
'Bounds
Dim bounds As New RectangleF(0, 0, 200, 100)
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(brush, bounds)
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfEllipse(PdfBrush, float, float)
Initializes a new instance of the PdfEllipse class with the specified brush, width and height.
public PdfEllipse(PdfBrush brush, float width, float height)
Parameters
brush
PdfBrushBrush that determines the color and texture of the ellipse.
width
floatWidth of the bounding rectangle that defines the ellipse.
height
floatHeight of the bounding rectangle that defines the ellipse.
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Create new PDF solid brush.
PdfBrush brush = new PdfSolidBrush(Color.Red);
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(brush, 200, 100);
//Draw the ellipse to PDF page.
ellipse.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 solid brush.
Dim brush As PdfBrush = New PdfSolidBrush(Color.Red)
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(brush, 200, 100)
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfEllipse(PdfBrush, float, float, float, float)
Initializes a new instance of the PdfEllipse class with the specified brush, pair of coordinates, width and height
public PdfEllipse(PdfBrush brush, float x, float y, float width, float height)
Parameters
brush
PdfBrushBrush that determines the color and texture of the ellipse.
x
floatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
y
floatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
width
floatWidth of the bounding rectangle that defines the ellipse.
height
floatHeight of the bounding rectangle that defines the ellipse.
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
PdfBrush brush = new PdfSolidBrush(Color.Red);
//Creat new PdfEllipse instance.
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(brush, 0, 0, 200, 100);
//Draw the ellipse to PDF page.
ellipse.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 solid brush.
Dim brush As PdfBrush = New PdfSolidBrush(Color.Red)
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(brush, 0, 0, 200, 100)
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfEllipse(PdfPen, RectangleF)
Initializes a new instance of the PdfEllipse class with the specified pen and Syncfusion.Drawing.RectangleF structure
public PdfEllipse(PdfPen pen, RectangleF rectangle)
Parameters
pen
PdfPenPen that determines the color, width, and style of the ellipse.
rectangle
RectangleFRectangleF structure that defines the boundaries of the ellipse.
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);
//Bounds
RectangleF bounds = new RectangleF(0, 0, 200, 100);
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(pen, bounds);
//Draw the ellipse to PDF page.
ellipse.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)
'Bounds
Dim bounds As New RectangleF(0, 0, 200, 100)
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(pen, bounds)
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfEllipse(PdfPen, PdfBrush, RectangleF)
Initializes a new instance of the PdfEllipse class with the specified pen, brush and Syncfusion.Drawing.RectangleF structure
public PdfEllipse(PdfPen pen, PdfBrush brush, RectangleF rectangle)
Parameters
pen
PdfPenPen that determines the color, width, and style of the ellipse.
brush
PdfBrushBrush that determines the color and texture of the ellipse.
rectangle
RectangleFRectangleF structure that defines the boundaries of the ellipse.
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 PDF solid brush.
PdfBrush brush = new PdfSolidBrush(Color.Red);
//Bounds
RectangleF bounds = new RectangleF(0, 0, 200, 100);
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(pen, brush, bounds);
//Draw the ellipse to PDF page.
ellipse.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 PDF solid brush.
Dim brush As PdfBrush = New PdfSolidBrush(Color.Red)
'Bounds
Dim bounds As New RectangleF(0, 0, 200, 100)
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(pen, brush, bounds)
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfEllipse(PdfPen, PdfBrush, float, float)
Initializes a new instance of the PdfEllipse class with the specified pen, brush, width and height
public PdfEllipse(PdfPen pen, PdfBrush brush, float width, float height)
Parameters
pen
PdfPenPen that determines the color, width, and style of the ellipse.
brush
PdfBrushBrush that determines the color and texture of the ellipse.
width
floatWidth of the bounding rectangle that defines the ellipse.
height
floatHeight of the bounding rectangle that defines the ellipse.
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 PDF solid brush.
PdfBrush brush = new PdfSolidBrush(Color.Red);
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(pen, brush, 200, 100);
//Draw the ellipse to PDF page.
ellipse.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 PDF solid brush.
Dim brush As PdfBrush = New PdfSolidBrush(Color.Red)
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(pen, brush, 200, 100)
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfEllipse(PdfPen, PdfBrush, float, float, float, float)
Initializes a new instance of the PdfEllipse class with the specified pen, brush, pair of coordinates, width and height
public PdfEllipse(PdfPen pen, PdfBrush brush, float x, float y, float width, float height)
Parameters
pen
PdfPenPen that determines the color, width, and style of the ellipse.
brush
PdfBrushBrush that determines the color and texture of the ellipse.
x
floatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
y
floatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
width
floatWidth of the bounding rectangle that defines the ellipse.
height
floatHeight of the bounding rectangle that defines the ellipse.
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);
PdfBrush brush = new PdfSolidBrush(Color.Red);
//Creat new PdfEllipse instance.
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(pen, brush, 0, 0, 200, 100);
//Draw the ellipse to PDF page.
ellipse.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 PDF solid brush.
Dim brush As PdfBrush = New PdfSolidBrush(Color.Red)
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(pen, brush, 0, 0, 200, 100)
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfEllipse(PdfPen, float, float)
Initializes a new instance of the PdfEllipse class with the specified pen, width and height.
public PdfEllipse(PdfPen pen, float width, float height)
Parameters
pen
PdfPenPen that determines the color, width, and style of the ellipse.
width
floatWidth of the bounding rectangle that defines the ellipse.
height
floatHeight of the bounding rectangle that defines the ellipse.
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);
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(pen, 200, 100);
//Draw the ellipse to PDF page.
ellipse.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)
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(pen, 200, 100)
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfEllipse(PdfPen, float, float, float, float)
Initializes a new instance of the PdfEllipse class with the specified pen, pair of coordinates, width and height
public PdfEllipse(PdfPen pen, float x, float y, float width, float height)
Parameters
pen
PdfPenPen that determines the color, width, and style of the ellipse.
x
floatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
y
floatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
width
floatWidth of the bounding rectangle that defines the ellipse.
height
floatHeight of the bounding rectangle that defines the ellipse.
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);
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(pen, 0, 0, 200, 100);
//Draw the ellipse to PDF page.
ellipse.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)
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(pen, 0, 0, 200, 100)
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfEllipse(float, float)
Initializes a new instance of the PdfEllipse class with the specified width and height
public PdfEllipse(float width, float height)
Parameters
width
floatWidth of the bounding rectangle that defines the ellipse.
height
floatHeight of the bounding rectangle that defines the ellipse.
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(200, 100);
//Draw the ellipse to PDF page.
ellipse.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()
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(200, 100)
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
PdfEllipse(float, float, float, float)
Initializes a new instance of the PdfEllipse class with the specified pair of coordinates, width and height
public PdfEllipse(float x, float y, float width, float height)
Parameters
x
floatThe x-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
y
floatThe y-coordinate of the upper-left corner of the bounding rectangle that defines the ellipse.
width
floatWidth of the bounding rectangle that defines the ellipse.
height
floatHeight of the bounding rectangle that defines the ellipse.
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(0, 0, 200, 100);
//Draw the ellipse to PDF page.
ellipse.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()
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(0, 0, 200, 100)
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
Properties
Center
Gets the center point.
public PointF Center { get; }
Property Value
- PointF
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(200, 100);
//Get the radius X.
float radiusX = ellipse.RadiusX;
//Get the radius Y.
float radiusY = ellipse.RadiusY;
//Get the center radius.
PointF center = ellipse.Center;
//Draw the ellipse to PDF page.
ellipse.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()
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(200, 100)
'Get the radius X.
Dim radiusX As Single = ellipse.RadiusX
'Get the radius Y.
Dim radiusY As Single = ellipse.RadiusY
'Get the center radius.
Dim center As PointF = ellipse.Center
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
RadiusX
Gets the radius X.
public float RadiusX { get; }
Property Value
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(200, 100);
//Get the radius X.
float radiusX = ellipse.RadiusX;
//Get the radius Y.
float radiusY = ellipse.RadiusY;
//Get the center radius.
PointF center = ellipse.Center;
//Draw the ellipse to PDF page.
ellipse.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()
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(200, 100)
'Get the radius X.
Dim radiusX As Single = ellipse.RadiusX
'Get the radius Y.
Dim radiusY As Single = ellipse.RadiusY
'Get the center radius.
Dim center As PointF = ellipse.Center
'Draw the ellipse to PDF page.
ellipse.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
'Close the PDF document.
document.Close(True)
RadiusY
Gets the radius Y.
public float RadiusY { get; }
Property Value
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Creat new PdfEllipse instance.
PdfEllipse ellipse = new PdfEllipse(200, 100);
//Get the radius X.
float radiusX = ellipse.RadiusX;
//Get the radius Y.
float radiusY = ellipse.RadiusY;
//Get the center radius.
PointF center = ellipse.Center;
//Draw the ellipse to PDF page.
ellipse.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()
'Creat new PdfEllipse instance.
Dim ellipse As New PdfEllipse(200, 100)
'Get the radius X.
Dim radiusX As Single = ellipse.RadiusX
'Get the radius Y.
Dim radiusY As Single = ellipse.RadiusY
'Get the center radius.
Dim center As PointF = ellipse.Center
'Draw the ellipse to PDF page.
ellipse.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
graphics
PdfGraphicsGraphics context where the element should be printed.