Enum PdfFillMode
- Namespace
- Syncfusion.Pdf.Graphics
- Assembly
- Syncfusion.Pdf.Portable.dll
Specifies how the shapes are filled.
public enum PdfFillMode
Fields
Alternate = 1
Even odd rule of determining "insideness" of point.
Winding = 0
Nonzero winding number rule of determining "insideness" of point.
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)