Foxit PDF SDK
foxit.common.Renderer类 参考
类 foxit.common.Renderer 继承关系图:
foxit.common.Base

Public 类型

enum  ColorMode {
  ColorMode.e_ColorModeNormal = 0, ColorMode.e_ColorModeMappingGray = 1, ColorMode.e_ColorModeMapping = 2, ColorMode.e_ColorModeAlpha = 3,
  ColorMode.e_ColorModeForeground = 4
}
 渲染颜色模式的枚举。 更多...
 
enum  ColorModeForeground { ColorModeForeground.e_ColorModeForegroundText = 0x01, ColorModeForeground.e_ColorModeForegroundPath = 0x02, ColorModeForeground.e_ColorModeForegroundBlackText = 0x04, ColorModeForeground.e_ColorModeForegroundBlackPath = 0x08 }
 渲染前景颜色模式的枚举。 更多...
 
enum  ContentFlag {
  ContentFlag.e_RenderPage = 0x01, ContentFlag.e_RenderAnnot = 0x02, ContentFlag.e_RenderHighlight = 0x04, ContentFlag.e_RenderExceptHighlight = 0x08,
  ContentFlag.e_RenderScreen = 0x10
}
 渲染内容标志的枚举。 更多...
 

Public 成员函数

 Renderer (Bitmap bitmap, bool is_rgb_order)
 带位图的构造函数。 更多...
 
 Renderer (PrintDeviceSettingData print_param, string dest_file_path)
 用于打印的构造函数,带指定的打印设备设置数据。 更多...
 
 Renderer (System.IntPtr dc)
 带指定设备对象的构造函数。 更多...
 
 Renderer (System.IntPtr dc, string printer_driver_name)
 用于打印的构造函数,带指定的打印机设备对象和打印机驱动程序名称。 更多...
 
 Renderer (Renderer other)
 带另一个渲染器对象的构造函数。 更多...
 
void ClearClips ()
 清除通过函数 Renderer.SetClipRect 设置的裁剪矩形。 更多...
 
void EnableForPrint (bool is_render_for_print)
 设置标志来决定是否在打印模式下进行渲染。 更多...
 
bool IsEmpty ()
 检查当前对象是否为空。 更多...
 
bool RenderAnnot (Annot annot, Matrix2D matrix)
 渲染指定的注释。 更多...
 
bool RenderFormControls (PDFPage page, Matrix2D matrix)
 渲染表单控件。 更多...
 
bool RenderGraphicsObject (GraphicsObject graphics_object, PDFPage page, Matrix2D matrix)
 渲染图形对象。 更多...
 
void SetClearType (bool is_clear_type)
 设置标志来决定是否使用ClearType类似的反锯齿来渲染文本对象。 更多...
 
void SetClipPathFill (Path clip_path, Matrix2D matrix, FillMode fill_mode)
 使用填充区域设置裁剪路径。 更多...
 
void SetClipPathStroke (Path clip_path, Matrix2D matrix, GraphState graph_state)
 使用描边区域设置裁剪路径。 更多...
 
void SetClipRect (RectI clip_rect)
 设置将在后续渲染过程中使用的裁剪矩形。 更多...
 
void SetColorMode (Renderer.ColorMode color_mode)
 设置颜色模式。 更多...
 
void SetForceDownSample (bool is_to_force_down_sample)
 设置标志来决定是否对图像拉伸使用下采样。 更多...
 
void SetForceHalftone (bool is_to_force_halftone)
 设置标志来决定是否对图像拉伸使用半调。 更多...
 
void SetForegroundColor (uint foreground_color)
 当颜色模式为 foxit.common.Renderer.ColorMode.e_ColorModeForeground 时为文本、路径或两者设置前景颜色。 更多...
 
void SetForegroundColorMode (int foreground_color_mode)
 当颜色模式为 foxit.common.Renderer.ColorMode.e_ColorModeForeground 时设置渲染前景颜色模式。 更多...
 
void SetJPEGDownSample (bool is_jepg_down_sample)
 设置标志来决定是否对jpeg图像使用下采样。 更多...
 
void SetJPXDownSample (bool is_jpx_down_sample)
 设置标志来决定是否对jpx图像使用下采样。 更多...
 
void SetLayerContext (LayerContext layer_context)
 设置图层上下文到渲染上下文句柄。 更多...
 
void SetMappingModeColors (uint background_color, uint foreground_color)
 当颜色模式为 foxit.addon.ofd.OFDRenderer.ColorMode.e_ColorModeMappingGray foxit.addon.ofd.OFDRenderer.ColorMode.e_ColorModeMapping 时设置背景颜色和前景颜色。 更多...
 
void SetOverprint (bool is_to_enable_overprint)
 设置标志来决定是否启用叠印。 更多...
 
void SetPrintTextAsGraphic (bool is_to_print_text_graphic)
 设置标志来决定是否将文本打印为路径或位图。 更多...
 
void SetPrintTextAsImage (bool is_to_print_text_image)
 设置标志来决定是否将文本打印为图像。 更多...
 
void SetRenderAnnotAppearanceType (Annot.AppearanceType ap_type)
 设置注释的外观类型用于渲染。 更多...
 
void SetRenderAnnotsForThumbnail (bool is_render_annots_for_thumbnail)
 设置渲染标志来决定是否在缩略图模式下渲染注释。 更多...
 
void SetRenderContentFlags (int render_content_flags)
 设置渲染标志来决定渲染什么内容。 更多...
 
void SetRenderEnhanceThinLines (bool is_render_enhance_thin_lines)
 设置标志来决定是否增强细线。 更多...
 
void SetRenderFormField (bool is_render_formfield)
 设置标志来决定是否渲染表单字段(除签名字段外)。 更多...
 
void SetRenderImageAntiAliasing (bool is_render_image_antialiasing)
 设置标志来决定是否绘制图像反锯齿。 更多...
 
void SetRenderLayer (bool is_render_one_layer)
 设置标志来决定是否渲染一个图层或所有可用图层。 更多...
 
void SetRenderPathAntiAliasing (bool is_render_path_antialiasing)
 设置标志来决定是否绘制路径反锯齿。 更多...
 
void SetRenderPathFullCovered (bool is_render_path_full_covered)
 可应用于填充模式的特殊标志。 更多...
 
void SetRenderPathThinLine (bool is_render_path_thin_line)
 设置标志来决定是否将路径绘制为细线。 更多...
 
void SetRenderSignature (bool is_render_signature)
 设置标志来决定是否渲染签名。 更多...
 
void SetRenderSignatureState (bool is_render_signature_state)
 设置标志来决定是否在签名上绘制签名状态。 更多...
 
void SetRenderTextAntiAliasing (bool is_render_text_antialiasing)
 设置标志来决定是否绘制文本反锯齿。 更多...
 
void SetScreenDPIScale (float scale)
 设置用于渲染的屏幕DPI缩放因子。 更多...
 
Progressive StartQuickRender (PDFPage page, Matrix2D matrix, PauseCallback pause)
 开始快速渲染PDF页面,主要用于缩略图。 更多...
 
Progressive StartRender (PDFPage page, Matrix2D matrix, PauseCallback pause)
 开始渲染PDF页面。 更多...
 
Progressive StartRenderBitmap (Bitmap bitmap, Matrix2D matrix, RectI clip_rect, int interpolation, PauseCallback pause)
 开始渲染位图。 更多...
 
Progressive StartRenderBitmap (Bitmap bitmap, Matrix2D matrix, RectI clip_rect, int interpolation, int alpha, PauseCallback pause)
 开始渲染位图。 更多...
 
Progressive StartRenderReflowPage (ReflowPage reflow_page, Matrix2D matrix, PauseCallback pause)
 开始渲染重排页面。 更多...
 
Progressive StartRenderXFAPage (XFAPage xfa_page_view, Matrix2D matrix, bool is_highlight, PauseCallback pause)
 开始渲染XFA页面。 更多...
 

详细描述

PDF渲染器是一个图形引擎,用于将页面渲染到位图或平台设备上下文。 此类可以用位图或设备对象构造。它提供设置渲染选项/标志和执行渲染的函数。 在此类中,有几种渲染方法:

在Foxit PDF SDK中,窗口部件注释总是与表单字段和表单控件关联。对于如何渲染 窗口部件注释,这里是推荐的流程:

参见
foxit.pdf.interform.Filler

成员枚举类型说明

◆ ColorMode

渲染颜色模式的枚举。

此枚举的值应单独使用。

枚举值
e_ColorModeNormal 

正常颜色模式。

e_ColorModeMappingGray 

将灰阶:白色/黑色颜色值映射到背景/前景;其他颜色不变。

e_ColorModeMapping 

将颜色值映射到由背景颜色和前景颜色定义的颜色范围。

e_ColorModeAlpha 

仅输出alpha,忽略颜色。

e_ColorModeForeground 

自定义颜色模式。将颜色映射到前景。

◆ ColorModeForeground

渲染前景颜色模式的枚举。

此枚举的值可以单独使用或组合使用。

枚举值
e_ColorModeForegroundText 

如果设置,需要替换文本的颜色。

e_ColorModeForegroundPath 

