Foxit PDF SDK
fs_reflowpage.h
浏览该文件的文档.
1 
15 #ifndef FS_REFLOWPAGE_H_
16 #define FS_REFLOWPAGE_H_
17 
18 #include "common/fs_common.h"
19 //#include "pdf/fs_pdfpage.h"
20 
26 namespace foxit {
30 namespace pdf {
31 class PDFPage;
32 
61 class ReflowPage FS_FINAL : public Base {
62  public:
68  typedef enum _Flags {
70  e_Normal = 0x0,
72  e_WithImage = 0x1,
91  } Flags;
92 
93 
99  explicit ReflowPage(const PDFPage& page);
100 
106  ReflowPage(const ReflowPage& other);
107 
115  ReflowPage& operator = (const ReflowPage& other);
123  bool operator == (const ReflowPage& other) const ;
131  bool operator != (const ReflowPage& other) const ;
133  ~ReflowPage();
134 
142  bool IsEmpty() const;
155  void SetScreenSize(float width, float height);
156 
176  void SetScreenMargin(int left, int top, int right, int bottom);
177 
192  void SetZoom(int zoom);
193 
203  void SetParseFlags(uint32 flags);
204 
214  void SetLineSpace(float line_space);
215 
224  void SetImageScale(float image_scale);
225 
237  void SetTopSpace(float top_space);
238 
257 
263  float GetContentWidth() const;
264 
270  float GetContentHeight() const;
271 
288  Matrix GetDisplayMatrix(float offset_x, float offset_y,int width, int height,common::Rotation rotate) const;
289 
308  String GetFocusData(const Matrix& matrix, const PointF& point) const;
309 
330  PointF GetFocusPosition(const Matrix& matrix, const char* focus_data) const;
331 
338  bool IsParsed() const;
339 
340  // 强烈建议用户不要使用此方法;否则可能会出现未知情况。
341  explicit ReflowPage(FS_HANDLE handle = NULL);
342 };
343 } // namespace pdf
344 } // namespace foxit
345 #endif // FS_REFLOWPAGE_H_
346 
common::Progressive StartParse(common::PauseCallback *pause=0)
开始解析当前重排页面。
Definition: fs_reflowpage.h:61
float GetContentWidth() const
在当前重排页面对象解析完成后获取内容宽度。
float GetContentHeight() const
在当前重排页面对象解析完成后获取内容高度。
bool IsEmpty() const
检查当前对象是否为空。
void SetParseFlags(uint32 flags)
设置解析标志。可以在调用函数 ReflowPage::StartParse 之前调用此函数。
void SetImageScale(float image_scale)
设置图像缩放。可以在调用函数 ReflowPage::StartParse 之前调用此函数。
bool operator==(const ReflowPage &other) const
等于操作符。
Definition: fx_coordinates.h:30
bool operator !=(const ReflowPage &other) const
不等于操作符。
String GetFocusData(const Matrix &matrix, const PointF &point) const
获取设备坐标系中给定位置对应的焦点数据。
bool IsParsed() const
检查当前重排页面是否已被解析。
void SetTopSpace(float top_space)
设置顶部空间。可以在调用函数 ReflowPage::StartParse 之前调用此函数。
PointF GetFocusPosition(const Matrix &matrix, const char *focus_data) const
获取设备坐标系中给定焦点数据对应的位置。
void SetZoom(int zoom)
设置缩放因子。可以在调用函数 ReflowPage::StartParse 之前调用此函数。
ReflowPage & operator=(const ReflowPage &other)
赋值操作符。
void SetScreenSize(float width, float height)
设置屏幕尺寸。在调用函数 ReflowPage::StartParse 和 ReflowPage::SetLineSpace 之前应该调用此函数。
void SetLineSpace(float line_space)
设置行间距。可以在调用函数 ReflowPage::StartParse 之前调用此函数。
解析标志,用于决定是否允许在指定屏幕尺寸内截断第一个/最后一个图像或文本行。
Definition: fs_reflowpage.h:90
Definition: fx_basic.h:3737
Definition: fs_common.h:373
Matrix GetDisplayMatrix(float offset_x, float offset_y, int width, int height, common::Rotation rotate) const
根据当前重排页面和屏幕之间顶边的偏移量获取显示矩阵。
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:196
Definition: fs_pdfpage.h:421
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:214
通用定义和类的头文件。
void SetScreenMargin(int left, int top, int right, int bottom)
设置边距。可以在调用函数 ReflowPage::StartParse 之前调用此函数。
图像模式的解析标志。
Definition: fs_reflowpage.h:72
~ReflowPage()
析构函数。
Definition: fs_basictypes.h:449
Flags
用于重排页面的解析标志枚举。
Definition: fs_reflowpage.h:68
Rotation
旋转的枚举。
Definition: fs_common.h:57
Foxit命名空间。
Definition: fs_taggedpdf.h:27
正常模式的解析标志,不包含图像。
Definition: fs_reflowpage.h:70
字节字符串类
Definition: fx_string.h:317
#define NULL
空指针值。
Definition: fx_system.h:792
ReflowPage(const PDFPage &page)
从已解析的PDF页面构造的构造函数。
Definition: fx_coordinates.h:1076