Debenu Quick PDF logo

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 TDebenuPDFLibrary1811.FitImage(Left, Top, Width, Height: Double; HAlign, 
  VAlign, Rotate: Integer): Integer;

ActiveX

Function DebenuPDFLibrary1811.PDFLibrary::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 DPLFitImage(int InstanceID, double Left, double Top, double Width,
  double Height, int HAlign, int VAlign, int Rotate)

Parameters

Left The horizontal co-ordinate of the left-edge of the bounding box
Top The vertical co-ordinate of the top-edge of the bounding box
Width The width of the bounding box
Height The height of the bounding box
HAlign Horizontal alignment of the image within the bounding box:
0 = Left
1 = Center
2 = Right
VAlign Vertical alignment of the image within the bounding box:
0 = Top
1 = Center
2 = Bottom
Rotate The rotation of the image:
0 = Normal
1 = 90 degrees anti-clockwise
2 = 90 degrees clockwise
3 = 180 degrees

Return values

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

Copyright © 2020 Debenu. All rights reserved. AboutContactBlogNewsletterSupport