如果设置,需要替换路径的颜色。

e_ColorModeForegroundBlackText 

如果设置,仅需要替换文本的黑色。

e_ColorModeForegroundBlackPath 

如果设置,仅需要替换路径的黑色。

◆ ContentFlag

渲染内容标志的枚举。

此枚举的值可以单独使用或组合使用。

枚举值
e_RenderPage 

如果设置,将渲染页面内容。

e_RenderAnnot 

如果设置,将渲染注释。

e_RenderHighlight 

如果设置,仅渲染高亮注释。

e_RenderExceptHighlight 

如果设置,将渲染除高亮外的所有注释。

e_RenderScreen 

如果设置,仅渲染屏幕注释。

构造及析构函数说明

◆ Renderer() [1/5]

foxit.common.Renderer.Renderer ( Bitmap  bitmap,
bool  is_rgb_order 
)
inline

带位图的构造函数。

输入位图被视为独立设备,渲染器渲染的所有内容 都将出现在位图中。

参数
[in]bitmap用于渲染的位图。用户应确保位图保持有效,直到 当前渲染器对象的生命周期结束。
[in]is_rgb_ordertrue 表示Foxit PDF SDK在渲染时需要使用RGB字节顺序 (红色在最低位)。
false 表示Foxit PDF SDK在渲染时需要使用BGR字节顺序 (蓝色在最低位)。

◆ Renderer() [2/5]

foxit.common.Renderer.Renderer ( PrintDeviceSettingData  print_param,
string  dest_file_path 
)
inline

用于打印的构造函数,带指定的打印设备设置数据。

渲染器渲染的所有内容将出现在PDF文件或PostScript文件中。 生成PS文件仅在Linux系统上支持。

参数
[in]print_param用于打印设备的设置数据。
[in]dest_file_path生成打印的PDF文件或PostScript文件的路径。如果此路径 是PDF文件路径,请确保Foxit PDF SDK已通过函数 common.Library.Initialize 使用包含 "Print2PDF"模块的密钥成功初始化。

◆ Renderer() [3/5]

foxit.common.Renderer.Renderer ( System.IntPtr  dc)
inline

带指定设备对象的构造函数。

渲染器渲染的所有内容将出现在输入设备对象中。

参数
[in]dcDC的句柄。

◆ Renderer() [4/5]

foxit.common.Renderer.Renderer ( System.IntPtr  dc,
string  printer_driver_name 
)
inline

用于打印的构造函数,带指定的打印机设备对象和打印机驱动程序名称。

渲染器渲染的所有内容都将出现在输入设备对象中。

参数
[in]dc用于打印的DC句柄。
[in]printer_driver_name打印机驱动程序名称。这应该表示有效的打印机驱动程序, 不应为空字符串。

◆ Renderer() [5/5]

foxit.common.Renderer.Renderer ( Renderer  other)
inline

带另一个渲染器对象的构造函数。

参数
[in]other另一个渲染器对象。

成员函数说明

◆ ClearClips()

void foxit.common.Renderer.ClearClips ( )
inline

清除通过函数 Renderer.SetClipRect 设置的裁剪矩形。

返回
无。

◆ EnableForPrint()

void foxit.common.Renderer.EnableForPrint ( bool  is_render_for_print)
inline

设置标志来决定是否在打印模式下进行渲染。

当当前渲染器用于打印时,请确保此渲染标志设置为预期值。 对于渲染注释,如果此标志设置为 true,Foxit PDF SDK将仅渲染 具有注释标志 foxit.pdf.annots.Annot.Flags.e_FlagPrint 的注释。
如果对当前渲染器对象尚未调用此函数,将使用默认值 false

参数
[in]is_render_for_printtrue 表示在打印模式下渲染,而 false 表示不在打印模式下渲染。
返回
无。

◆ IsEmpty()

bool foxit.common.Renderer.IsEmpty ( )
inline

检查当前对象是否为空。

当当前对象为空时,意味着当前对象无用。

返回
true 表示当前对象为空,而 false 表示非空。

◆ RenderAnnot()

bool foxit.common.Renderer.RenderAnnot ( Annot  annot,
Matrix2D  matrix 
)
inline

渲染指定的注释。

当调用此函数时,渲染标志(通过函数 Renderer.SetRenderContentFlags 设置 或默认设置)将被忽略。

参数
[in]annot要渲染的注释对象。如果输入的注释是弹出注释,此函数将 不渲染它并返回 false
[in]matrix用于渲染的变换矩阵,通常由函数 pdf.PDFPage.GetDisplayMatrix 返回。
返回
true 表示成功,而 false 表示失败。

