Xamarin.Android

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

    Show / Hide Table of Contents

    Class PdfFillElement

    Represents an element to fill

    Inheritance
    System.Object
    PdfGraphicsElement
    PdfLayoutElement
    PdfShapeElement
    PdfDrawElement
    PdfFillElement
    PdfPath
    PdfPolygon
    PdfRectangleArea
    Inherited Members
    PdfDrawElement.Pen
    PdfShapeElement.GetBounds()
    PdfShapeElement.Layout(PdfLayoutParams)
    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 PdfFillElement : PdfDrawElement
    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(PdfBrushes.Red, 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(PdfBrushes.Red, 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

    PdfFillElement()

    Initializes a new instance of the PdfFillElement class.

    Declaration
    protected PdfFillElement()

    PdfFillElement(PdfBrush)

    Initializes a new instance of the PdfFillElement class.

    Declaration
    protected PdfFillElement(PdfBrush brush)
    Parameters
    Type Name Description
    PdfBrush brush

    The brush.

    PdfFillElement(PdfPen)

    Initializes a new instance of the PdfFillElement class.

    Declaration
    protected PdfFillElement(PdfPen pen)
    Parameters
    Type Name Description
    PdfPen pen

    The pen.

    PdfFillElement(PdfPen, PdfBrush)

    Initializes a new instance of the PdfFillElement class.

    Declaration
    protected PdfFillElement(PdfPen pen, PdfBrush brush)
    Parameters
    Type Name Description
    PdfPen pen

    The pen.

    PdfBrush brush

    The brush.

    Properties

    Brush

    Gets or sets the brush of the element

    Declaration
    public PdfBrush Brush { get; set; }
    Property Value
    Type Description
    PdfBrush
    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);
    //Set PDF solid brush.
    rect.Brush = new PdfSolidBrush(Color.Green);
    //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)
    'Set PDF solid brush.
    rect.Brush = New PdfSolidBrush(Color.Green)
    '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)
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved