FitImage

Image handling, Page layout

Description

This function allows an image to be placed into an area on the page. The aspect ratio of the image is preserved, and the alignment and rotation of the image can be specified.

Syntax

Delphi

function TPDFlib.FitImage(Left, Top, Width, Height: Double; HAlign, VAlign, Rotate: Integer): Integer;

ActiveX

Function PDFlib::FitImage(Left As Double, Top As Double, Width As Double, Height As Double, HAlign As Long, VAlign As Long, Rotate As Long) As Long

DLL

int DLFitImage(int InstanceID, double Left, double Top, double Width, double Height, int HAlign, int VAlign, int Rotate);

Parameters

LeftThe horizontal co-ordinate of the left-edge of the bounding box
TopThe vertical co-ordinate of the top-edge of the bounding box
WidthThe width of the bounding box The height of the bounding box
Height
HAlignHorizontal alignment of the image within the bounding box: 0 = Left 1 = Center 2 = Right
VAlignVertical alignment of the image within the bounding box: 0 = Top 1 = Center 2 = Bottom
RotateThe rotation of the image: 0 = Normal 1 = 90 degrees anti-clockwise 2 = 90 degrees clockwise 3 = 180 degrees

Return values

0The image could not be drawn. Either a valid image has not been selected or the HAlign, VAlign or Rotate parameters are out of range.
1The image was drawn successfully