◆ RenderFormControls()

bool foxit.common.Renderer.RenderFormControls ( PDFPage  page,
Matrix2D  matrix 
)
inline

渲染表单控件。

当调用此函数时,渲染标志(通过函数 Renderer.SetRenderContentFlags 设置或默认设置)将被忽略。

参数
[in]page有效的PDF页面。如果输入页面无效,此函数什么也不做并直接返回 false
[in]matrix用于渲染的变换矩阵,通常由函数 pdf.PDFPage.GetDisplayMatrix 返回。
返回
true 表示成功,而 false 表示失败。

◆ RenderGraphicsObject()

bool foxit.common.Renderer.RenderGraphicsObject ( GraphicsObject  graphics_object,
PDFPage  page,
Matrix2D  matrix 
)
inline

渲染图形对象。

当调用此函数时,渲染标志(通过函数 Renderer.SetRenderContentFlags 设置或默认设置)将被忽略。

参数
[in]graphics_object要渲染的有效PDF图形对象。
[in]page有效的PDF页面。参数 graphics_object 属于此PDF页面。
[in]matrix用于渲染的变换矩阵,通常由函数 pdf.PDFPage.GetDisplayMatrix 返回。
返回
true 表示成功,而 false 表示失败。

◆ SetClearType()

void foxit.common.Renderer.SetClearType ( bool  is_clear_type)
inline

设置标志来决定是否使用ClearType类似的反锯齿来渲染文本对象。

如果不调用此函数,将使用默认值 true

参数
[in]is_clear_typetrue 表示使用ClearType类似的反锯齿来渲染文本对象。 false 表示不使用ClearType类似的反锯齿来渲染文本对象。
返回
无。

◆ SetClipPathFill()

void foxit.common.Renderer.SetClipPathFill ( Path  clip_path,
Matrix2D  matrix,
FillMode  fill_mode 
)
inline

使用填充区域设置裁剪路径。

参数
[in]clip_path裁剪路径。
[in]matrix用于裁剪的变换矩阵。
[in]fill_mode填充模式。应该是值 或 。
返回
无。

◆ SetClipPathStroke()

void foxit.common.Renderer.SetClipPathStroke ( Path  clip_path,
Matrix2D  matrix,
GraphState  graph_state 
)
inline

使用描边区域设置裁剪路径。

参数
[in]clip_path裁剪路径。
[in]matrix用于裁剪的变换矩阵。
[in]graph_state有效的图形状态,用于画笔属性。如果为 null,Foxit PDF SDK将 使用默认构造函数的图形状态对象。默认值:null
返回
无。

◆ SetClipRect()

void foxit.common.Renderer.SetClipRect ( RectI  clip_rect)
inline

设置将在后续渲染过程中使用的裁剪矩形。

参数
[in]clip_rect裁剪矩形。如果为 null,表示在 后续渲染过程中不使用裁剪矩形。
返回
无。

◆ SetColorMode()

void foxit.common.Renderer.SetColorMode ( Renderer.ColorMode  color_mode)
inline

设置颜色模式。

如果不调用此函数,将使用默认值 foxit.addon.ofd.OFDRenderer.ColorMode.e_ColorModeNormal

参数
[in]color_mode颜色模式值。应该是以下值之一:
返回
无。

◆ SetForceDownSample()

void foxit.common.Renderer.SetForceDownSample ( bool  is_to_force_down_sample)
inline

设置标志来决定是否对图像拉伸使用下采样。

如果不调用此函数,将使用默认值 false

参数
[in]is_to_force_down_sampletrue 表示对图像拉伸使用下采样。 false 表示对图像拉伸不使用下采样。
返回
无。

◆ SetForceHalftone()

void foxit.common.Renderer.SetForceHalftone ( bool  is_to_force_halftone)
inline

设置标志来决定是否对图像拉伸使用半调。

如果不调用此函数,将使用默认值 false

参数
[in]is_to_force_halftonetrue 表示对图像拉伸使用半调。 false 表示对图像拉伸不使用半调。
返回
无。

◆ SetForegroundColor()

void foxit.common.Renderer.SetForegroundColor ( uint  foreground_color)
inline

当颜色模式为 foxit.common.Renderer.ColorMode.e_ColorModeForeground 时为文本、路径或两者设置前景颜色。

文本、路径或两者的前景颜色由函数 Renderer.SetForegroundColorMode 设置的前景颜色模式决定。

参数
[in]foreground_color文本、路径或两者的前景颜色。格式:0xAARRGGBB。
返回
无。

◆ SetForegroundColorMode()

void foxit.common.Renderer.SetForegroundColorMode ( int  foreground_color_mode)
inline

