ImageEn, unit imageenio




procedure PrintImagePos(PrtCanvas: TCanvas; x, y: double; Width, Height: double; GammaCorrection: double = 1; PrintAnnotations: Boolean = False; PrintLayers: Boolean = False);


Prints the current image at a specified absolute position and size.

Parameter Description
PrtCanvas The canvas to bring to. Specify nil to use Printer.Canvas
x, y Top-left starting point in inches
Width, Height Printed image size in inches.
GammaCorrection The gamma correction value (Specify 1.0 to disable gamma correction)
PrintAnnotations If true and the image contains imaging or ImageEn annotations they will be printed
PrintLayers If true and the attached TImageEnView image contains multiple layers, they will be printed. If False, only the image (i.e. current layer) is printed

- 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


// Add Printers unit to your uses clause...

// print the image two inches from the top and left of the page, and at a width and height of 10 inches (the image will be stretched)
Printer.Title := 'Image';
ImageEnView1.IO.PrintImagePos( Printer.Canvas, 2, 2, 10, 10 );

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 ImageEnView1.IO.PrintingMaintainAR := False;

See Also

- PrintImagePos