PDFium Delphi Component 文件

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