Xojo Conferences
XDCMay2019MiamiUSA
MBSOct2019CologneDE

DynaPDF Manual - Page 66

Previous Page 65   Index   Next Page 67

Path Painting and Construction
Page 66 of 766
pdfSetOnErrorProc(pdf, NULL, (void*)PDFError);
pdfSetDocInfo(pdf, diAuthor, "Jens Boschulte");
pdfSetDocInfo(pdf, diCreator, "C sample project");
pdfSetDocInfo(pdf, diSubject, "How to use clipping paths");
pdfSetDocInfo(pdf, diTitle, "Clipping paths");
pdfSetViewerPreferences(pdf, vpDisplayDocTitle, avNone);
pdfCreateNewPDF(pdf, "c:/cppout.pdf");
pdfSetPageCoords(pdf, pcTopDown);
pdfAppend(pdf);
// Nonzero Winding Number Rule
DrawPath(pdf, 0, 0, cmWinding, ddCounterClockwise, PDF_SKYBLUE);
DrawPath(pdf, 110, 0, cmWinding, ddClockwise, PDF_SKYBLUE);
// Even Odd Rule
DrawPath(pdf, 220, 0, cmEvenOdd, ddCounterClockwise, PDF_YELLOW);
DrawPath(pdf, 330, 0, cmEvenOdd, ddClockwise, PDF_YELLOW);
pdfEndPage(pdf);
pdfCloseFile(pdf);
pdfDeletePDF(pdf);
}
Winding
Even-Odd
C P C P C P C P
A clipping path is part of the graphics state. The only way to disable a clipping path is to restore
the graphics state. If the graphics state was not saved beforehand it is impossible to deactivate
the clipping region.
If a second clipping path is drawn while another one is still active then it will be intersected
with the current clipping path. The clipping area of the intersected clipping paths is never larger
than the initial clipping path.
 

Previous topic: Even-Odd Rule

Next topic: Device Color Spaces