ImageEn, unit iemio

TImageEnMIO.PreviewPrintImages

TImageEnMIO.PreviewPrintImages


Declaration


procedure PreviewPrintImages(DestBitmap: TBitmap; MaxBitmapWidth, MaxBitmapHeight: integer; PrinterObj: TPrinter; Columns: integer; Rows: integer; HorizSpace: double; VertSpace: double; PrintSelected: boolean; MarginLeft: double; MarginTop: double; MarginRight: double; MarginBottom: double; DrawBox: boolean; DrawText: boolean; DrawShadow: boolean; BoxColor: TColor = clBlack; const Heading: string = ''; HeadingHeight: Integer = 5; HeadingColor: TColor = clBlack; iPageNo : Integer = 0);


Description


Display a preview of printing of images (all or just selected) in the attached TImageEnMView or TIEMultiBitmap as rows and columns of thumbnails.

Parameter Description
DestBitmap Destination bitmap where to paint the preview. Resizes DestBitmap as needed.
MaxBitmapWidth Maximum destination bitmap width (in pixels). Preview will be stretched to match this size.
MaxBitmapHeight Maximum destination bitmap height (in pixels). Preview will be stretched to match this size.
Printer This is the Printer object. PreviewPrintImage needs it for such printer settings as orientation or page sizes.
Columns Specifies how arrange images, specifying the number of columns.
Rows Specifies how arrange images, specifying the number of rows.
HorizSpace The horizontal space in inches between images.
VertSpace The vertical space in inches between images.
PrintSelected Set to true to print only selected images.
MarginLeft Page left margin in inches. By specifying all zero values, no margins are used.
MarginTop Page top margin in inches. By specifying all zero values, no margins are used.
MarginRight Page right margin in inches. By specifying all zero values, no margins are used.
MarginBottom Page bottom margin in inches. By specifying all zero values, no margins are used.
DrawBox Set to true to draw a box around the images (image space). Image is always stretched to maintain aspect ratio.
DrawText Set to true to draw text associated with every image.
DrawShadow Set to true to draw a shadow around the image.
BoxColor Specifies the color of the box around the image if DrawBox is True.
Heading Specifies the heading to print at the top of the page. If you append### (e.g. 'Thumbnails ###') it will append "Page x" to printed pages after the first one.
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.
iPageNo The page of thumbnails to preview. 0 shows the first page, 1 the second, etc.


Note: Use the OnPrintPage or OnPrintPage event to customize the heading of the printed page


Example


// Paint and display the preview of thumbnails of the ImageEnMView using a TImageEnView component
ImageEnMView1.MIO.PreviewPrintImages(ImageEnView2.IEBitmap.VclBitmap, ImageEnView2.Width, ImageEnView2.Height, Printer, 6, 4, ...);


See Also


- DoPrintPreviewDialog
- PrintImages
- PrintImagesToBitmap
- PrintImagesToFile
- OnPrintPage