Class PdfGraphicsElement
Represents a base class for all the page graphics elements.
Inheritance
System.Object
PdfGraphicsElement
Assembly: Syncfusion.Pdf.UWP.dll
Syntax
public abstract class PdfGraphicsElement : Object
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Add a new PDF page.
PdfPage page = document.Pages.Add();
//Create new PdfRectangle instance.
PdfRectangle rect = new PdfRectangle(200, 100);
//Draw the rectangle to PDF page.
rect.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 PdfRectangle instance.
Dim rect As New PdfRectangle(200, 100)
'Draw the rectangle to PDF page.
rect.Draw(page, PointF.Empty)
'Save the PDF docment.
document.Save("output.pdf")
Close the PDF document.
document.Close(True)
Constructors
PdfGraphicsElement()
Declaration
protected PdfGraphicsElement()
Methods
Draw(PdfGraphics)
Declaration
public void Draw(PdfGraphics graphics)
Parameters
Draw(PdfGraphics, PointF)
Declaration
public void Draw(PdfGraphics graphics, PointF location)
Parameters
Type |
Name |
Description |
PdfGraphics |
graphics |
|
System.Drawing.PointF |
location |
|
Draw(PdfGraphics, Single, Single)
Declaration
public virtual void Draw(PdfGraphics graphics, float x, float y)
Parameters
Type |
Name |
Description |
PdfGraphics |
graphics |
|
System.Single |
x |
|
System.Single |
y |
|
Extension Methods