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 {
63 e_Portrait = 0,
65 e_Landscape = 1
66 } OrientationFlag;
67
80 explicit PrintDeviceSettingData(int device_width, int device_height, RectF device_margin, OrientationFlag orientation , int resolution, uint32 copies)
81 : device_width(device_width)
82 , device_height(device_height)
83 , device_margin(device_margin)
84 , orientation(orientation)
85 , resolution(resolution)
86 , copies(copies){}
87
94 PrintDeviceSettingData()
95 : device_width(2479)
96 , device_height(3508)
97 , orientation(e_Portrait)
98 , resolution(300)
99 , copies(1) {}
100
106 PrintDeviceSettingData(const PrintDeviceSettingData& settings)
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
121 PrintDeviceSettingData& operator = (const PrintDeviceSettingData& settings) {
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
145 void Set(int device_width, int device_height, RectF device_margin, OrientationFlag orientation, int resolution, uint32 copies ) {
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 }
154 int device_width;
156 int device_height;
163 RectF device_margin;
168 OrientationFlag orientation;
170 int resolution;
172 uint32 copies;
173 };
174
201 class Renderer FS_FINAL : public Base {
202 public:
208 typedef enum _ColorMode {
210 e_ColorModeNormal = 0,
212 e_ColorModeMappingGray = 1,
214 e_ColorModeMapping = 2,
216 e_ColorModeAlpha = 3,
218 e_ColorModeForeground = 4
219 } ColorMode;
220
226 typedef enum _ContentFlag {
228 e_RenderPage = 0x01,
230 e_RenderAnnot = 0x02,
232 e_RenderHighlight = 0x04,
234 e_RenderExceptHighlight = 0x08,
236 e_RenderScreen = 0x10
237 } ContentFlag;
238
244 typedef enum _ColorModeForeground {
246 e_ColorModeForegroundText = 0x01,
248 e_ColorModeForegroundPath = 0x02,
250 e_ColorModeForegroundBlackText = 0x04,
252 e_ColorModeForegroundBlackPath = 0x08
253 } 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
540 void SetRenderAnnotAppearanceType(foxit::pdf::annots::Annot::AppearanceType ap_type);
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 {
1000 e_ColorModeNormal = 0,
1002 e_ColorModeMappingGray = 1,
1004 e_ColorModeMapping = 2,
1006 e_ColorModeAnyColor = 3,
1008 e_ColorModeRedHead = 4
1009 } ColorMode;
1010
1016 typedef enum _RenderFlag {
1018 e_RenderFlagNoDisplayBackgroundTemplatePage = 0x10,
1020 e_RenderFlagResourceNoCache = 0x20,
1022 e_RenderFlagPrintSubImage = 0x40,
1024 e_RenderFlagDisplayThumbnail = 0x80,
1026 e_RenderFlagProgressiveRending = 0x100,
1028 e_RenderFlagNoUseFxTextClearType = 0x200,
1030 e_RenderFlagAnnotNoUseBound = 0x400,
1032 e_RenderFlagPageNoUseCropBox = 0x800,
1034 e_RenderFlagPageNoUsePageArea = 0x1000,
1036 e_RenderFlagRenHanWriting = 0x2000,
1038 e_RenderFlagPageNoUseFontWeight = 0x4000,
1040 e_RenderFlagPrintPDF = 0x8000,
1042 e_RenderFlagPageNoUseClip = 0x10000,
1044 e_RenderFlagPageUseCacheImage = 0x20000,
1046 e_WaterMarkDefaultIsBackground = 0x40000,
1048 e_RenderFlagWaterMarkNotPrint = 0x80000,
1050 e_RenderFlagCGTransformHasPriority = 0x100000,
1052 e_RenderFlagBadEmbedFontNoRender = 0x200000
1053 } RenderFlag;
1054
1055
1059 OFDRenderOption() :
1060 is_print(false),
1061 color_mode(OFDRenderOption::e_ColorModeNormal),
1062 back_color(0xFFFFFFFF),
1063 fore_color(0xFF000000),
1064 x_dpi(96),
1065 y_dpi(96),
1066 render_flags(0) {};
1080 explicit OFDRenderOption(bool is_print, ColorMode color_mode, foxit::RGB back_color, foxit::RGB fore_color, int x_dpi, int y_dpi, int render_flags) :
1081 is_print(is_print),
1082 color_mode(color_mode),
1083 back_color(back_color),
1084 fore_color(fore_color),
1085 x_dpi(x_dpi),
1086 y_dpi(y_dpi),
1087 render_flags(render_flags) {};
1088
1090 ~OFDRenderOption() {};
1091
1097 OFDRenderOption(const OFDRenderOption& other) :
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
1114 OFDRenderOption& operator = (const OFDRenderOption& other) {
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
1140 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) {
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
1159 ColorMode color_mode;
1160
1164 foxit::RGB back_color;
1165
1169 foxit::RGB fore_color;
1170
1174 int x_dpi;
1175
1179 int y_dpi;
1180
1185 int render_flags;
1186 };
1187
1189 class OFDRender FS_FINAL : public Base {
1190 public:
1196 typedef enum _ContentFlag {
1198 e_RenderPage = 0x01,
1200 e_RenderStampAnnot = 0x02,
1202 e_RenderHighlightAnnot = 0x04,
1204 e_RenderExceptHighlightAnnot = 0x08,
1206 e_RenderSealAnnot = 0x10,
1208 e_RenderSealAnnotGray = 0x20
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 {
1311 e_ColorModeNormal = 0,
1313 e_ColorModeMappingGray = 1,
1315 e_ColorModeMapping = 2,
1317 e_ColorModeAnyColor = 3,
1319 e_ColorModeRedHead = 4
1320 } ColorMode;
1321
1322
1324 FLDRenderOption() :
1325 is_print(false),
1326 color_mode(FLDRenderOption::e_ColorModeNormal),
1327 back_color(0xFFFFFFFF),
1328 fore_color(0xFF000000),
1329 x_dpi(96),
1330 y_dpi(96) {};
1331
1343 explicit FLDRenderOption(bool is_print, ColorMode color_mode, foxit::RGB back_color, foxit::RGB fore_color, int x_dpi, int y_dpi) :
1344 is_print(is_print),
1345 color_mode(color_mode),
1346 back_color(back_color),
1347 fore_color(fore_color),
1348 x_dpi(x_dpi),
1349 y_dpi(y_dpi) {};
1350
1352 ~FLDRenderOption() {};
1353
1359 FLDRenderOption(const FLDRenderOption& other) :
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
1375 FLDRenderOption& operator = (const FLDRenderOption& other) {
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
1398 void Set(bool is_print, ColorMode color_mode, foxit::RGB back_color, foxit::RGB fore_color, int x_dpi, int y_dpi) {
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
1416 ColorMode color_mode;
1417
1421 foxit::RGB back_color;
1422
1426 foxit::RGB fore_color;
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
foxit::pdf::graphics::GraphicsObject
Definition: fs_pdfgraphicsobject.h:232
foxit::common::OFDRenderOption::e_ColorModeAnyColor
任意颜色模式:不对颜色进行任何映射.
Definition: fs_render.h:1006
foxit::common::OFDRender::operator !=
bool operator !=(const OFDRender &other) const
不相等操作符
foxit::common::Renderer::SetRenderContentFlags
void SetRenderContentFlags(uint32 render_content_flags)
设置渲染标志来决定渲染什么内容。
foxit::common::PrintDeviceSettingData::PrintDeviceSettingData
PrintDeviceSettingData()
构造函数并设置默认值。
Definition: fs_render.h:94
fs_reflowpage.h
PDF重排页面相关定义和类的头文件。
foxit::common::FLDRenderOption::e_ColorModeNormal
正常颜色模式.
Definition: fs_render.h:1311
foxit::common::Renderer::ClearClips
void ClearClips()
清除通过函数 Renderer::SetClipRect 设置的裁剪矩形。
foxit::common::OFDRender::e_RenderSealAnnotGray
以灰度模式渲染Seal类型的标注(与e_RenderSealAnnot互斥).
Definition: fs_render.h:1208
foxit::common::Renderer::StartRenderBitmap
Progressive StartRenderBitmap(const Bitmap &bitmap, const Matrix &matrix, const RectI *clip_rect=0, uint32 interpolation=0, PauseCallback *pause=0)
开始渲染位图。
foxit::common::OFDRenderOption::e_RenderFlagRenHanWriting
渲染手写笔迹.
Definition: fs_render.h:1036
foxit::pdf::ReflowPage
Definition: fs_reflowpage.h:61
foxit::common::OFDRender::StartRender
Progressive StartRender(const foxit::ofd::OFDPage &page, const Matrix &matrix, PauseCallback *pause=0)
渲染OFD页面。
foxit::common::Renderer::SetRenderAnnotAppearanceType
void SetRenderAnnotAppearanceType(foxit::pdf::annots::Annot::AppearanceType ap_type)
设置注释的外观类型用于渲染。
foxit::common::PrintDeviceSettingData::PrintDeviceSettingData
PrintDeviceSettingData(int device_width, int device_height, RectF device_margin, OrientationFlag orientation, int resolution, uint32 copies)
带参数的构造函数。
Definition: fs_render.h:80
foxit::common::Renderer::operator=
Renderer & operator=(const Renderer &other)
赋值操作符。
foxit::common::Bitmap
Definition: fs_image.h:36
foxit::common::OFDRender::e_RenderPage
只渲染页面内容，不渲染标注.
Definition: fs_render.h:1198
foxit::common::OFDRenderOption::e_ColorModeMapping
映射颜色模式:将颜色映射到由背景色和前景色定义的颜色范围.
Definition: fs_render.h:1004
foxit::common::OFDRenderOption::operator=
OFDRenderOption & operator=(const OFDRenderOption &other)
赋值操作符。
Definition: fs_render.h:1114
foxit::common::FLDRenderOption
Definition: fs_render.h:1302
foxit::common::PrintDeviceSettingData::Set
void Set(int device_width, int device_height, RectF device_margin, OrientationFlag orientation, int resolution, uint32 copies)
设置值。
Definition: fs_render.h:145
foxit::Object
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:220
foxit::common::PauseCallback
IFX_Pause PauseCallback
Definition: fs_common.h:1288
foxit::common::Renderer::ColorModeForeground
ColorModeForeground
渲染前景颜色模式的枚举。
Definition: fs_render.h:244
foxit::common::Renderer::SetJPXDownSample
void SetJPXDownSample(bool is_jpx_down_sample)
设置标志来决定是否对jpx图像使用下采样。
foxit::common::Renderer::SetRenderImageAntiAliasing
void SetRenderImageAntiAliasing(bool is_render_image_antialiasing)
设置标志来决定是否绘制图像反锯齿。
foxit::common::Renderer::StartQuickRender
Progressive StartQuickRender(const pdf::PDFPage &page, const Matrix &matrix, PauseCallback *pause=0)
开始快速渲染PDF页面，主要用于缩略图。
foxit::common::OFDRenderOption::ColorMode
ColorMode
OFD渲染颜色模式枚举类型.
Definition: fs_render.h:998
foxit::common::FLDRenderOption::e_ColorModeMapping
映射颜色模式:将颜色映射到由背景色和前景色定义的颜色范围.
Definition: fs_render.h:1315
foxit::common::Renderer::e_ColorModeForegroundText
如果设置，需要替换文本的颜色。
Definition: fs_render.h:246
foxit::addon::xfa::XFAPage
Definition: fs_xfa.h:1335
foxit::common::FLDRender
Definition: fs_render.h:1440
foxit::common::OFDRenderOption::is_print
bool is_print
是否为打印模式。
Definition: fs_render.h:1153
foxit::common::FLDRender::operator==
bool operator==(const FLDRender &other) const
相等操作符
foxit::common::Renderer::EnableForPrint
void EnableForPrint(bool is_render_for_print)
设置标志来决定是否在打印模式下进行渲染。
foxit::common::OFDRenderOption::e_RenderFlagPageNoUseCropBox
页面不使用裁剪框.
Definition: fs_render.h:1032
foxit::RGB
uint32 RGB
RGB 颜色类型，24 位，((b) | ((g) << 8) | ((r) << 16)))
Definition: fs_basictypes.h:211
foxit::common::OFDRender::e_RenderHighlightAnnot
渲染高亮类型的标注(与e_RenderExceptHighlightAnnot互斥）.
Definition: fs_render.h:1202
foxit::common::OFDRenderOption
Definition: fs_render.h:991
foxit::common::Renderer::SetOverprint
void SetOverprint(bool is_to_enable_overprint)
设置标志来决定是否启用叠印。
foxit::common::Renderer::SetClipRect
void SetClipRect(const RectI *clip_rect)
设置将在后续渲染过程中使用的裁剪矩形。
foxit::common::Renderer::e_RenderPage
如果设置，将渲染页面内容。
Definition: fs_render.h:228
foxit::common::FLDRender::operator=
FLDRender & operator=(const FLDRender &other)
赋值操作符。
foxit::common::Renderer::~Renderer
~Renderer()
析构函数。
foxit::common::OFDRender::SetRenderContentFlags
void SetRenderContentFlags(uint32 render_content_flags)
设置渲染内容标识。
foxit::common::Renderer::SetRenderPathAntiAliasing
void SetRenderPathAntiAliasing(bool is_render_path_antialiasing)
设置标志来决定是否绘制路径反锯齿。
foxit::common::FLDRenderOption::FLDRenderOption
FLDRenderOption()
构造函数。
Definition: fs_render.h:1324
foxit::common::Renderer::ColorMode
ColorMode
渲染颜色模式的枚举。
Definition: fs_render.h:208
foxit::common::FLDRender::~FLDRender
~FLDRender()
析构函数。
foxit::common::OFDRender::e_RenderExceptHighlightAnnot
渲染非高亮类型的标注(与e_RenderHighlightAnnot互斥）.
Definition: fs_render.h:1204
foxit::common::OFDRenderOption::~OFDRenderOption
~OFDRenderOption()
析构函数。
Definition: fs_render.h:1090
foxit::common::OFDRender::OFDRender
OFDRender(const Bitmap &bitmap)
构造函数。
foxit::common::OFDRender::SetRenderOption
void SetRenderOption(const OFDRenderOption &render_option)
设置渲染选项。
foxit::common::Renderer::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit::common::Renderer::StartRenderXFAPage
Progressive StartRenderXFAPage(const addon::xfa::XFAPage &xfa_page_view, const Matrix &matrix, bool is_highlight, PauseCallback *pause=0)
开始渲染XFA页面。
foxit::common::OFDRenderOption::OFDRenderOption
OFDRenderOption()
构造函数。
Definition: fs_render.h:1059
foxit::common::FLDRenderOption::Set
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
foxit::common::OFDRenderOption::e_ColorModeRedHead
Definition: fs_render.h:1008
foxit::common::PrintDeviceSettingData::copies
uint32 copies
要打印的份数。此参数仅对PostScript文件有效。
Definition: fs_render.h:172
foxit::common::OFDRenderOption::e_RenderFlagPageUseCacheImage
页面使用缓存图像.
Definition: fs_render.h:1044
foxit::common::Renderer::SetRenderTextAntiAliasing
void SetRenderTextAntiAliasing(bool is_render_text_antialiasing)
设置标志来决定是否绘制文本反锯齿。
foxit::common::Renderer::SetForceHalftone
void SetForceHalftone(bool is_to_force_halftone)
设置标志来决定是否对图像拉伸使用半调。
foxit::common::PrintDeviceSettingData::PrintDeviceSettingData
PrintDeviceSettingData(const PrintDeviceSettingData &settings)
带另一个打印设备设置数据对象的构造函数。
Definition: fs_render.h:106
foxit::common::OFDRender::e_RenderStampAnnot
渲染Stamp类型的标注（不是Seal）.
Definition: fs_render.h:1200
foxit::common::Renderer::SetJPEGDownSample
void SetJPEGDownSample(bool is_jepg_down_sample)
设置标志来决定是否对jpeg图像使用下采样。
fs_pdflayer.h
PDF图层相关定义和类的头文件。
fs_image.h
图像和位图相关定义和类的头文件。
foxit::common::OFDRender::operator=
OFDRender & operator=(const OFDRender &other)
赋值操作符。
foxit::common::OFDRender::e_RenderSealAnnot
渲染Seal类型的标注(与e_RenderSealAnnotGray互斥).
Definition: fs_render.h:1206
foxit::common::FLDRenderOption::FLDRenderOption
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
foxit::common::Renderer::e_ColorModeForeground
自定义颜色模式。将颜色映射到前景。
Definition: fs_render.h:218
foxit::common::OFDRenderOption::e_RenderFlagPageNoUseFontWeight
页面不使用字体粗细设置.
Definition: fs_render.h:1038
foxit::common::Renderer::e_ColorModeMappingGray
将灰阶：白色/黑色颜色值映射到背景/前景；其他颜色不变。
Definition: fs_render.h:212
foxit::common::Renderer::SetColorMode
void SetColorMode(ColorMode color_mode)
设置颜色模式。
foxit::common::OFDRender::~OFDRender
~OFDRender()
析构函数。
foxit::common::OFDRenderOption::e_RenderFlagPageNoUsePageArea
页面不使用页面区域.
Definition: fs_render.h:1034
foxit::common::FLDRenderOption::x_dpi
int x_dpi
水平DPI值。
Definition: fs_render.h:1431
foxit::common::Renderer
Definition: fs_render.h:201
foxit::common::Renderer::SetRenderPathFullCovered
void SetRenderPathFullCovered(bool is_render_path_full_covered)
可应用于填充模式的特殊标志。
foxit::common::OFDRenderOption::e_RenderFlagPrintPDF
打印为PDF格式.
Definition: fs_render.h:1040
foxit::common::Renderer::SetClipPathFill
void SetClipPathFill(const Path &clip_path, const Matrix &matrix, foxit::common::FillMode fill_mode)
使用填充区域设置裁剪路径。
foxit::common::FLDRenderOption::color_mode
ColorMode color_mode
颜色模式。请参考从 foxit::common::FLDRenderOption::e_ColorModeNormal 开始的值， 应该是这些值中的一个。
Definition: fs_render.h:1416
foxit::ARGB
uint32 ARGB
ARGB 颜色类型，32 位，((b) | ((g) << 8) | ((r) << 16)) | ((a) << 24)
Definition: fs_basictypes.h:209
foxit::common::OFDRenderOption::e_RenderFlagNoDisplayBackgroundTemplatePage
不渲染作为背景层的模板页.
Definition: fs_render.h:1018
foxit::common::OFDRenderOption::RenderFlag
RenderFlag
OFD渲染标识枚举类型.
Definition: fs_render.h:1016
foxit::common::Renderer::StartRenderReflowPage
Progressive StartRenderReflowPage(const pdf::ReflowPage &reflow_page, const Matrix &matrix, PauseCallback *pause=0)
开始渲染重排页面。
foxit::common::OFDRenderOption::e_ColorModeMappingGray
灰度颜色模式:将颜色映射到背景色/前景色.
Definition: fs_render.h:1002
foxit::common::Renderer::SetRenderAnnotsForThumbnail
void SetRenderAnnotsForThumbnail(bool is_render_annots_for_thumbnail)
设置渲染标志来决定是否在缩略图模式下渲染注释。
foxit::common::PrintDeviceSettingData::device_width
int device_width
设备的宽度（以像素为单位）。
Definition: fs_render.h:154
foxit::common::OFDRenderOption::e_RenderFlagBadEmbedFontNoRender
嵌入字体文件损坏时不渲染文本对象.
Definition: fs_render.h:1052
foxit::common::Renderer::SetClearType
void SetClearType(bool is_clear_type)
设置标志来决定是否使用ClearType类似的反锯齿来渲染文本对象。
fs_annot.h
注释相关定义和类的头文件。
foxit::common::FillMode
FillMode
填充模式类型枚举，主要用于路径图形对象。
Definition: fs_common.h:108
foxit::common::PrintDeviceSettingData::OrientationFlag
OrientationFlag
用于指定打印机方向的枚举。
Definition: fs_render.h:61
foxit::common::Renderer::Renderer
Renderer(const Bitmap &bitmap, bool is_rgb_order)
带位图的构造函数。
foxit::common::Renderer::SetRenderPathThinLine
void SetRenderPathThinLine(bool is_render_path_thin_line)
设置标志来决定是否将路径绘制为细线。
IFX_Pause
Definition: fx_basic.h:3737
foxit::common::OFDRenderOption::OFDRenderOption
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
foxit::common::FLDRender::operator !=
bool operator !=(const FLDRender &other) const
不相等操作符
foxit::common::OFDRenderOption::back_color
foxit::RGB back_color
背景颜色。
Definition: fs_render.h:1164
foxit::common::PrintDeviceSettingData::resolution
int resolution
设备的分辨率，以每英寸像素数为单位。
Definition: fs_render.h:170
foxit::common::OFDRender::ContentFlag
ContentFlag
OFD渲染内容标识枚举类型.
Definition: fs_render.h:1196
foxit::common::FLDRenderOption::back_color
foxit::RGB back_color
背景颜色。
Definition: fs_render.h:1421
foxit::common::OFDRenderOption::e_RenderFlagCGTransformHasPriority
CG变换有优先级.
Definition: fs_render.h:1050
foxit::common::Renderer::SetRenderFormField
void SetRenderFormField(bool is_render_formfield)
设置标志来决定是否渲染表单字段（除签名字段外）。
foxit::common::Progressive
Definition: fs_common.h:373
foxit::common::Renderer::e_ColorModeMapping
将颜色值映射到由背景颜色和前景颜色定义的颜色范围。
Definition: fs_render.h:214
foxit::common::OFDRenderOption::e_RenderFlagProgressiveRending
渲染时使用渐进式显示.
Definition: fs_render.h:1026
foxit::common::Renderer::e_RenderAnnot
如果设置，将渲染注释。
Definition: fs_render.h:230
foxit::uint32
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:195
foxit::common::OFDRenderOption::e_RenderFlagAnnotNoUseBound
注释不使用边界.
Definition: fs_render.h:1030
foxit::common::Renderer::e_ColorModeForegroundBlackText
如果设置，仅需要替换文本的黑色。
Definition: fs_render.h:250
foxit::common::OFDRenderOption::e_RenderFlagDisplayThumbnail
总是显示缩略图.
Definition: fs_render.h:1024
foxit::pdf::PDFPage
Definition: fs_pdfpage.h:417
foxit::FS_HANDLE
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
foxit::common::OFDRenderOption::x_dpi
int x_dpi
水平DPI值。
Definition: fs_render.h:1174
foxit::common::PrintDeviceSettingData::operator=
PrintDeviceSettingData & operator=(const PrintDeviceSettingData &settings)
赋值操作符。
Definition: fs_render.h:121
fs_common.h
通用定义和类的头文件。
foxit::common::FLDRenderOption::is_print
bool is_print
是否为打印模式。
Definition: fs_render.h:1410
foxit::common::Renderer::StartRender
Progressive StartRender(const pdf::PDFPage &page, const Matrix &matrix, PauseCallback *pause=0)
开始渲染PDF页面。
foxit::common::Renderer::e_ColorModeNormal
正常颜色模式。
Definition: fs_render.h:210
foxit::common::Renderer::operator !=
bool operator !=(const Renderer &other) const
不等操作符。
foxit::common::Renderer::SetForegroundColor
void SetForegroundColor(ARGB foreground_color)
当颜色模式为 Renderer::e_ColorModeForeground 时为文本、路径或两者设置前景颜色。
foxit::common::PrintDeviceSettingData::e_Landscape
打印的横向方向。
Definition: fs_render.h:65
FX_RECT
Definition: fx_coordinates.h:596
foxit::common::PrintDeviceSettingData::orientation
OrientationFlag orientation
方向标志。请参考从 OrientationFlag::e_Portrait 开始的值， 这应该是其中的一个值。
Definition: fs_render.h:168
foxit::common::Renderer::e_ColorModeForegroundPath
如果设置，需要替换路径的颜色。
Definition: fs_render.h:248
foxit::common::Renderer::e_ColorModeForegroundBlackPath
如果设置，仅需要替换路径的黑色。
Definition: fs_render.h:252
foxit::common::OFDRenderOption::render_flags
int render_flags
渲染标识。请参考从 foxit::common::OFDRenderOption::e_RenderFlagNoDisplayBackgroundTemplatePage 开始的值， 应该是这些值的组合...
Definition: fs_render.h:1185
foxit::common::PrintDeviceSettingData
Definition: fs_render.h:54
foxit::common::Renderer::e_ColorModeAlpha
仅输出alpha，忽略颜色。
Definition: fs_render.h:216
foxit::common::OFDRender
Definition: fs_render.h:1189
foxit::Base
Definition: fs_basictypes.h:465
foxit::common::Renderer::e_RenderHighlight
如果设置，仅渲染高亮注释。
Definition: fs_render.h:232
foxit::common::FLDRenderOption::ColorMode
ColorMode
OFD渲染颜色模式枚举类型.
Definition: fs_render.h:1309
foxit::pdf::LayerContext
Definition: fs_pdflayer.h:335
foxit::common::OFDRenderOption::e_RenderFlagPageNoUseClip
页面不使用裁剪路径.
Definition: fs_render.h:1042
foxit::common::Renderer::RenderGraphicsObject
bool RenderGraphicsObject(const pdf::graphics::GraphicsObject *graphics_object, const pdf::PDFPage &page, const Matrix &matrix)
渲染图形对象。
foxit::common::FLDRenderOption::e_ColorModeMappingGray
灰度颜色模式:将颜色映射到背景色/前景色.
Definition: fs_render.h:1313
foxit::common::Renderer::SetLayerContext
void SetLayerContext(const pdf::LayerContext &layer_context)
设置图层上下文到渲染上下文句柄。
foxit::common::Renderer::SetForceDownSample
void SetForceDownSample(bool is_to_force_down_sample)
设置标志来决定是否对图像拉伸使用下采样。
foxit::common::FLDRenderOption::~FLDRenderOption
~FLDRenderOption()
析构函数。
Definition: fs_render.h:1352
fs_xfa.h
XFA 相关定义和函数的头文件。
foxit::common::Renderer::RenderAnnot
bool RenderAnnot(const pdf::annots::Annot &annot, const Matrix &matrix)
渲染指定的注释。
foxit::common::OFDRenderOption::Set
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
foxit::common::FLDRenderOption::y_dpi
int y_dpi
垂直DPI值。
Definition: fs_render.h:1436
foxit::common::OFDRenderOption::e_RenderFlagNoUseFxTextClearType
不使用ClearType类的文本抗锯齿技术.
Definition: fs_render.h:1028
foxit::common::OFDRenderOption::e_ColorModeNormal
正常颜色模式.
Definition: fs_render.h:1000
foxit::pdf::annots::Annot
Definition: fs_annot.h:950
foxit::common::OFDRenderOption::e_RenderFlagWaterMarkNotPrint
水印不打印.
Definition: fs_render.h:1048
foxit::common::OFDRender::operator==
bool operator==(const OFDRender &other) const
相等操作符
foxit::fld::FLDPage
Definition: fs_fldpage.h:17
foxit::common::FLDRender::FLDRender
FLDRender(const Bitmap &bitmap)
构造函数。
foxit::common::Renderer::SetRenderSignature
void SetRenderSignature(bool is_render_signature)
设置标志来决定是否渲染签名。
foxit
Foxit命名空间。
Definition: fs_taggedpdf.h:27
foxit::common::OFDRenderOption::e_WaterMarkDefaultIsBackground
水印默认作为背景.
Definition: fs_render.h:1046
foxit::common::FLDRenderOption::e_ColorModeAnyColor
任意颜色模式:不对颜色进行任何映射.
Definition: fs_render.h:1317
foxit::common::OFDRenderOption::color_mode
ColorMode color_mode
颜色模式。请参考从 foxit::common::OFDRenderOption::e_ColorModeNormal 开始的值， 应该是这些值中的一个。
Definition: fs_render.h:1159
foxit::common::OFDRenderOption::e_RenderFlagPrintSubImage
打印时总是输出图像替代.
Definition: fs_render.h:1022
foxit::common::FLDRenderOption::FLDRenderOption
FLDRenderOption(const FLDRenderOption &other)
构造函数，通过另一个FLDRenderOption对象。
Definition: fs_render.h:1359
foxit::common::FLDRender::Render
bool Render(const foxit::fld::FLDPage &page, const Matrix &matrix)
渲染FLD页面。
foxit::common::PrintDeviceSettingData::device_height
int device_height
设备的高度（以像素为单位）。
Definition: fs_render.h:156
foxit::ofd::OFDPage
Definition: fs_ofdpage.h:27
foxit::common::OFDRenderOption::fore_color
foxit::RGB fore_color
前景颜色。
Definition: fs_render.h:1169
foxit::pdf::annots::Annot::AppearanceType
AppearanceType
注释外观类型的枚举。
Definition: fs_annot.h:1228
foxit::common::Renderer::SetPrintTextAsImage
void SetPrintTextAsImage(bool is_to_print_text_image)
设置标志来决定是否将文本打印为图像。
foxit::common::Renderer::ContentFlag
ContentFlag
渲染内容标志的枚举。
Definition: fs_render.h:226
foxit::common::FLDRenderOption::e_ColorModeRedHead
Definition: fs_render.h:1319
foxit::common::OFDRender::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit::common::Renderer::SetMappingModeColors
void SetMappingModeColors(ARGB background_color, ARGB foreground_color)
当颜色模式为 Renderer::e_ColorModeMappingGray 或 Renderer::e_ColorModeMapping 时设置背景颜色和前景颜色。
foxit::common::PrintDeviceSettingData::e_Portrait
打印的纵向方向。
Definition: fs_render.h:63
NULL
#define NULL
空指针值。
Definition: fx_system.h:792
foxit::common::Renderer::SetForegroundColorMode
void SetForegroundColorMode(uint32 foreground_color_mode)
当颜色模式为 Renderer::e_ColorModeForeground 时设置渲染前景颜色模式。
foxit::common::Renderer::operator==
bool operator==(const Renderer &other) const
相等操作符。
foxit::common::FLDRenderOption::fore_color
foxit::RGB fore_color
前景颜色。
Definition: fs_render.h:1426
foxit::common::Renderer::SetRenderSignatureState
void SetRenderSignatureState(bool is_render_signature_state)
设置标志来决定是否在签名上绘制签名状态。
foxit::common::PrintDeviceSettingData::device_margin
RectF device_margin
设备的页边距。
Definition: fs_render.h:163
CFX_Matrix
Definition: fx_coordinates.h:1076
foxit::common::FLDRender::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit::common::OFDRenderOption::y_dpi
int y_dpi
垂直DPI值。
Definition: fs_render.h:1179
foxit::common::OFDRenderOption::e_RenderFlagResourceNoCache
资源不使用缓存.
Definition: fs_render.h:1020
foxit::common::Renderer::SetPrintTextAsGraphic
void SetPrintTextAsGraphic(bool is_to_print_text_graphic)
设置标志来决定是否将文本打印为路径或位图。
foxit::common::Renderer::e_RenderScreen
如果设置，仅渲染屏幕注释。
Definition: fs_render.h:236
foxit::common::OFDRenderOption::OFDRenderOption
OFDRenderOption(const OFDRenderOption &other)
构造函数，通过另一个OFDRenderOption对象。
Definition: fs_render.h:1097
foxit::common::FLDRender::SetRenderOption
void SetRenderOption(const FLDRenderOption &render_option)
设置渲染选项。
foxit::common::Renderer::e_RenderExceptHighlight
如果设置，将渲染除高亮外的所有注释。
Definition: fs_render.h:234
foxit::common::Renderer::RenderFormControls
bool RenderFormControls(const pdf::PDFPage &page, const Matrix &matrix)
渲染表单控件。
foxit::common::Renderer::SetRenderEnhanceThinLines
void SetRenderEnhanceThinLines(bool is_render_enhance_thin_lines)
设置标志来决定是否增强细线。
foxit::common::FLDRenderOption::operator=
FLDRenderOption & operator=(const FLDRenderOption &other)
赋值操作符。
Definition: fs_render.h:1375
foxit::common::Renderer::SetClipPathStroke
void SetClipPathStroke(const Path &clip_path, const Matrix &matrix, const GraphState *graph_state=0)
使用描边区域设置裁剪路径。
foxit::common::Renderer::SetRenderLayer
void SetRenderLayer(bool is_render_one_layer)
设置标志来决定是否渲染一个图层或所有可用图层。
CFX_FloatRect
Definition: fx_coordinates.h:771
foxit::common::Renderer::SetScreenDPIScale
void SetScreenDPIScale(float scale)
Set the screen DPI scaling factor for rendering.