PDFiumPas 文件

RenderPageProgressiveWithColorScheme 方法

元件: TPdf  ·  單元: PDFium
可取消的漸進式渲染,並覆寫路徑與文字顏色以利低視力閱讀

Syntax

function RenderPageProgressiveWithColorScheme(Bitmap: TBitmap; Left, Top, Width, Height: Integer; const AToken: IPdfCancellationToken; const ColorScheme: TPdfColorScheme; Rotation: TRotation = ro0; Options: TRenderOptions = []; Background: TColor = clWhite): TPdfProgressiveStatus;

BitmapTBitmap。由呼叫端建立與釋放的目的地點陣圖
Left, TopInteger。點陣圖內開始渲染的左上角位移,以像素為單位
Width, HeightInteger。目的地區域的像素尺寸
ATokenIPdfCancellationToken。會在渲染區塊之間輪詢,讓冗長的渲染可在頁面中途中止。傳入 nil 則不暫停地渲染到完成
ColorSchemeTPdfColorScheme。替換顏色:PathFillColorPathStrokeColorTextFillColorTextStrokeColor
RotationTRotation。套用至頁面的顯示旋轉
OptionsTRenderOptions。渲染旗標
BackgroundTColor。渲染前填充點陣圖的顏色
ResultTPdfProgressiveStatus。頁面完成時為 prsDone;權杖中止且點陣圖保留部分結果時為 prsCancelled;PDFium 回報渲染失敗時為 prsFailed

Description

保留 RenderPageProgressive 的可取消迴圈,並加入顏色覆寫,讓高對比或反轉閱讀模式不必對渲染後的像素進行後處理

四個顏色分別套用至路徑填色、路徑描邊、文字填色與文字描邊;影像不會重新著色。TPdfColorScheme.Default 會回傳中性的起點,呼叫端可逐欄位調整

被取消的渲染會將迄今完成的工作保留在點陣圖中而非捨棄,讓檢視器能在使用者繼續捲動時顯示部分頁面

See Also

RenderPageProgressive, RenderPage, RenderPageBanded