Class PdfFillElement
Represents an element to fill
Inheritance
System.Object
PdfFillElement
Inherited Members
Namespace: Syncfusion.Pdf.Graphics
Assembly: Syncfusion.Pdf.NET.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 |
---|
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)