Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 550

Previous Page 549   Index   Next Page 551

Function Reference
Page 550 of 750
If the path must also be filled or stroked, it is important to hold an unmodified version of the path in
memory so that the required path painting operation can be executed. The previously created
clipping region must of course be considered.
The mode fmNoFill has the meaning create the clipping region, but do not fill or stroke the path. So,
after the clipping region was created the path can be deleted from memory. This is the default
behavior. The combination of a path painting operator with a clipping path occurs seldom.
PlaceImage
Syntax:
LBOOL pdfPlaceImage(
const PPDF* IPDF,
// Instance pointer
SI32 ImgHandle,
// Image handle
double PosX,
// X-Coordinate of destination rectangle
double PosY,
// Y-Coordinate of destination rectangle
double ScaleWidth,
// Scaled width of destination rectangle
double ScaleHeight) // Scaled height of destination rectangle
Images can be used multiple times on different positions and with different sizes. This function
places an image onto a page or template that was already inserted beforehand by an image function.
The image can be placed in the same way as by every other image function. However, if the size of
the image will be changed, the image is not rescaled physically to the current resolution. Insert the
largest version of an image first to avoid up-scaling.
The width and height can be calculated as follows:
If ScaleWidth or ScaleHeight is -1 the function uses the original width or height from the image.
If both parameters are -1 the image will be inserted with a resolution 72 DPI.
If ScaleWidth or ScaleHeight is 0, the missing value is calculated in relation to the given value
of ScaleHeight or ScaleWidth to preserve the image's aspect ratio. The resulting output is an
image with exact proportions relative to its original size.
If ScaleWidth and ScaleHeight are 0, the original size is used (same effect as -1).
A negative value of Width or Height mirrors the image on the x- and or y-axis.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: Vector Graphics

Next topic: PlaceTemplate