Components for Developers
© 2000-2012, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
How to Create Gray Color Space in PDF and Draw Graphics Elements

Example
Collapse All

Example

C++

[copy to clipboard]
PM_DOCUMENT doc = PM_DOCUMENT_New();
PM_RECT rc = {0, 0, 600, 800};
PM_PAGE page = PM_DOCUMENT_AddPage(doc, rc);

PM_CANVAS canvas = PM_PAGE_GetCanvas(page);

for (int i = 0; i < 5; i++)
{
	// Gray [0.0;1.0] 
	PM_CANVAS_SetGrayColorFill(canvas, 0.2*i+0.2);
	PM_CANVAS_DrawCircle(canvas, 100 + 20*i, 100 + 20*i, 30);
	PM_CANVAS_FillAndStroke(canvas);
}

PM_DOCUMENT_Save(doc, "GrayColorSpace.pdf");
PM_DOCUMENT_Free(doc);

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2012, Two Pilots