当颜色模式为 foxit.common.Renderer.ColorMode.e_ColorModeForeground 时设置渲染前景颜色模式。

如果不调用此函数,将使用默认值 (foxit.common.Renderer.ColorModeForeground.e_ColorModeForegroundText | foxit.common.Renderer.ColorModeForeground.e_ColorModeForegroundPath | foxit.common.Renderer.ColorModeForeground.e_ColorModeForegroundBlackText | foxit.common.Renderer.ColorModeForeground.e_ColorModeForegroundBlackPath )。

参数
[in]foreground_color_mode渲染前景颜色模式。请参考从 foxit.common.Renderer.ColorModeForeground.e_ColorModeForegroundText 开始的值,应该是这些值中的一个或 这些值的组合。
返回
无。

◆ SetJPEGDownSample()

void foxit.common.Renderer.SetJPEGDownSample ( bool  is_jepg_down_sample)
inline

设置标志来决定是否对jpeg图像使用下采样。

是否对jpeg图像使用下采样将影响PDF页面的渲染结果。 当成功调用当前函数时,用户应该在再次渲染PDF页面之前 为PDF页面(已至少渲染一次)调用函数 pdf.PDFPage.ClearRenderCache
如果不调用此函数,将使用默认值 true

参数
[in]is_jepg_down_sampletrue 表示对jpeg图像使用下采样。 false 表示对jpeg图像不使用下采样。
返回
无。

◆ SetJPXDownSample()

void foxit.common.Renderer.SetJPXDownSample ( bool  is_jpx_down_sample)
inline

设置标志来决定是否对jpx图像使用下采样。

是否对jpx图像使用下采样将影响PDF页面的渲染结果。 当成功调用当前函数时,用户应该在再次渲染PDF页面之前 为PDF页面(已至少渲染一次)调用函数 pdf.PDFPage.ClearRenderCache
如果不调用此函数,将使用默认值 true

参数
[in]is_jpx_down_sampletrue 表示对jpx图像使用下采样。 false 表示对jpx图像不使用下采样。
返回
无。

◆ SetLayerContext()

void foxit.common.Renderer.SetLayerContext ( LayerContext  layer_context)
inline

设置图层上下文到渲染上下文句柄。

为了在渲染上下文上渲染PDF页面内容时渲染一个图层, 用户应该调用此函数将图层上下文设置到渲染上下文。

参数
[in]layer_context图层上下文对象。
返回
无。

◆ SetMappingModeColors()

void foxit.common.Renderer.SetMappingModeColors ( uint  background_color,
uint  foreground_color 
)
inline

当颜色模式为 foxit.addon.ofd.OFDRenderer.ColorMode.e_ColorModeMappingGray foxit.addon.ofd.OFDRenderer.ColorMode.e_ColorModeMapping 时设置背景颜色和前景颜色。

参数
[in]background_color背景颜色。格式:0xAARRGGBB。
[in]foreground_color前景颜色。格式:0xAARRGGBB。
返回
无。

◆ SetOverprint()

void foxit.common.Renderer.SetOverprint ( bool  is_to_enable_overprint)
inline

设置标志来决定是否启用叠印。

参数
[in]is_to_enable_overprinttrue 表示启用叠印。 false 表示不启用叠印。 默认值: false.
返回
无。

◆ SetPrintTextAsGraphic()

void foxit.common.Renderer.SetPrintTextAsGraphic ( bool  is_to_print_text_graphic)
inline

设置标志来决定是否将文本打印为路径或位图。

当此标志为 true 时,Foxit PDF SDK将以不同方式渲染文本: 如果字体大小大于50,将文本打印为路径;否则,将文本打印为位图。
如果不调用此函数,将使用默认值 false

参数
[in]is_to_print_text_graphictrue 表示将文本打印为路径或位图。 false 表示不将文本打印为路径或位图。
返回
无。

◆ SetPrintTextAsImage()

void foxit.common.Renderer.SetPrintTextAsImage ( bool  is_to_print_text_image)
inline

设置标志来决定是否将文本打印为图像。

如果不调用此函数,将使用默认值 false

参数
[in]is_to_print_text_imagetrue 表示将文本打印为图像。 false 表示不将文本打印为图像。
返回
无。

◆ SetRenderAnnotAppearanceType()

void foxit.common.Renderer.SetRenderAnnotAppearanceType ( Annot.AppearanceType  ap_type)
inline

设置注释的外观类型用于渲染。

参数
[in]ap_type注释外观的类型。请参考从 foxit.pdf.annots.Annot.AppearanceType.e_AppearanceTypeNormal 开始的值,应该是这些值中的一个。
返回
无。

