Foxit PDF SDK
fs_psi.h
浏览该文件的文档.
1 
15 #ifndef FS_PSI_H_
16 #define FS_PSI_H_
17 
18 #include "common/fs_common.h"
19 #include "pdf/annots/fs_annot.h"
20 #include "pdf/fs_pdfpage.h"
21 
27 namespace foxit {
31 namespace pdf {
32 // forward declaration
33 class PSI;
34 
40 class PSICallback {
41  public:
47  virtual void Release() = 0;
56  virtual void Refresh(PSI psi, const RectF& rect) = 0;
57 
58  protected:
59  ~PSICallback() {}
60 };
61 
73 class PSI FS_FINAL : public Base {
74  public:
84  PSI(common::Bitmap& bitmap, bool simulate);
85 
95  PSI(int width, int height, bool simulate);
96 
102  PSI(const PSI& other);
110  PSI& operator = (const PSI& other);
111 
119  bool operator == (const PSI& other) const;
127  bool operator != (const PSI& other) const;
128 
136  bool IsEmpty() const;
138  ~PSI();
139 
149  void SetCallback(PSICallback* callback);
150 
161  void SetColor(RGB color);
162 
173  void SetDiameter(int diameter);
174 
186  void SetOpacity(float opacity);
187 
199  void AddPoint(const PointF& point, common::Path::PointType type, float pressure);
200 
209 
216 
238  annots::PSInk ConvertToPDFAnnot(const PDFPage& page, const RectF& annot_rect, common::Rotation rotate);
239 
240  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
241  explicit PSI(FS_HANDLE handle = NULL);
242 
243 };
244 } // namespace pdf
245 } // namespace foxit
246 #endif // FS_PSI_H_
247 
foxit::pdf::PSI::ConvertToPDFAnnot
annots::PSInk ConvertToPDFAnnot(const PDFPage &page, const RectF &annot_rect, common::Rotation rotate)
将PSI对象转换为PSInk注释并将PSInk注释插入到PDF页面中。
foxit::pdf::PSI::GetBitmap
common::Bitmap GetBitmap()
获取画布位图。
foxit::FS_HANDLE
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:214
foxit::common::Path::PointType
PointType
路径中点类型枚举。
Definition: fs_common.h:2174
foxit::pdf::PSI::operator=
PSI & operator=(const PSI &other)
赋值操作符。
fs_common.h
通用定义和类的头文件。
foxit::pdf::PSI::SetCallback
void SetCallback(PSICallback *callback)
设置用于刷新的回调对象。
foxit::pdf::PSI::operator==
bool operator==(const PSI &other) const
相等操作符。
foxit::pdf::PSI::SetDiameter
void SetDiameter(int diameter)
设置墨水直径。
foxit::pdf::PSI::AddPoint
void AddPoint(const PointF &point, common::Path::PointType type, float pressure)
添加一个点。
foxit::pdf::PSI::operator!=
bool operator!=(const PSI &other) const
不相等操作符。
CFX_PSVTemplate
Definition: fx_coordinates.h:30
foxit::common::Rotation
Rotation
旋转的枚举。
Definition: fs_common.h:57
foxit::pdf::PSI
Definition: fs_psi.h:73
fs_pdfpage.h
PDF页面相关定义和类的头文件。
foxit
Foxit命名空间。
Definition: fs_taggedpdf.h:27
foxit::pdf::PSICallback::Refresh
virtual void Refresh(PSI psi, const RectF &rect)=0
用于刷新PSI指定区域的回调函数。
foxit::pdf::PSI::~PSI
~PSI()
析构函数。
foxit::pdf::annots::PSInk
Definition: fs_annot.h:4981
foxit::pdf::PSICallback
Definition: fs_psi.h:40
NULL
#define NULL
空指针值。
Definition: fx_system.h:792
foxit::pdf::PSI::SetOpacity
void SetOpacity(float opacity)
设置墨水不透明度。
foxit::pdf::PSI::SetColor
void SetColor(RGB color)
设置墨水颜色。
CFX_FloatRect
Definition: fx_coordinates.h:771
foxit::RGB
uint32 RGB
RGB 颜色类型,24 位,((b) | ((g) << 8) | ((r) << 16)))
Definition: fs_basictypes.h:212
foxit::pdf::PDFPage
Definition: fs_pdfpage.h:421
foxit::pdf::PSI::PSI
PSI(common::Bitmap &bitmap, bool simulate)
构造函数,使用位图作为画布。
foxit::pdf::PSI::GetContentsRect
RectF GetContentsRect()
获取内容矩形。
fs_annot.h
注释相关定义和类的头文件。
foxit::common::Bitmap
Definition: fs_image.h:36
foxit::pdf::PSI::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit::pdf::PSICallback::Release
virtual void Release()=0
用于释放当前回调对象本身的回调函数。
foxit::Base
Definition: fs_basictypes.h:449