CaptureRegion

Viewer interaction, rendering and printing

Description

Renders the given client-pixel region, including pages, background and persistent highlights, into a new 32 bpp bitmap the caller owns; this is the engine behind the vmSnapshot viewer mode and it also works headlessly

The rectangle is normalised, swapped when inverted and widened to at least one pixel, and the region's top-left maps to bitmap position 0, 0 relative to the current scroll position

Syntax

Delphi

Function TPDFlibViewer.CaptureRegion(Const Region: TRect): TBitmap;

Parameters

RegionRectangle in client pixels describing the area to render

Return values

TBitmapA new bitmap of the requested size, prefilled with the control colour; the caller must free it

See also

TPDFlibViewer, CaptureCurrentView, AddHighlightRegion, HighlightFormFields