DynaPDF Manual - Page 580

Previous Page 579   Index   Next Page 581

Function Reference
Page 580 of 787
// Discard the path
// Close the path with a straight line segment
A normal path is not part of the graphics state. Once a path was drawn it must be deleted.
The TClipPath callback function supports the same modes than TClosePath but the required actions
that must be executed are different. A clipping path is part of the graphics state. If the graphics state
contains already a clipping path, the existing path must be intersected with new one. The resulting
clipping path must then be stored in the graphics state.
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.
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.

Previous topic: Helper functions, Vector Graphics

Next topic: PlaceSigFieldValidateIcon

Start Chat