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
| PrinterDevice | Device context of the printer |
|---|---|
| Data | Pointer to a bottom-up 24-bit BGR buffer of DataWidth by DataHeight pixels |
| OffsetX | Offset added to the horizontal destination position |
| OffsetY | Offset added to the vertical destination position |
| DataWidth | Width of the full buffer in pixels |
| DataHeight | Height of the full buffer in pixels |
| Left | Left edge of the source rectangle inside the buffer; the destination prints at Left + OffsetX |
| Top | Top edge of the source rectangle inside the buffer; the destination prints at Top + OffsetY |
| Width | Width of the source rectangle in pixels |
| Height | Height of the source rectangle in pixels |
| PrintMode | 0 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