22.03.2015 Views

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

12.12 <strong>DLI</strong> <strong>Implementation</strong> <strong>and</strong> <strong>Reference</strong> <strong>Guide</strong><br />

Indexed<br />

Indexed color spaces are most often used in images, but are by no means limited to<br />

Concepts <strong>and</strong> Facilities: <strong>Guide</strong> to the DL Pager Composition System<br />

images.<br />

An indexed color space first selects a device color space in which it will be rendered.<br />

This must be DeviceRGB, DeviceGray, DeviceCMYK, DeviceN or ICCBased.<br />

It then supplies an array of from 1 to n entries, each entry having the value of a color<br />

in the selected model. (For DeviceGray, there would be one entry per color; for<br />

DeviceRGB, three; <strong>and</strong> so on).<br />

Color is specified as a single channel, which must be an integer between zero <strong>and</strong> n-1.<br />

This value is used as an index to the array of colors, <strong>and</strong> the selected entry is imaged<br />

in the underlying color space.<br />

This color space cannot be created with PDEColorSpaceCreateFromName. When<br />

created with PDEColorSpaceCreate, its atom is Indexed <strong>and</strong> the color structure<br />

must be a PDEIndexedColorData.<br />

Patterned<br />

A patterned color space is not really a color space at all. Rather, it is an image which<br />

will fill or stroke an area or line. It may contain colors of its own, or it may be a<br />

black-<strong>and</strong>-white image which is colored per the underlying color space.<br />

Any valid PDF marking comm<strong>and</strong>s may be used to construct the pattern image. The<br />

image itself is constructed as a rectangular space, which is overlaid on the area being<br />

filled or stroked. Specification of how far apart each tile is to be placed (horizontally<br />

<strong>and</strong> vertically) permits the appearance of non-rectangular areas.<br />

<strong>DLI</strong> contains an interface (dlpdfpatterncreate) which will accept a container<br />

<strong>and</strong> convert it into a patterned color space. This space may then be used within a<br />

container via the interface’s dlpdfcontentusefillpattern or<br />

dlpdfcontentusestrokepattern methods.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!