Foxit PDF SDK
fs_render.h
浏览该文件的文档.
1 
15 #ifndef FS_RENDER_H_
16 #define FS_RENDER_H_
17 
18 #include "common/fs_common.h"
19 #include "common/fs_image.h"
20 #include "pdf/annots/fs_annot.h"
21 #include "pdf/fs_pdflayer.h"
22 #include "pdf/fs_reflowpage.h"
23 #ifndef _FX_NO_XFA_
24 #include "addon/xfa/fs_xfa.h"
25 #endif // #ifndef _FX_NO_XFA_
26 
27 #ifdef __APPLE__
28 #include <CoreGraphics/CoreGraphics.h>
29 #endif
30 
35 namespace foxit {
36 namespace pdf {
37 class PDFPage;
38 }
39 namespace ofd {
40 class OFDPage;
41 };
42 namespace fld {
43 class FLDPage;
44 };
48 namespace common {
54 class PrintDeviceSettingData FS_FINAL : public Object{
55  public:
61  typedef enum _OrientationFlag {
67 
86  , copies(copies){}
87 
95  : device_width(2479)
96  , device_height(3508)
98  , resolution(300)
99  , copies(1) {}
100 
107  : device_width(settings.device_width)
108  , device_height(settings.device_height)
109  , device_margin(settings.device_margin)
110  , orientation(settings.orientation)
111  , resolution(settings.resolution)
112  , copies(settings.copies) {}
113 
122  device_width = settings.device_width;
123  device_height = settings.device_height;
124  device_margin = settings.device_margin;
125  orientation = settings.orientation;
126  resolution = settings.resolution;
127  copies = settings.copies;
128  return *this;
129  }
130 
146  this->device_width = device_width;
147  this->device_height = device_height;
148  this->device_margin = device_margin;
149  this->orientation = orientation;
150  this->resolution = resolution;
151  this->copies = copies;
152  }
173 };
174 
201 class Renderer FS_FINAL : public Base {
202  public:
208  typedef enum _ColorMode {
219  } ColorMode;
220 
226  typedef enum _ContentFlag {
228  e_RenderPage = 0x01,
237  } ContentFlag;
238 
244  typedef enum _ColorModeForeground {
254 
255  #ifdef __APPLE__
256 
261  typedef enum _DeviceType {
263  e_DeviceDisplay = 1,
265  e_DevicePrinter = 2
266  }DeviceType;
267  #endif
268 
281  Renderer(const Bitmap& bitmap, bool is_rgb_order);
282 
295  Renderer(const PrintDeviceSettingData& print_param, const wchar_t* dest_file_path);
296 
297 #if (defined(_WIN32) || defined(_WIN64)) && (!defined(SWIG) || defined(_SWIG_DOTNET_) || defined(_SWIG_PYTHON_))
298 
305  explicit Renderer(HDC dc);
306 
316  Renderer(HDC dc, const wchar_t* printer_driver_name);
317 #endif
318 
319 #ifdef __APPLE__
320 
330  Renderer(const CGContextRef& context, DeviceType device_type);
331 #endif
332 
338  Renderer(const Renderer& other);
340  ~Renderer();
341 
349  Renderer& operator = (const Renderer& other);
357  bool operator == (const Renderer& other) const;
365  bool operator != (const Renderer& other) const;
366 
374  bool IsEmpty() const;
375 
397  Progressive StartQuickRender(const pdf::PDFPage& page, const Matrix& matrix, PauseCallback* pause = NULL);
398 
429  Progressive StartRender(const pdf::PDFPage& page, const Matrix& matrix, PauseCallback* pause = NULL);
430 
449  Progressive StartRenderReflowPage(const pdf::ReflowPage& reflow_page, const Matrix& matrix,
450  PauseCallback* pause = NULL);
451 
452 #ifndef _FX_NO_XFA_
453 
472  Progressive StartRenderXFAPage(const addon::xfa::XFAPage& xfa_page_view, const Matrix& matrix, bool is_highlight,
473  PauseCallback* pause = NULL);
474 #endif // #ifndef _FX_NO_XFA_
475 
500  Progressive StartRenderBitmap(const Bitmap& bitmap, const Matrix& matrix,
501  const RectI* clip_rect = NULL, uint32 interpolation = 0,
502  PauseCallback* pause = NULL);
503 
528  Progressive StartRenderBitmap(const Bitmap& bitmap, const Matrix& matrix,
529  const RectI* clip_rect, uint32 interpolation,
530  uint32 alpha, PauseCallback* pause);
531 
541 
555  bool RenderAnnot(const pdf::annots::Annot& annot, const Matrix& matrix);
556 
569  bool RenderFormControls(const pdf::PDFPage& page, const Matrix& matrix);
570 
584  bool RenderGraphicsObject(const pdf::graphics::GraphicsObject* graphics_object, const pdf::PDFPage& page, const Matrix& matrix);
585 
594  void SetClipRect(const RectI* clip_rect);
595 
601  void ClearClips();
602 
613  void SetClipPathFill(const Path& clip_path, const Matrix& matrix, foxit::common::FillMode fill_mode);
614 
625  void SetClipPathStroke(const Path& clip_path, const Matrix& matrix, const GraphState* graph_state = NULL);
626 
640  void SetRenderContentFlags(uint32 render_content_flags);
641 
656  void SetRenderAnnotsForThumbnail(bool is_render_annots_for_thumbnail);
657 
668  void SetRenderFormField(bool is_render_formfield);
669 
680  void SetRenderSignature(bool is_render_signature);
681 
692  void SetLayerContext(const pdf::LayerContext& layer_context);
693 
704  void SetRenderLayer(bool is_render_one_layer);
705 
729  void SetColorMode(ColorMode color_mode);
739  void SetMappingModeColors(ARGB background_color, ARGB foreground_color);
740 
754  void SetForegroundColorMode(uint32 foreground_color_mode);
755 
766  void SetForegroundColor(ARGB foreground_color);
767 
778  void SetClearType(bool is_clear_type);
791  void SetPrintTextAsGraphic(bool is_to_print_text_graphic);
792 
803  void SetPrintTextAsImage(bool is_to_print_text_image);
804 
815  void SetForceDownSample(bool is_to_force_down_sample);
816 
826  void SetOverprint(bool is_to_enable_overprint);
827 
841  void SetJPEGDownSample(bool is_jepg_down_sample);
842 
856  void SetJPXDownSample(bool is_jpx_down_sample);
857 
870  void EnableForPrint(bool is_render_for_print);
871 
882  void SetForceHalftone(bool is_to_force_halftone);
883 
894  void SetRenderPathThinLine(bool is_render_path_thin_line);
895 
906  void SetRenderTextAntiAliasing(bool is_render_text_antialiasing);
907 
918  void SetRenderPathAntiAliasing(bool is_render_path_antialiasing);
919 
929  void SetRenderPathFullCovered(bool is_render_path_full_covered);
930 
942  void SetRenderImageAntiAliasing(bool is_render_image_antialiasing);
943 
955  void SetRenderEnhanceThinLines(bool is_render_enhance_thin_lines);
956 
965  void SetRenderSignatureState(bool is_render_signature_state);
966 
967  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
968  explicit Renderer(FS_HANDLE handle = NULL);
969 
986  void SetScreenDPIScale(float scale);
987 
988 };
989 
991 class OFDRenderOption FS_FINAL : public Object {
992  public:
998  typedef enum _ColorMode {
1009  } ColorMode;
1010 
1016  typedef enum _RenderFlag {
1053  } RenderFlag;
1054 
1055 
1060  is_print(false),
1062  back_color(0xFFFFFFFF),
1063  fore_color(0xFF000000),
1064  x_dpi(96),
1065  y_dpi(96),
1066  render_flags(0) {};
1081  is_print(is_print),
1085  x_dpi(x_dpi),
1086  y_dpi(y_dpi),
1088 
1091 
1098  is_print(other.is_print),
1099  color_mode(other.color_mode),
1100  back_color(other.back_color),
1101  fore_color(other.fore_color),
1102  x_dpi(other.x_dpi),
1103  y_dpi(other.y_dpi),
1104  render_flags(other.render_flags) {
1105  };
1106 
1115  this->is_print = other.is_print;
1116  this->color_mode = other.color_mode;
1117  this->back_color = other.back_color;
1118  this->fore_color = other.fore_color;
1119  this->x_dpi = other.x_dpi;
1120  this->y_dpi = other.y_dpi;
1121  this->render_flags = other.render_flags;
1122  return *this;
1123  }
1124 
1141  this->is_print = is_print;
1142  this->color_mode = color_mode;
1143  this->back_color = back_color;
1144  this->fore_color = fore_color;
1145  this->x_dpi = x_dpi;
1146  this->y_dpi = y_dpi;
1147  this->render_flags = render_flags;
1148  }
1149 
1153  bool is_print;
1154 
1160 
1165 
1170 
1174  int x_dpi;
1175 
1179  int y_dpi;
1180 
1186 };
1187 
1189 class OFDRender FS_FINAL : public Base {
1190  public:
1196  typedef enum _ContentFlag {
1209  } ContentFlag;
1210 
1211 
1217  explicit OFDRender(const Bitmap& bitmap);
1218 
1220  ~OFDRender();
1221 
1227  OFDRender(const OFDRender& other);
1228 
1236  OFDRender& operator = (const OFDRender& other);
1237 
1245  bool operator == (const OFDRender& other) const;
1246 
1254  bool operator != (const OFDRender& other) const;
1255 
1263  bool IsEmpty() const;
1264 
1274  Progressive StartRender(const foxit::ofd::OFDPage& page, const Matrix& matrix, PauseCallback* pause = NULL);
1275 
1283  void SetRenderOption(const OFDRenderOption& render_option);
1284 
1295  void SetRenderContentFlags(uint32 render_content_flags);
1296 
1297  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1298  explicit OFDRender(FS_HANDLE handle);
1299 };
1300 
1302 class FLDRenderOption FS_FINAL : public Object {
1303  public:
1309  typedef enum _ColorMode {
1320  } ColorMode;
1321 
1322 
1325  is_print(false),
1327  back_color(0xFFFFFFFF),
1328  fore_color(0xFF000000),
1329  x_dpi(96),
1330  y_dpi(96) {};
1331 
1344  is_print(is_print),
1348  x_dpi(x_dpi),
1349  y_dpi(y_dpi) {};
1350 
1353 
1360  is_print(other.is_print),
1361  color_mode(other.color_mode),
1362  back_color(other.back_color),
1363  fore_color(other.fore_color),
1364  x_dpi(other.x_dpi),
1365  y_dpi(other.y_dpi) {
1366  };
1367 
1376  this->is_print = other.is_print;
1377  this->color_mode = other.color_mode;
1378  this->back_color = other.back_color;
1379  this->fore_color = other.fore_color;
1380  this->x_dpi = other.x_dpi;
1381  this->y_dpi = other.y_dpi;
1382  return *this;
1383  }
1384 
1399  this->is_print = is_print;
1400  this->color_mode = color_mode;
1401  this->back_color = back_color;
1402  this->fore_color = fore_color;
1403  this->x_dpi = x_dpi;
1404  this->y_dpi = y_dpi;
1405  }
1406 
1410  bool is_print;
1411 
1417 
1422 
1427 
1431  int x_dpi;
1432 
1436  int y_dpi;
1437 };
1438 
1440 class FLDRender FS_FINAL : public Base {
1441  public:
1447  explicit FLDRender(const Bitmap& bitmap);
1448 
1450  ~FLDRender();
1451 
1457  FLDRender(const FLDRender& other);
1458 
1466  FLDRender& operator = (const FLDRender& other);
1467 
1475  bool operator == (const FLDRender& other) const;
1476 
1484  bool operator != (const FLDRender& other) const;
1485 
1493  bool IsEmpty() const;
1494 
1503  bool Render(const foxit::fld::FLDPage& page, const Matrix& matrix);
1504 
1510  void SetRenderOption(const FLDRenderOption& render_option);
1511 
1512  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1513  explicit FLDRender(FS_HANDLE handle);
1514 };
1515 } // namespace common
1516 } // namespace foxit
1517 #endif // FS_RENDER_H_
1518 
Definition: fs_pdfgraphicsobject.h:232
任意颜色模式:不对颜色进行任何映射.
Definition: fs_render.h:1006
bool operator !=(const OFDRender &other) const
不相等操作符
void SetRenderContentFlags(uint32 render_content_flags)
设置渲染标志来决定渲染什么内容。
PrintDeviceSettingData()
构造函数并设置默认值。
Definition: fs_render.h:94
PDF重排页面相关定义和类的头文件。
正常颜色模式.
Definition: fs_render.h:1311
void ClearClips()
清除通过函数 Renderer::SetClipRect 设置的裁剪矩形。
以灰度模式渲染Seal类型的标注(与e_RenderSealAnnot互斥).
Definition: fs_render.h:1208
Progressive StartRenderBitmap(const Bitmap &bitmap, const Matrix &matrix, const RectI *clip_rect=0, uint32 interpolation=0, PauseCallback *pause=0)
开始渲染位图。
渲染手写笔迹.
Definition: fs_render.h:1036
Definition: fs_reflowpage.h:61
Progressive StartRender(const foxit::ofd::OFDPage &page, const Matrix &matrix, PauseCallback *pause=0)
渲染OFD页面。
void SetRenderAnnotAppearanceType(foxit::pdf::annots::Annot::AppearanceType ap_type)
设置注释的外观类型用于渲染。
PrintDeviceSettingData(int device_width, int device_height, RectF device_margin, OrientationFlag orientation, int resolution, uint32 copies)
带参数的构造函数。
Definition: fs_render.h:80
Renderer & operator=(const Renderer &other)
赋值操作符。
Definition: fs_image.h:36
只渲染页面内容,不渲染标注.
Definition: fs_render.h:1198
映射颜色模式:将颜色映射到由背景色和前景色定义的颜色范围.
Definition: fs_render.h:1004
OFDRenderOption & operator=(const OFDRenderOption &other)
赋值操作符。
Definition: fs_render.h:1114
Definition: fs_render.h:1302
void Set(int device_width, int device_height, RectF device_margin, OrientationFlag orientation, int resolution, uint32 copies)
设置值。
Definition: fs_render.h:145
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:220
IFX_Pause PauseCallback
Definition: fs_common.h:1288
ColorModeForeground
渲染前景颜色模式的枚举。
Definition: fs_render.h:244
void SetJPXDownSample(bool is_jpx_down_sample)
设置标志来决定是否对jpx图像使用下采样。
void SetRenderImageAntiAliasing(bool is_render_image_antialiasing)
设置标志来决定是否绘制图像反锯齿。
Progressive StartQuickRender(const pdf::PDFPage &page, const Matrix &matrix, PauseCallback *pause=0)
开始快速渲染PDF页面,主要用于缩略图。
ColorMode
OFD渲染颜色模式枚举类型.
Definition: fs_render.h:998
映射颜色模式:将颜色映射到由背景色和前景色定义的颜色范围.
Definition: fs_render.h:1315
如果设置,需要替换文本的颜色。
Definition: fs_render.h:246
Definition: fs_xfa.h:1335
Definition: fs_render.h:1440
bool is_print
是否为打印模式。
Definition: fs_render.h:1153
bool operator==(const FLDRender &other) const
相等操作符
void EnableForPrint(bool is_render_for_print)
设置标志来决定是否在打印模式下进行渲染。
页面不使用裁剪框.
Definition: fs_render.h:1032
uint32 RGB
RGB 颜色类型,24 位,((b) | ((g) << 8) | ((r) << 16)))
Definition: fs_basictypes.h:211
渲染高亮类型的标注(与e_RenderExceptHighlightAnnot互斥).
Definition: fs_render.h:1202
Definition: fs_render.h:991
void SetOverprint(bool is_to_enable_overprint)
设置标志来决定是否启用叠印。
void SetClipRect(const RectI *clip_rect)
设置将在后续渲染过程中使用的裁剪矩形。
如果设置,将渲染页面内容。
Definition: fs_render.h:228
FLDRender & operator=(const FLDRender &other)
赋值操作符。
~Renderer()
析构函数。
void SetRenderContentFlags(uint32 render_content_flags)
设置渲染内容标识。
void SetRenderPathAntiAliasing(bool is_render_path_antialiasing)
设置标志来决定是否绘制路径反锯齿。
FLDRenderOption()
构造函数。
Definition: fs_render.h:1324
ColorMode
渲染颜色模式的枚举。
Definition: fs_render.h:208
~FLDRender()
析构函数。
渲染非高亮类型的标注(与e_RenderHighlightAnnot互斥).
Definition: fs_render.h:1204
~OFDRenderOption()
析构函数。
Definition: fs_render.h:1090
OFDRender(const Bitmap &bitmap)
构造函数。
void SetRenderOption(const OFDRenderOption &render_option)
设置渲染选项。
bool IsEmpty() const
检查当前对象是否为空。
Progressive StartRenderXFAPage(const addon::xfa::XFAPage &xfa_page_view, const Matrix &matrix, bool is_highlight, PauseCallback *pause=0)
开始渲染XFA页面。
OFDRenderOption()
构造函数。
Definition: fs_render.h:1059
void Set(bool is_print, ColorMode color_mode, foxit::RGB back_color, foxit::RGB fore_color, int x_dpi, int y_dpi)
设置值。
Definition: fs_render.h:1398
uint32 copies
要打印的份数。此参数仅对PostScript文件有效。
Definition: fs_render.h:172
页面使用缓存图像.
Definition: fs_render.h:1044
void SetRenderTextAntiAliasing(bool is_render_text_antialiasing)
设置标志来决定是否绘制文本反锯齿。
void SetForceHalftone(bool is_to_force_halftone)
设置标志来决定是否对图像拉伸使用半调。
PrintDeviceSettingData(const PrintDeviceSettingData &settings)
带另一个打印设备设置数据对象的构造函数。
Definition: fs_render.h:106
渲染Stamp类型的标注(不是Seal).
Definition: fs_render.h:1200
void SetJPEGDownSample(bool is_jepg_down_sample)
设置标志来决定是否对jpeg图像使用下采样。
PDF图层相关定义和类的头文件。
图像和位图相关定义和类的头文件。
OFDRender & operator=(const OFDRender &other)
赋值操作符。
渲染Seal类型的标注(与e_RenderSealAnnotGray互斥).
Definition: fs_render.h:1206
FLDRenderOption(bool is_print, ColorMode color_mode, foxit::RGB back_color, foxit::RGB fore_color, int x_dpi, int y_dpi)
带参数的构造函数。
Definition: fs_render.h:1343
自定义颜色模式。将颜色映射到前景。
Definition: fs_render.h:218
页面不使用字体粗细设置.
Definition: fs_render.h:1038
将灰阶:白色/黑色颜色值映射到背景/前景;其他颜色不变。
Definition: fs_render.h:212
void SetColorMode(ColorMode color_mode)
设置颜色模式。
~OFDRender()
析构函数。
页面不使用页面区域.
Definition: fs_render.h:1034
int x_dpi
水平DPI值。
Definition: fs_render.h:1431
Definition: fs_render.h:201
void SetRenderPathFullCovered(bool is_render_path_full_covered)
可应用于填充模式的特殊标志。
打印为PDF格式.
Definition: fs_render.h:1040
void SetClipPathFill(const Path &clip_path, const Matrix &matrix, foxit::common::FillMode fill_mode)
使用填充区域设置裁剪路径。
ColorMode color_mode
颜色模式。请参考从 foxit::common::FLDRenderOption::e_ColorModeNormal 开始的值, 应该是这些值中的一个。
Definition: fs_render.h:1416
uint32 ARGB
ARGB 颜色类型,32 位,((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_basictypes.h:209
不渲染作为背景层的模板页.
Definition: fs_render.h:1018
RenderFlag
OFD渲染标识枚举类型.
Definition: fs_render.h:1016
Progressive StartRenderReflowPage(const pdf::ReflowPage &reflow_page, const Matrix &matrix, PauseCallback *pause=0)
开始渲染重排页面。
灰度颜色模式:将颜色映射到背景色/前景色.
Definition: fs_render.h:1002
void SetRenderAnnotsForThumbnail(bool is_render_annots_for_thumbnail)
设置渲染标志来决定是否在缩略图模式下渲染注释。
int device_width
设备的宽度(以像素为单位)。
Definition: fs_render.h:154
嵌入字体文件损坏时不渲染文本对象.
Definition: fs_render.h:1052
void SetClearType(bool is_clear_type)
设置标志来决定是否使用ClearType类似的反锯齿来渲染文本对象。
注释相关定义和类的头文件。
FillMode
填充模式类型枚举,主要用于路径图形对象。
Definition: fs_common.h:108
OrientationFlag
用于指定打印机方向的枚举。
Definition: fs_render.h:61
Renderer(const Bitmap &bitmap, bool is_rgb_order)
带位图的构造函数。
void SetRenderPathThinLine(bool is_render_path_thin_line)
设置标志来决定是否将路径绘制为细线。
Definition: fx_basic.h:3737
OFDRenderOption(bool is_print, ColorMode color_mode, foxit::RGB back_color, foxit::RGB fore_color, int x_dpi, int y_dpi, int render_flags)
带参数的构造函数。
Definition: fs_render.h:1080
bool operator !=(const FLDRender &other) const
不相等操作符
foxit::RGB back_color
背景颜色。
Definition: fs_render.h:1164
int resolution
设备的分辨率,以每英寸像素数为单位。
Definition: fs_render.h:170
ContentFlag
OFD渲染内容标识枚举类型.
Definition: fs_render.h:1196
foxit::RGB back_color
背景颜色。
Definition: fs_render.h:1421
CG变换有优先级.
Definition: fs_render.h:1050
void SetRenderFormField(bool is_render_formfield)
设置标志来决定是否渲染表单字段(除签名字段外)。
Definition: fs_common.h:373
将颜色值映射到由背景颜色和前景颜色定义的颜色范围。
Definition: fs_render.h:214
渲染时使用渐进式显示.
Definition: fs_render.h:1026
如果设置,将渲染注释。
Definition: fs_render.h:230
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:195
注释不使用边界.
Definition: fs_render.h:1030
如果设置,仅需要替换文本的黑色。
Definition: fs_render.h:250
总是显示缩略图.
Definition: fs_render.h:1024
Definition: fs_pdfpage.h:417
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
int x_dpi
水平DPI值。
Definition: fs_render.h:1174
PrintDeviceSettingData & operator=(const PrintDeviceSettingData &settings)
赋值操作符。
Definition: fs_render.h:121
通用定义和类的头文件。
bool is_print
是否为打印模式。
Definition: fs_render.h:1410
Progressive StartRender(const pdf::PDFPage &page, const Matrix &matrix, PauseCallback *pause=0)
开始渲染PDF页面。
正常颜色模式。
Definition: fs_render.h:210
bool operator !=(const Renderer &other) const
不等操作符。
void SetForegroundColor(ARGB foreground_color)
当颜色模式为 Renderer::e_ColorModeForeground 时为文本、路径或两者设置前景颜色。
打印的横向方向。
Definition: fs_render.h:65
Definition: fx_coordinates.h:596
OrientationFlag orientation
方向标志。请参考从 OrientationFlag::e_Portrait 开始的值, 这应该是其中的一个值。
Definition: fs_render.h:168
如果设置,需要替换路径的颜色。
Definition: fs_render.h:248
如果设置,仅需要替换路径的黑色。
Definition: fs_render.h:252
int render_flags
渲染标识。请参考从 foxit::common::OFDRenderOption::e_RenderFlagNoDisplayBackgroundTemplatePage 开始的值, 应该是这些值的组合...
Definition: fs_render.h:1185
Definition: fs_render.h:54
仅输出alpha,忽略颜色。
Definition: fs_render.h:216
Definition: fs_render.h:1189
Definition: fs_basictypes.h:465
如果设置,仅渲染高亮注释。
Definition: fs_render.h:232
ColorMode
OFD渲染颜色模式枚举类型.
Definition: fs_render.h:1309
Definition: fs_pdflayer.h:335
页面不使用裁剪路径.
Definition: fs_render.h:1042
bool RenderGraphicsObject(const pdf::graphics::GraphicsObject *graphics_object, const pdf::PDFPage &page, const Matrix &matrix)
渲染图形对象。
灰度颜色模式:将颜色映射到背景色/前景色.
Definition: fs_render.h:1313
void SetLayerContext(const pdf::LayerContext &layer_context)
设置图层上下文到渲染上下文句柄。
void SetForceDownSample(bool is_to_force_down_sample)
设置标志来决定是否对图像拉伸使用下采样。
~FLDRenderOption()
析构函数。
Definition: fs_render.h:1352
XFA 相关定义和函数的头文件。
bool RenderAnnot(const pdf::annots::Annot &annot, const Matrix &matrix)
渲染指定的注释。
void Set(bool is_print, ColorMode color_mode, foxit::RGB back_color, foxit::RGB fore_color, int x_dpi, int y_dpi, int render_flags)
设置值。
Definition: fs_render.h:1140
int y_dpi
垂直DPI值。
Definition: fs_render.h:1436
不使用ClearType类的文本抗锯齿技术.
Definition: fs_render.h:1028
正常颜色模式.
Definition: fs_render.h:1000
Definition: fs_annot.h:950
水印不打印.
Definition: fs_render.h:1048
bool operator==(const OFDRender &other) const
相等操作符
Definition: fs_fldpage.h:17
FLDRender(const Bitmap &bitmap)
构造函数。
void SetRenderSignature(bool is_render_signature)
设置标志来决定是否渲染签名。
Foxit命名空间。
Definition: fs_taggedpdf.h:27
水印默认作为背景.
Definition: fs_render.h:1046
任意颜色模式:不对颜色进行任何映射.
Definition: fs_render.h:1317
ColorMode color_mode
颜色模式。请参考从 foxit::common::OFDRenderOption::e_ColorModeNormal 开始的值, 应该是这些值中的一个。
Definition: fs_render.h:1159
打印时总是输出图像替代.
Definition: fs_render.h:1022
FLDRenderOption(const FLDRenderOption &other)
构造函数,通过另一个FLDRenderOption对象。
Definition: fs_render.h:1359
bool Render(const foxit::fld::FLDPage &page, const Matrix &matrix)
渲染FLD页面。
int device_height
设备的高度(以像素为单位)。
Definition: fs_render.h:156
Definition: fs_ofdpage.h:27
foxit::RGB fore_color
前景颜色。
Definition: fs_render.h:1169
AppearanceType
注释外观类型的枚举。
Definition: fs_annot.h:1228
void SetPrintTextAsImage(bool is_to_print_text_image)
设置标志来决定是否将文本打印为图像。
ContentFlag
渲染内容标志的枚举。
Definition: fs_render.h:226
bool IsEmpty() const
检查当前对象是否为空。
void SetMappingModeColors(ARGB background_color, ARGB foreground_color)
当颜色模式为 Renderer::e_ColorModeMappingGray 或 Renderer::e_ColorModeMapping 时设置背景颜色和前景颜色。
打印的纵向方向。
Definition: fs_render.h:63
#define NULL
空指针值。
Definition: fx_system.h:792
void SetForegroundColorMode(uint32 foreground_color_mode)
当颜色模式为 Renderer::e_ColorModeForeground 时设置渲染前景颜色模式。
bool operator==(const Renderer &other) const
相等操作符。
foxit::RGB fore_color
前景颜色。
Definition: fs_render.h:1426
void SetRenderSignatureState(bool is_render_signature_state)
设置标志来决定是否在签名上绘制签名状态。
RectF device_margin
设备的页边距。
Definition: fs_render.h:163
Definition: fx_coordinates.h:1076
bool IsEmpty() const
检查当前对象是否为空。
int y_dpi
垂直DPI值。
Definition: fs_render.h:1179
资源不使用缓存.
Definition: fs_render.h:1020
void SetPrintTextAsGraphic(bool is_to_print_text_graphic)
设置标志来决定是否将文本打印为路径或位图。
如果设置,仅渲染屏幕注释。
Definition: fs_render.h:236
OFDRenderOption(const OFDRenderOption &other)
构造函数,通过另一个OFDRenderOption对象。
Definition: fs_render.h:1097
void SetRenderOption(const FLDRenderOption &render_option)
设置渲染选项。
如果设置,将渲染除高亮外的所有注释。
Definition: fs_render.h:234
bool RenderFormControls(const pdf::PDFPage &page, const Matrix &matrix)
渲染表单控件。
void SetRenderEnhanceThinLines(bool is_render_enhance_thin_lines)
设置标志来决定是否增强细线。
FLDRenderOption & operator=(const FLDRenderOption &other)
赋值操作符。
Definition: fs_render.h:1375
void SetClipPathStroke(const Path &clip_path, const Matrix &matrix, const GraphState *graph_state=0)
使用描边区域设置裁剪路径。
void SetRenderLayer(bool is_render_one_layer)
设置标志来决定是否渲染一个图层或所有可用图层。
Definition: fx_coordinates.h:771
void SetScreenDPIScale(float scale)
Set the screen DPI scaling factor for rendering.