DynaPDF Manual - Page 88

Previous Page 87   Index   Next Page 89

Transparency
Page 88 of 818
switch(Mode)
{
case bmNormal:
pdfWriteText(PDF, x, y, " Normal"); break;
case bmColor:
pdfWriteText(PDF, x, y, " Color");
break;
case bmColorBurn:
pdfWriteText(PDF, x, y, "ColorBurn");
break;
case bmColorDodge: pdfWriteText(PDF, x, y, "ColorDodge"); break;
case bmDarken:
pdfWriteText(PDF, x, y, " Darken"); break;
case bmDifference: pdfWriteText(PDF, x, y, "Difference"); break;
case bmExclusion: pdfWriteText(PDF, x, y, "Exclusion"); break;
case bmHardLight: pdfWriteText(PDF, x, y, "HardLight"); break;
case bmHue:
pdfWriteText(PDF, x, y, "
Hue");
break;
case bmLighten:
pdfWriteText(PDF, x, y, " Lighten");
break;
case bmLuminosity: pdfWriteText(PDF, x, y, "Luminosity"); break;
case bmMultiply: pdfWriteText(PDF, x, y, " Multiply"); break;
case bmOverlay:
pdfWriteText(PDF, x, y, " Overlay"); break;
case bmSaturation: pdfWriteText(PDF, x, y, "Saturation"); break;
case bmScreen:
pdfWriteText(PDF, x, y, " Screen");
break;
case bmSoftLight:
pdfWriteText(PDF, x, y, "SoftLight");
break;
}
x -= 30.0;
y += 20.0;
SI32 gs = pdfCreateExtGState(PDF, &ExtGS);
pdfSetExtGState(PDF, gs);
pdfPlaceTemplate(PDF, Templ, x, y, 0.0, 0.0);
x += 120.0f;
if (x > 500.0)
{
x
= 70.0;
y += 120.0;
}
}
void TestBlendModes(void)
{
void* pdf = pdfNewPDF();
if (!pdf) return -1; // Out of memory
pdfSetOnErrorProc(pdf, NULL, PDFError);
pdfCreateNewPDF(pdf, "test.pdf");
pdfSetPageCoords(pdf, pcTopDown);
pdfSetColorSpace(pdf, csDeviceRGB);
TPDFExtGState gs, def;
pdfInitExtGState(&gs);
pdfInitExtGState(&def);
 

Previous topic: Blend Modes

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


Start Chat