menu

Document Processing

PdfFillMode Class - C# PDF Library API Reference | Syncfusion

    Show / Hide Table of Contents

    PdfFillMode Class

    Specifies how the shapes are filled.

    Inheritance
    System.Object
    PdfFillMode
    Namespace: Syncfusion.Pdf.Graphics
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public sealed class PdfFillMode : Enum
    Examples
    //Create a document.
    PdfDocument doc = new PdfDocument();
    //Add a new page.
    PdfPage page = doc.Pages.Add();
    //Create new PDF path.
    PdfPath path = new PdfPath();
    //Set the path fill mode.
    path.FillMode = PdfFillMode.Winding;
    //Add line path points.
    path.AddLine(new PointF(10, 100), new PointF(10, 200));
    path.AddLine(new PointF(100, 100), new PointF(100, 200));
    path.AddLine(new PointF(100, 200), new PointF(55, 150));
    //Draw PDF path to page.
    path.Draw(page, PointF.Empty);
    //Save and close the document.
    doc.Save("output.pdf");
    doc.Close(true);
    'Create a document.
    Dim doc As New PdfDocument()
    'Add a new page.
    Dim page As PdfPage = doc.Pages.Add()
    'Create new PDF path.
    Dim path As New PdfPath()
    'Set the path fill mode.
    path.FillMode = PdfFillMode.Winding;
    'Add line path points.
    path.AddLine(New PointF(10, 100), New PointF(10, 200))
    path.AddLine(New PointF(100, 100), New PointF(100, 200))
    path.AddLine(New PointF(100, 200), New PointF(55, 150))
    'Draw PDF path to page.
    path.Draw(page, PointF.Empty)
    'Save and close the document.
    doc.Save("output.pdf")
    doc.Close(True)

    Fields

    Alternate

    Even odd rule of determining "insideness" of point.

    Declaration
    public const PdfFillMode Alternate
    Field Value
    Type
    PdfFillMode

    Winding

    Nonzero winding number rule of determining "insideness" of point.

    Declaration
    public const PdfFillMode Winding
    Field Value
    Type
    PdfFillMode
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved