Xamarin.Android

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfShapeElement

    Show / Hide Table of Contents

    Class PdfShapeElement

    Base class for the main shapes.

    Inheritance
    System.Object
    PdfGraphicsElement
    PdfLayoutElement
    PdfShapeElement
    PdfDrawElement
    PdfImage
    PdfTemplate
    Inherited Members
    PdfLayoutElement.add_EndPageLayout(EndPageLayoutEventHandler)
    PdfLayoutElement.remove_EndPageLayout(EndPageLayoutEventHandler)
    PdfLayoutElement.add_BeginPageLayout(BeginPageLayoutEventHandler)
    PdfLayoutElement.remove_BeginPageLayout(BeginPageLayoutEventHandler)
    PdfLayoutElement.Draw(PdfPage, PointF)
    PdfLayoutElement.Draw(PdfPage, Single, Single)
    PdfLayoutElement.Draw(PdfPage, RectangleF)
    PdfLayoutElement.Draw(PdfPage, PointF, PdfLayoutFormat)
    PdfLayoutElement.Draw(PdfPage, Single, Single, PdfLayoutFormat)
    PdfLayoutElement.Draw(PdfPage, RectangleF, PdfLayoutFormat)
    PdfLayoutElement.Layout(HtmlToPdfLayoutParams)
    PdfLayoutElement.PdfTag
    PdfLayoutElement.EndPageLayout
    PdfLayoutElement.BeginPageLayout
    PdfGraphicsElement.Draw(PdfGraphics)
    PdfGraphicsElement.Draw(PdfGraphics, PointF)
    PdfGraphicsElement.Draw(PdfGraphics, Single, Single)
    Namespace: Syncfusion.Pdf.Graphics
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public abstract class PdfShapeElement : PdfLayoutElement
    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()

    Declaration
    protected PdfShapeElement()

    Methods

    GetBounds()

    Gets the bounds.

    Declaration
    public RectangleF GetBounds()
    Returns
    Type Description
    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)

    Layout(PdfLayoutParams)

    Layouts the element.

    Declaration
    protected override PdfLayoutResult Layout(PdfLayoutParams param)
    Parameters
    Type Name Description
    PdfLayoutParams param

    Lay outing parameters.

    Returns
    Type Description
    PdfLayoutResult

    Returns lay outing results.

    Overrides
    PdfLayoutElement.Layout(PdfLayoutParams)
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved