DynaPDF Manual - Page 72

Previous Page 71   Index   Next Page 73

Path Painting and Construction
Page 72 of 839
fmFillStrokeNoClose,
fmFill,
fmStroke,
fmFillStroke,
// Even-Odd Rule
fmFillEvOdd,
fmFillStrokeEvOdd,
fmFillEvOddNoClose,
fmFillStrokeEvOddNoClose,
fmNoFill,
// Special meaning see below
fmClose
// Close the path
}TPathFillMode;
The constant fmNoFill produces different results when using it with a function that produces a
closed shape like Rectangle(), Ellipse() and so on, or when using it with ClosePath() or
ClipPath().
Within ClipPath() the constant has the meaning, do neither fill or stroke the clipping path, just
create the clipping area.
Within ClosePath() the constant can be used to discard the previously drawn path. The path in
memory will be deleted and nothing will be written to the PDF file.
Within Rectangle(), Ellipse() and so on, the constant closes the path, the result is exactly the
same as if fmClose would be used.
Let us now take a look on the different path painting rules.
If we draw two rectangles in the same draw direction the result is different depending on the
used filling rule:
pdfSetFillColor(pdf, PDF_RGB(120, 120, 220));
pdfRectangle(pdf, 50.0, 50.0, 250.0, 100.0, fmNoFill);
pdfRectangle(pdf, 70.0, 70.0, 210.0, 60.0, fmNoFill);
pdfClosePath(pdf, fmFill); // Non-Zero Winding Number
Output:
Winding (fmFill):
Even Odd (fmFillEvOdd):
 

Previous topic: Even-Odd Rule

Next topic: Color Spaces, Device Color Spaces