ImageEn, unit iexHelperFunctions

TIEBitmap.PrintImage

TIEBitmap.PrintImage


Declaration

procedure PrintImage(PrtCanvas: TCanvas = nil; MarginLeft: double = 1; MarginTop: double = 1; MarginRight: double = 1; MarginBottom: double = 1; VerticalPos: TIEVerticalPos = ievpCenter; HorizontalPos: TIEHorizontalPos = iehpCenter; Size: TIESize = iesFitToPage; SpecWidth: double = 0; SpecHeight: double = 0; GammaCorrection: double = 1; const Heading: string = ''; HeadingHeight: Integer = 5; HeadingColor: TColor = clBlack; SubsampleFilter: TResampleFilter = rfFastLinear);


Description

Print the current bitmap by specifying margins, vertical position, horizontal position and size.

Parameter Description
PrtCanvas The canvas to bring to. Generally the application will pass this as Printer.Canvas
MarginLeft Left page margin in inches (Specify zero for no margin)
MarginTop Top page margin in inches (Specify zero for no margin)
MarginRight Right page margin in inches (Specify zero for no margin)
MarginBottom Bottom page margin in inches (Specify zero for no margin)
VerticalPos How the image is vertically aligned on the page
HorizontalPos How the image horizontally aligned on the page
Size How the image should be sized for printing
SpecWidth The absolute width of the image in inches if Size = iesSpecifiedSize. The number of pages wide if Size = iesMultiplePages
SpecHeight The absolute height of the image in inches if Size = iesSpecifiedSize. The number of pages high if Size = iesMultiplePages
GammaCorrection The gamma correction value (Specify 1.0 to disable gamma correction)
Heading Specifies the heading to print at the top of the page.
HeadingHeight The height of the heading, as a PERCENTAGE of the overall page height, e.g. 5 will make the heading 5% of the page height.
HeadingColor Specifies the color of the heading text.
SubsampleFilter The filter that is used to enhance quality if hte image needs to be resampled for printing


Example

// Print the image in the center of the page at the original size
Printer.Title := 'Original Image';
ABitmap.PrintImage( 0, ievpCenter, iehpCenter, iesNormal, 0, 0, 1 );

// Print the image in the center of the page stretched to page dimensions (respecting the proportions)
Printer.Title := 'Stretched Image';
ABitmap.PrintImage( 0, ievpCenter, iehpCenter, iesFitToPage, 0, 0, 1 );

// Print the image as a poster, four pages wide and six pages high
Printer.Title := 'Poster';
ABitmap.PrintImage( 0, ievpCenter, iehpCenter, iesMultiplePages, 4, 6, 1 );