◆ SetRenderAnnotsForThumbnail()

void foxit.common.Renderer.SetRenderAnnotsForThumbnail ( bool  is_render_annots_for_thumbnail)
inline

设置渲染标志来决定是否在缩略图模式下渲染注释。

在缩略图模式下,注释的"NoZoom"和"NoRotate"标志将被忽略。 此渲染标志仅在使用标志 foxit.common.Renderer.ContentFlag.e_RenderAnnot 进行渲染或 调用函数 Renderer.RenderAnnot 时可用。关于设置标志 foxit.common.Renderer.ContentFlag.e_RenderAnnot 请参考函数 Renderer.SetRenderContentFlags
如果不调用此函数,当此渲染标志可用时将使用默认值 false

参数
[in]is_render_annots_for_thumbnailtrue 表示在缩略图模式下渲染注释。 false 表示不在缩略图模式下渲染注释。
返回
无。

◆ SetRenderContentFlags()

void foxit.common.Renderer.SetRenderContentFlags ( int  render_content_flags)
inline

设置渲染标志来决定渲染什么内容。

如果不调用此函数,将使用默认值 (foxit.common.Renderer.ContentFlag.e_RenderPage | foxit.common.Renderer.ContentFlag.e_RenderAnnot )。

参数
[in]render_content_flags渲染内容标志。请参考从 foxit.common.Renderer.ContentFlag.e_RenderPage 开始的值,应该是这些值中的一个或组合。 foxit.common.Renderer.ContentFlag.e_RenderHighlight 不能与 foxit.common.Renderer.ContentFlag.e_RenderExceptHighlight 组合。
返回
无。

◆ SetRenderEnhanceThinLines()

void foxit.common.Renderer.SetRenderEnhanceThinLines ( bool  is_render_enhance_thin_lines)
inline

设置标志来决定是否增强细线。

如果不调用此函数,将使用默认值 false

参数
[in]is_render_enhance_thin_linestrue 表示用更粗的路径绘制零宽度线条, 使它们比默认的单像素更可见。
false 表示用单像素宽度绘制零宽度线条。
返回
无。

◆ SetRenderFormField()

void foxit.common.Renderer.SetRenderFormField ( bool  is_render_formfield)
inline

设置标志来决定是否渲染表单字段(除签名字段外)。

如果不调用此函数,当此标志可用时将使用默认值 true

参数
[in]is_render_formfieldtrue 表示渲染表单字段(除签名字段外)。 false 表示不渲染表单字段(除签名字段外)。
返回
无。

◆ SetRenderImageAntiAliasing()

void foxit.common.Renderer.SetRenderImageAntiAliasing ( bool  is_render_image_antialiasing)
inline

设置标志来决定是否绘制图像反锯齿。

如果不调用此函数,将使用默认值 true

参数
[in]is_render_image_antialiasingtrue 表示绘制图像反锯齿,效果类似于 枚举类InterpolationFlag中定义的值。 false 表示绘制图像锯齿。
返回
无。

◆ SetRenderLayer()

void foxit.common.Renderer.SetRenderLayer ( bool  is_render_one_layer)
inline

设置标志来决定是否渲染一个图层或所有可用图层。

如果不调用此函数,当此标志可用时将使用默认值 true

参数
[in]is_render_one_layertrue 表示渲染一个图层。 false 表示渲染所有可用图层。
返回
无。

◆ SetRenderPathAntiAliasing()

void foxit.common.Renderer.SetRenderPathAntiAliasing ( bool  is_render_path_antialiasing)
inline

设置标志来决定是否绘制路径反锯齿。

如果不调用此函数,将使用默认值 true

参数
[in]is_render_path_antialiasingtrue 表示绘制路径反锯齿。 false 表示绘制路径锯齿。
返回
无。

◆ SetRenderPathFullCovered()

void foxit.common.Renderer.SetRenderPathFullCovered ( bool  is_render_path_full_covered)
inline

可应用于填充模式的特殊标志。

如果不调用此函数,将使用默认值 false

参数
[in]is_render_path_full_coveredtrue 表示路径部分覆盖的所有像素将被完全绘制,而 false 表示不这样做。
返回
无。

◆ SetRenderPathThinLine()

void foxit.common.Renderer.SetRenderPathThinLine ( bool  is_render_path_thin_line)
inline

设置标志来决定是否将路径绘制为细线。

如果不调用此函数,将使用默认值 false

参数
[in]is_render_path_thin_linetrue 表示将路径绘制为细线。 false 表示不将路径绘制为细线。
返回
无。

◆ SetRenderSignature()

void foxit.common.Renderer.SetRenderSignature ( bool  is_render_signature)
inline

设置标志来决定是否渲染签名。

如果不调用此函数,当此标志可用时将使用默认值 true

参数
[in]is_render_signaturetrue 表示渲染签名。 false 表示不渲染签名。
返回
无。

◆ SetRenderSignatureState()

void foxit.common.Renderer.SetRenderSignatureState ( bool  is_render_signature_state)
inline

设置标志来决定是否在签名上绘制签名状态。

如果不调用此函数,将使用默认值 true

参数
[in]is_render_signature_statetrue 表示在签名上绘制签名状态, 而 false 表示不绘制。

◆ SetRenderTextAntiAliasing()

void foxit.common.Renderer.SetRenderTextAntiAliasing ( bool  is_render_text_antialiasing)
inline

设置标志来决定是否绘制文本反锯齿。

如果不调用此函数,将使用默认值 true

参数
[in]is_render_text_antialiasingtrue 表示绘制文本反锯齿。 false 表示绘制文本锯齿。
返回
无。

◆ SetScreenDPIScale()

void foxit.common.Renderer.SetScreenDPIScale ( float  scale)
inline

设置用于渲染的屏幕DPI缩放因子。

设置屏幕DPI缩放比例以适应不同的DPI条件。 此值通常应匹配系统报告的缩放因子 (例如,显示设置中125缩放为1.25)以确保与物理显示特性 的正确渲染对齐。

参数
[in]scale当前屏幕DPI的缩放比例(1.0 = 100原生DPI,2.0 = 200等)。 必须大于0,通常应对应于系统推荐的缩放因子。
注解
目前,此屏幕DPI缩放因子仅影响注释。
返回
无。

◆ StartQuickRender()

Progressive foxit.common.Renderer.StartQuickRender ( PDFPage  page,
Matrix2D  matrix,
PauseCallback  pause 
)
inline

开始快速渲染PDF页面,主要用于缩略图。

此函数主要用于为缩略图渲染页面。 渲染的内容将不完整:即使通过函数 Renderer.SetRenderContentFlags 设置了标志 foxit.common.Renderer.ContentFlag.e_RenderAnnot ,所有注释都将被忽略; 文本内容将变得模糊并被像素点替代。
当页面具有复杂或大量内容时,这种快速渲染可能仍需要很长时间, 因此Foxit PDF SDK使用渐进式过程来完成。

参数
[in]page有效的PDF页面。应该已经被解析。
[in]matrix用于渲染的变换矩阵,通常由函数 pdf.PDFPage.GetDisplayMatrix 返回。
[in]pause暂停回调对象,决定渲染过程是否需要暂停。 可以为 null,表示在渲染过程中不暂停。 如果不为 null,应该是用户实现的有效暂停对象。 默认值:null
返回
渐进对象。请通过函数 Progressive.GetRateOfProgress 检查当前进度的速率。 如果速率尚未达到100,调用函数 Progressive.Continue 继续进度直到进度完成。

◆ StartRender()

Progressive foxit.common.Renderer.StartRender ( PDFPage  page,
Matrix2D  matrix,
PauseCallback  pause 
)
inline

开始渲染PDF页面。

渲染具有复杂或大量内容的PDF页面可能需要很长时间,因此Foxit PDF SDK使用 渐进式过程来完成。
在Foxit PDF SDK中,窗体注释总是与表单字段和表单控件关联。对于如何 渲染窗体注释,推荐流程如下:

参数
[in]page有效的PDF页面。如果只渲染注释(即只通过函数 Renderer.SetRenderContentFlags 设置了 foxit.common.Renderer.ContentFlag.e_RenderAnnot ),则无需解析输入页面; 否则输入页面应该已经被解析。
[in]matrix用于渲染的变换矩阵,通常由函数 pdf.PDFPage.GetDisplayMatrix 返回。
[in]pause暂停回调对象,决定渲染过程是否需要暂停。 可以为 null,表示在渲染过程中不暂停。 如果不为 null,应该是用户实现的有效暂停对象。 默认值:null
返回
渐进式对象。请通过函数 Progressive.GetRateOfProgress 检查当前进度的比率。如果比率还不是100,调用函数 Progressive.Continue 继续进度直到进度完成。

◆ StartRenderBitmap() [1/2]

Progressive foxit.common.Renderer.StartRenderBitmap ( Bitmap  bitmap,
Matrix2D  matrix,
RectI  clip_rect,
int  interpolation,
PauseCallback  pause 
)
inline

开始渲染位图。

渲染具有复杂或大量内容的位图可能需要很长时间,因此Foxit PDF SDK使用 渐进式过程来完成。

