Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

DynaPDF Manual - Page 139

Previous Page 138   Index   Next Page 140

Function Reference
Page 139 of 750
pdfSaveGraphicState(pdf);
pdfBeginClipPath(pdf);
pdfRectangle(pdf, 50, 90, 200, 30, fmNoFill);
pdfClipPath(pdf, cmWinding, fmFill);
sh = pdfCreateAxialShading(pdf, 0, 120, 0, 90, 1.5, PDF_WHITE,
PDF_BLUE, false, false);
pdfApplyShading(pdf, sh);
pdfRestoreGraphicState(pdf);
// The radial shading can be drawn outside of a clipping path
sh = pdfCreateRadialShading(pdf, 165, 70, 5, 150, 85, 35, 0.7,
PDF_BLUE, PDF_WHITE, true, false);
pdfApplyShading(pdf, sh);
pdfEndPage(pdf);
pdfCloseFile(pdf);
pdfDeletePDF(pdf);
}
Output:
 

Previous topic: ApplyShading

Next topic: AssociateEmbFile