ImageEn, unit imageenio

TImageEnIO.PrintImagePos

TImageEnIO.PrintImagePos


Declaration

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


Description

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

Note:
You do not need to call Printer.BeginDoc/Printer.EndDoc unless you want to print a batch of images. However if you specify a custom PrtCanvas you MUST call Printer.BeginDoc/Printer.EndDoc)
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
If you are printing a PDF, you should use Print


Example

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

// 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)
ImageEnView1.IO.PrintImagePos( 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