THPDFLoadedPageRenderSession Class
Retains page render state and a live partial bitmap so a loaded page can be rendered over multiple bounded calls
声明
THPDFLoadedPageRenderSession = class(TObject)
public
function ContinueRender(MaxMilliseconds: Cardinal = 0;
MaxObjects: Integer = 0): THPDFProgressiveRenderStatus;
function TakeBitmap: TBitmap;
property Bitmap: TBitmap read GetBitmap;
property ObjectsProcessed: Integer read GetObjectsProcessed;
property TotalObjects: Integer read GetTotalObjects;
property ProgressiveJPEGScansDecoded: Integer
read GetProgressiveJPEGScansDecoded;
property ProgressiveJPEGImagesDecoded: Integer
read GetProgressiveJPEGImagesDecoded;
property Status: THPDFProgressiveRenderStatus read GetStatus;
property IsRegionRender: Boolean read FIsRegionRender;
property RegionLeft: Single read FRegionLeft;
property RegionBottom: Single read FRegionBottom;
property RegionRight: Single read FRegionRight;
property RegionTop: Single read FRegionTop;
property RegionVisiblePaintObjects: Integer
read GetRegionVisiblePaintObjects;
property RegionCulledPaintObjects: Integer
read GetRegionCulledPaintObjects;
property OnProgress: THPDFProgressiveRenderProgressEvent
read FOnProgress write SetOnProgress;
property OnProgressiveJPEGScan: THPDFProgressiveJPEGScanEvent
read FOnProgressiveJPEGScan write SetOnProgressiveJPEGScan;
end;
单元
HPDFDoc
Status values
prsReadymeans the page is initialised and no content operator has runprsPausedmeans a budget ended before all operators completedprsCompletedmeans the complete page bitmap is availableprsCancelledmeans the callback or token stopped the session at an operator boundary
使用说明
- Either budget can be zero for unlimited work, while both zero values run to a terminal state in one call
Bitmapremains owned by the session and is intended for read-only preview accessTakeBitmapis valid only in a terminal state and transfers ownership to the callerProgressiveJPEGScansDecoded和ProgressiveJPEGImagesDecodedcount successful incremental image work, whileOnProgressiveJPEGScancan cancel after a visible scanIsRegionRenderidentifies ROI sessions; the region properties retain the requested user-space bounds and the visible and culled counters describe display-list paint selection- The loaded
THotPDFinstance and cancellation token must remain alive until the session is freed