Class PdfShapeElement
- Namespace
- Syncfusion.Pdf.Graphics
- Assembly
- Syncfusion.Pdf.Portable.dll
Base class for the main shapes.
public abstract class PdfShapeElement : PdfLayoutElement
- Inheritance
-
PdfShapeElement
- Derived
- Inherited Members
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
PdfShapeElement()
protected PdfShapeElement()
Methods
GetBounds()
Gets the bounds.
public RectangleF GetBounds()
Returns
- RectangleF
rect
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);
//Get the bounds.
RectangleF bounds = rect.GetBounds();
//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)
'Get the bounds.
Dim bounds As RectangleF = rect.GetBounds()
'Save the PDF docment.
document.Save("output.pdf")
Close the PDF document.
document.Close(True)
GetBoundsInternal()
Returns a rectangle that bounds this element.
protected abstract RectangleF GetBoundsInternal()
Returns
- RectangleF
Returns a rectangle that bounds this element.
Remarks
This method doesn't take into consideration a rotation of the element.
Layout(PdfLayoutParams)
Layouts the element.
protected override PdfLayoutResult Layout(PdfLayoutParams param)
Parameters
param
PdfLayoutParamsLay outing parameters.
Returns
- PdfLayoutResult
Returns lay outing results.