PrintRaw24BitBGRRect

Rendering and printing

Description

Prints a sub-rectangle of a raw 24-bit BGR buffer to a printer device context, preferring JPEG or PNG pass-through with a plain BitBlt fallback

The selected rectangle is copied row by row from the bottom-up buffer into a strip bitmap, compressed when the driver advertises support, and drawn at the destination position

Syntax

Delphi

Procedure PrintRaw24BitBGRRect(PrinterDevice: HDC; Data: Pointer; OffsetX, OffsetY, DataWidth, DataHeight, Left, Top, Width, Height: Integer;
  PrintMode: Integer);

Parameters

PrinterDeviceDevice context of the printer
DataPointer to a bottom-up 24-bit BGR buffer of DataWidth by DataHeight pixels
OffsetXOffset added to the horizontal destination position
OffsetYOffset added to the vertical destination position
DataWidthWidth of the full buffer in pixels
DataHeightHeight of the full buffer in pixels
LeftLeft edge of the source rectangle inside the buffer; the destination prints at Left + OffsetX
TopTop edge of the source rectangle inside the buffer; the destination prints at Top + OffsetY
WidthWidth of the source rectangle in pixels
HeightHeight of the source rectangle in pixels
PrintMode0 prefers JPEG pass-through and falls back to PNG, 1 uses PNG only, 2 or higher draws the strip uncompressed with BitBlt

Remarks

These helpers exist only on Windows; the non-Windows stubs report no support and print nothing

See also

PrintRaw24BitBGRData, PrinterJPEGCaps, PrinterPNGCaps, PrinterStretchDIBCaps