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.

<strong>DLI</strong> <strong>Reference</strong> <strong>Guide</strong> A.19<br />

dlpdfcontentreferenceimage (DLPDFCONTENT *Content,<br />

DLPDFIMAGE *Image, ASFixed X, ASFixed Y, ASFixed Rotate,<br />

ASFixed ScaleX, ASFixed ScaleY)<br />

Return Value: void<br />

Description<br />

Parameters<br />

Return Value<br />

This procedure places a copy of the referenced image into the<br />

current content.<br />

• DLPDFCONTENT *Content: Represents the content<br />

element. These structures are destroyed when associated<br />

with a page or form, <strong>and</strong> pointers to them should not be<br />

used after that time.<br />

• DLPDFIMAGE *Image<br />

• ASFixed X: The X-axis location of the rotation point<br />

• ASFixed Y: The Y-axis location of the rotation point<br />

• ASFixed Rotate: Amount of counterclockwise rotation in<br />

degrees<br />

• ASFixed ScaleX: X-axis Scale Factor<br />

• ASFixed ScaleY: Y-axis Scale Factor<br />

void<br />

Exceptions<br />

Header<br />

Related Methods<br />

Availability<br />

dli.h<br />

dlpdfimagegetsize (New in <strong>DLI</strong> v2.2.5)<br />

All <strong>DLI</strong>-supported platforms.<br />

Technical Notes<br />

1 The image will be placed so as to align its lower left h<strong>and</strong> corner with the given (X,Y) location, scaled<br />

as per ScaleX <strong>and</strong> ScaleY, <strong>and</strong> rotated as per Rotate.<br />

2 Image rotation, if any, always occurs about its origin, typically the lower-left corner of the image, <strong>and</strong><br />

the point of rotation is located by the given (X,Y) location.<br />

3 The Scale Factors will determine the resulting size of the image. You need to know the original image<br />

resolution <strong>and</strong> its intended size in order to determine whether a Scale Factor on either axis is required.<br />

In <strong>DLI</strong> v2.2.5 or higher, the dlpdfimagegetsize method can retrieve image sizing data for you,<br />

<strong>and</strong> dividing the intended print size by the file size for each dimension (delivered by<br />

dlpdfimagegetsize) will yield a Scale Factor ratio which dlpdfcontentreferenceimage uses<br />

to calculate the final output image size.<br />

4 The typical scaling calculation using values returned by dlpdfimagegetsize would be to divide the<br />

intended print size by the image size on each axis (e.g.<br />

"dlpdfcontentreferenceimage(Content, Image, Int32ToFixed(72),

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

Saved successfully!

Ooh no, something went wrong!