<< Click to Display Table of Contents >> PictureKeepAspect |
Setting this mode on/off determines whether a scaled picture shall be distorted or not, when the x OR y dimension is calculated automatically. This makes sense, if only ONE parameter of a Picture-Method is VFREE: x2 OR y2. If both are VFREE, the image is always undistorted.
property boolean VPE.PictureKeepAspect
write; runtime only; also supported by TVPEObject
Possible Values:
Value |
Description |
True |
on (pictures will be scaled undistorted) |
False |
Off |
Default:
True
Example:
Doc.PictureKeepAspect = True
Doc.Picture(1, 1, -5, VFREE, "image1.tif")
In the example, the width of the image will be 5cm. If the image had an original size of 15 x 21 cm, the width is now 1/3 of the original size. Because PictureKeepAspect is True, VPE will compute the height to the same aspect ratio = 1/3 of the original height, which would then be 7 cm.
Note: the above example assumes that the resolution of the image is the same for the width and the height. Otherwise the computations performed by VPE are slightly more difficult.
"Pictures" in the Programmer's Manual