DynaPDF Manual - Page 90

Previous Page 89   Index   Next Page 91

Transparency
Page 90 of 839
def.BlendMode = bmNormal;
SI32 defGS = pdfCreateExtGState(pdf, &def);
double x = 70.0;
double y = 110.0;
SI32 tmpl = pdfBeginTemplate(pdf, 105.0, 90.0);
pdfSetFillColor(pdf, pdf_RGB(255, 0, 0));
pdfDrawCircle(pdf, 30.0, 30.0, 30.0, fmFill);
pdfSetFillColor(pdf, pdf_RGB(0, 255, 0));
pdfDrawCircle(pdf, 75.0, 30.0, 30.0, fmFill);
pdfSetFillColor(pdf, pdf_RGB(0, 0, 255));
pdfDrawCircle(pdf, 52.5, 60.0, 30.0, fmFill);
pdfEndTemplate(pdf);
pdfAppend(pdf);
pdfSetFont(PDF, "Helvetica", fsBold, 20.0, false, cp1252);
pdfWriteFTextEx(PDF, 50.0, 50.0, pdfGetPageWidth(PDF)-100.0, -1.0,
taCenter, "Blend Modes");
pdfSetFont(PDF, "Helvetica", fsRegular, 10.0, false, cp1252);
AddCircles(pdf, tmpl, gs, defGS, bmNormal, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmColorBurn, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmColorDodge, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmDarken, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmDifference, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmExclusion, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmHardLight, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmHue, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmLighten, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmLuminosity, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmMultiply, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmOverlay, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmSaturation, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmScreen, x, y);
AddCircles(pdf, tmpl, gs, defGS, bmSoftLight, x, y);
pdfEndPage(pdf);
pdfCloseFile(pdf);
pdfDeletePDF(pdf);
}
 

Previous topic: Blend Modes

Next topic: Tables, General properties, Error Handling, Borders, Cell Spacing, Cell Padding