DynaPDF Manual - Page 164

Previous Page 163   Index   Next Page 165

Function Reference
Page 164 of 839
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