<< Click to Display Table of Contents >> VpePicture |
Inserts a picture object into the document. For supported file formats, please see the chapter "Pictures" in the Programmer's Manual.
VpeCoord VpePicture(
VpeHandle hDoc,
VpeCoord x,
VpeCoord y,
VpeCoord x2,
VpeCoord y2,
LPCSTR file_name
)
VpeHandle hDoc
Document Handle
VpeCoord x, y, x2, y2
position and dimensions
Dimensions: if x2 is VFREE, it is computed automatically; if y2 is VFREE, it is computed automatically. Computations are performed based on the size of the image in pixels and its resolution information in DPI (see also the properties PictureKeepAspect and PictureBestFit).
LPCSTR file_name
The name of the file that shall be imported. VPE determines the file-type by the suffix (i.e. ".TIF" = TIFF, etc.) or by analyzing the file header - a full path is optional. (see also: VpeSetPictureType)
Returns:
the bottom coordinate (y2) of the inserted image
Remarks:
In case of an error, LastError is set.
The frame drawn around images can be made invisible by setting the PenSize to zero before importing the image.
We recommend to use the methods VpePicture() and VpePictureStream() only.
This guarantees platform independence.
VPE offers several methods to attach an object's position to margins and relative to the position of previously inserted objects. In addition Text, Rich Text and Picture objects are able to compute their dimensions automatically depending on their visual content.
For details please see "Dynamic Positioning" in the Programmer's Manual.
Example:
VpePicture(hDoc, 1, 1, VFREE, VFREE, "test.tif")
"Pictures" in the Programmer's Manual