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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

10.16. <strong>DLI</strong> <strong>Implementation</strong> <strong>and</strong> <strong>Reference</strong> <strong>Guide</strong><br />

Matrix Translations<br />

The unity matrix ([1, 0, 0, 1, 0, 0]) causes a 1 unit movement in X to be a 1<br />

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

unit movement in X <strong>and</strong> a zero unit movement in Y; a 1 unit movement in Y becomes<br />

a 0 unit movement in X <strong>and</strong> a 1 unit movement in Y.<br />

More precisely:<br />

RealX = X * a + Y * c + h<br />

RealY = X * b + Y * d + v<br />

Hence:<br />

• the matrix [1 0 0 -1 0 0] will invert the figure drawn<br />

• the matrix [-1 0 0 1 0 0] will mirror-image the figure<br />

• the matrix [.707 .707 -.707 .707 0 0] will rotate it 45 degrees<br />

Image Translation<br />

Translation is the simple movement of the image, <strong>and</strong> is accomplished by modifying h<br />

<strong>and</strong>/or v. These values are interpreted in the un-transformed space. For more details,<br />

please see section 4.2.2, "Common Transformations," in the Portable Document<br />

Format <strong>Reference</strong> Manual.<br />

Image Rotation<br />

A matrix may be rotated by using the method dlpdfmatrixrotate. This method<br />

accepts a pointer to a matrix, <strong>and</strong> transforms it to accomplish a rotation of the<br />

specified angle (in degrees, as an ASFixed value, counter-clockwise).<br />

Image Shearing <strong>and</strong> Scaling<br />

Shearing of an image may be accomplished by modifying b or c only. Scaling may be<br />

accomplished by modifying a <strong>and</strong>/or d only.<br />

CAUTION: Be sure to scale before rotating, if you are doing both.

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

Saved successfully!

Ooh no, something went wrong!