ImageEn, unit iemio

TImageEnMIO.PrintImagePos

TImageEnMIO.PrintImagePos


Declaration


procedure PrintImagePos(ImageIndex: integer; PrtCanvas: TCanvas; x, y: double; Width, Height: double; GammaCorrection: double = 1.0; PrintAnnotations: boolean = False);


Description


Print the specified image at an absolute position and size.

Parameter Description
ImageIndex Index of the page/image to print (0 = first image). IEM_SELECTED_IMAGES can be specified for ImageIndex to print all images that the user has selected in the TImageEnMView or IEM_ALL_IMAGES to print all images in the TImageEnMView
PrtCanvas The printing canvas. Specify nil to use the Printer.Canvas
x Left position to print image (in inches)
y Top position to print image (in inches)
Width Width to print image (in inches)
Height Height to print image (in inches)
GammaCorrection Level of gamma correction, use 1 to disable gamma correction
PrintAnnotations If true and the image contains imaging or ImageEn annotations they will be printed


Note:
- PrintImagePos does not support OnPrintPage
- By default, Width or Height will be adjusted to maintain the image's aspect ratio. Set PrintingMaintainAR to false to prevent this


Example


// print the image first page at the position 2, 2 and height 10 and width 10 (stretch the image)
Printer.Title := 'ImageEn';
Printer.BeginDoc;
ImageEnMView1.MIO.PrintImagePos(0, Printer.Canvas, 2, 2, 10, 10, 1);
Printer.EndDoc;


Compatibility Information


Prior to v8.0.0, if you specified a width and height for PrintImagePos it would not adjust the output to ensure the image aspect ratio was maintained (i.e. image may print stretched). With 8.0.0, the aspect ratio is maintained by default. To restore the older functionality, set ImageEnMView1.MIO.PrintingMaintainAR := False;


See Also


- DoPrintPreviewDialog
- PrintImage