参数
[in]bitmap有效的位图。用户应确保位图在 当前渲染过程完成之前保持有效。
[in]matrix用于渲染的变换矩阵。此矩阵用作图像矩阵:
假设 h 是图像高度,w 是图像宽度,那么矩阵 [w 0 0 h 0 0] 将产生一个相同的图像。
[in]clip_rect渲染设备的裁剪矩形。可以为 null。 默认值:null
[in]interpolation位图插值标志。请参考从 foxit.common.Bitmap.InterpolationFlag.e_Downsample 开始的值,可以是这些值中的一个或组合。 如果不指定任何标志,请使用0。默认值:0。
[in]pause暂停回调对象,决定渲染过程是否需要暂停。 可以为 null,表示在渲染过程中不暂停。 如果不为 null,应该是用户实现的有效暂停对象。 默认值:null
返回
渐进对象。请通过函数 Progressive.GetRateOfProgress 检查当前进度的速率。 如果速率尚未达到100,调用函数 Progressive.Continue 继续进度直到进度完成。

◆ StartRenderBitmap() [2/2]

Progressive foxit.common.Renderer.StartRenderBitmap ( Bitmap  bitmap,
Matrix2D  matrix,
RectI  clip_rect,
int  interpolation,
int  alpha,
PauseCallback  pause 
)
inline

开始渲染位图。

渲染具有复杂或大量内容的位图可能需要很长时间,因此Foxit PDF SDK使用 渐进式过程来完成。

参数
[in]bitmap有效的位图。用户应确保位图在 当前渲染过程完成之前保持有效。
[in]matrix用于渲染的变换矩阵。此矩阵用作图像矩阵:
假设 h 是图像高度,w 是图像宽度,那么矩阵 [w 0 0 h 0 0] 将产生一个相同的图像。
[in]clip_rect渲染设备的裁剪矩形。可以为 null
[in]interpolation位图插值标志。请参考从 foxit.common.Bitmap.InterpolationFlag.e_Downsample 开始的值,可以是这些值中的一个或组合。 如果不指定任何标志,请使用0。
[in]alpha位图透明度值(0 = 完全透明,255 = 完全不透明)。 有效范围:从0到255。
[in]pause暂停回调对象,决定渲染过程是否需要暂停。 可以为 null,表示在渲染过程中不暂停。 如果不为 null,应该是用户实现的有效暂停对象。
返回
渐进对象。请通过函数 Progressive.GetRateOfProgress 检查当前进度的速率。 如果速率尚未达到100,调用函数 Progressive.Continue 继续进度直到进度完成。

◆ StartRenderReflowPage()

Progressive foxit.common.Renderer.StartRenderReflowPage ( ReflowPage  reflow_page,
Matrix2D  matrix,
PauseCallback  pause 
)
inline

开始渲染重排页面。

渲染具有复杂或大量内容的重排页面可能需要很长时间,因此Foxit PDF SDK使用 渐进式过程来完成。

参数
[in]reflow_page有效的重排页面。应该已经被解析。
[in]matrix用于渲染的变换矩阵,通常由函数 pdf.ReflowPage.GetDisplayMatrix 返回。
[in]pause暂停回调对象,决定渲染过程是否需要暂停。 可以为 null,表示在渲染过程中不暂停。 如果不为 null,应该是用户实现的有效暂停对象。 默认值:null
返回
渐进式对象。请通过函数 Progressive.GetRateOfProgress 检查当前进度的比率。如果比率还不是100,调用函数 Progressive.Continue 继续进度直到进度完成。

◆ StartRenderXFAPage()

Progressive foxit.common.Renderer.StartRenderXFAPage ( XFAPage  xfa_page_view,
Matrix2D  matrix,
bool  is_highlight,
PauseCallback  pause 
)
inline

开始渲染XFA页面。

渲染具有复杂或大量内容的XFA页面将需要很长时间,因此Foxit PDF SDK使用 渐进式过程来完成。

参数
[in]xfa_page_view有效的XFA页面。
[in]matrix用于渲染的变换矩阵,通常由函数 addon.xfa.XFAPage.GetDisplayMatrix 返回。
[in]is_highlighttrue 表示高亮XFA小部件,false 表示不高亮 XFA小部件。
[in]pause暂停回调对象,决定渲染过程是否需要暂停。 可以为 null,表示在渲染过程中不暂停。 如果不为 null,应该是用户实现的有效暂停对象。 默认值:null
返回
渐进对象。请通过函数 Progressive.GetRateOfProgress 检查当前进度的速率。 如果速率尚未达到100,调用函数 Progressive.Continue 继续进度直到进度完成。