Foxit PDF SDK

fs_ofdlayer.h
1 #ifndef FS_OFD_LAYER_H_
2 #define FS_OFD_LAYER_H_
3
4 #include "common/fs_common.h"
5 #include "graphics/fs_ofdgraphicsobject.h"
6 #include "graphics/fs_ofdtextobject.h"
7 #include "graphics/fs_ofdpathobject.h"
8 #include "graphics/fs_ofdimageobject.h"
9 #include "graphics/fs_ofdcompositeobject.h"
10
16 namespace foxit {
20 namespace ofd {
24 namespace graphics {
25 class OFDGraphicsObject;
26 class OFDBlockObject;
27 class OFDVideoObject;
28 }
29
31 class OFDLayer : public foxit::ofd::graphics::OFDGraphicsObject {
32 public:
38 typedef enum _LayerType {
40 e_LayerTypeBackground = 0,
42 e_LayerTypeBody = 1,
44 e_LayerTypeForeground = 2
45 } LayerType;
46
52 typedef enum _GraphicsObjectType {
54 e_GraphicsObjectTypeUnknown = 0,
56 e_GraphicsObjectTypeLayer = 1,
58 e_GraphicsObjectTypePageBlock = 2,
60 e_GraphicsObjectTypeComposite = 3,
62 e_GraphicsObjectTypeSvg = 4,
64 e_GraphicsObjectTypeText = 5,
66 e_GraphicsObjectTypePath = 6,
68 e_GraphicsObjectTypeImage = 7,
70 e_GraphicsObjectTypeVideo = 8
71 } GraphicsObjectType;
72
73
75 ~OFDLayer();
76
82 OFDLayer(const OFDLayer& other);
83
91 OFDLayer& operator = (const OFDLayer& other);
92
100 bool operator == (const OFDLayer& other) const;
101
109 bool operator != (const OFDLayer& other) const;
110
118 bool IsEmpty() const;
119
128 void SetType(LayerType type = e_LayerTypeBody);
129
137 int GetGraphicsObjectIndexByName(const String& name) const;
138
144 graphics::OFDPathObject AddPathObject();
145
151 graphics::OFDImageObject AddImageObject();
152
158 graphics::OFDTextObject AddTextObject();
159
165 graphics::OFDCompositeObject AddCompositeObject();
166
172 graphics::OFDBlockObject AddBlockObject();
173
179 graphics::OFDVideoObject AddVideoObject();
180
189 graphics::OFDGraphicsObject AddGraphicsObject(GraphicsObjectType type);
190
196 int GetGraphicsObjectCount() const;
197
206 graphics::OFDGraphicsObject GetGraphicsObject(int index) const;
207
216 graphics::OFDBlockObject GetPageBlock(int index) const;
217
227 GraphicsObjectType GetGraphicsObjectType(int index) const;
228
237 void RemoveGraphicsObject(int index);
238
244 void RemoveAllGraphicsObjects();
245
253 graphics::OFDGraphicsObject GetGraphicsObjectByID(int id);
254
255 explicit OFDLayer(FS_HANDLE handle);
256 };
257 } // namespace ofd
258 } // namespace foxit
259
260 #endif // FS_OFD_LAYER_H_
foxit::ofd::OFDLayer::AddTextObject
graphics::OFDTextObject AddTextObject()
添加图元对象-文本对象。
foxit::ofd::OFDLayer::GetGraphicsObjectIndexByName
int GetGraphicsObjectIndexByName(const String &name) const
通过名称获取图元对象索引。
foxit::ofd::OFDLayer::OFDLayer
OFDLayer(const OFDLayer &other)
构造函数，通过另一个OFD层对象。
foxit::ofd::OFDLayer::AddGraphicsObject
graphics::OFDGraphicsObject AddGraphicsObject(GraphicsObjectType type)
添加图元对象。
foxit::ofd::OFDLayer::GetGraphicsObjectCount
int GetGraphicsObjectCount() const
获取图元对象数量。
foxit::ofd::graphics::OFDGraphicsObject
Definition: fs_ofdgraphicsobject.h:177
foxit::ofd::OFDLayer::e_GraphicsObjectTypeLayer
层类型。
Definition: fs_ofdlayer.h:56
foxit::ofd::OFDLayer::AddCompositeObject
graphics::OFDCompositeObject AddCompositeObject()
添加图元对象-复合对象。
foxit::ofd::OFDLayer::e_GraphicsObjectTypeSvg
矢量对象。
Definition: fs_ofdlayer.h:62
foxit::ofd::OFDLayer::operator !=
bool operator !=(const OFDLayer &other) const
不相等操作符。
foxit::ofd::graphics::OFDPathObject
Definition: fs_ofdpathobject.h:206
foxit::ofd::OFDLayer::GetGraphicsObjectType
GraphicsObjectType GetGraphicsObjectType(int index) const
获取指定索引的图元对象类型。
foxit::ofd::OFDLayer::e_GraphicsObjectTypeText
文本对象。
Definition: fs_ofdlayer.h:64
foxit::ofd::OFDLayer::RemoveGraphicsObject
void RemoveGraphicsObject(int index)
删除指定索引的图元对象。
foxit::ofd::OFDLayer::operator==
bool operator==(const OFDLayer &other) const
相等操作符。
foxit::ofd::OFDLayer::e_LayerTypeForeground
前景层。
Definition: fs_ofdlayer.h:44
foxit::ofd::OFDLayer::AddBlockObject
graphics::OFDBlockObject AddBlockObject()
添加图元对象-块对象。
foxit::ofd::OFDLayer::SetType
void SetType(LayerType type=e_LayerTypeBody)
设置类型
foxit::ofd::OFDLayer::e_GraphicsObjectTypePath
路径对象。
Definition: fs_ofdlayer.h:66
foxit::ofd::OFDLayer::e_GraphicsObjectTypeVideo
视频对象。
Definition: fs_ofdlayer.h:70
foxit::ofd::OFDLayer::IsEmpty
bool IsEmpty() const
检查当前对象是否为空。
foxit::ofd::OFDLayer::AddVideoObject
graphics::OFDVideoObject AddVideoObject()
添加图元对象-视频对象。
foxit::ofd::OFDLayer::e_GraphicsObjectTypeUnknown
未知类型。
Definition: fs_ofdlayer.h:54
foxit::ofd::OFDLayer::AddImageObject
graphics::OFDImageObject AddImageObject()
添加图元对象-图像对象。
foxit::ofd::OFDLayer::e_GraphicsObjectTypeComposite
复合对象。
Definition: fs_ofdlayer.h:60
foxit::ofd::OFDLayer::GetGraphicsObjectByID
graphics::OFDGraphicsObject GetGraphicsObjectByID(int id)
通过ID获取图元对象。
foxit::ofd::graphics::OFDBlockObject
Definition: fs_ofdblockobject.h:21
foxit::ofd::OFDLayer::e_GraphicsObjectTypeImage
图像类型。
Definition: fs_ofdlayer.h:68
foxit::FS_HANDLE
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
fs_common.h
通用定义和类的头文件。
foxit::ofd::OFDLayer::GraphicsObjectType
GraphicsObjectType
OFD页面对象类型类型枚举。
Definition: fs_ofdlayer.h:52
foxit::ofd::OFDLayer::e_LayerTypeBackground
背景层。
Definition: fs_ofdlayer.h:40
foxit::ofd::graphics::OFDImageObject
Definition: fs_ofdimageobject.h:22
foxit::ofd::OFDLayer::RemoveAllGraphicsObjects
void RemoveAllGraphicsObjects()
删除所有图元对象。
foxit::ofd::OFDLayer::operator=
OFDLayer & operator=(const OFDLayer &other)
赋值操作符。
foxit::ofd::OFDLayer::e_GraphicsObjectTypePageBlock
页面块对象。
Definition: fs_ofdlayer.h:58
foxit::ofd::graphics::OFDCompositeObject
Definition: fs_ofdcompositeobject.h:111
foxit
Foxit命名空间。
Definition: fs_taggedpdf.h:27
foxit::ofd::OFDLayer::GetPageBlock
graphics::OFDBlockObject GetPageBlock(int index) const
获取指定索引的页面块对象。
CFX_ByteString
字节字符串类
Definition: fx_string.h:317
foxit::ofd::OFDLayer::LayerType
LayerType
OFD页面层类型枚举。
Definition: fs_ofdlayer.h:38
foxit::ofd::OFDLayer
Definition: fs_ofdlayer.h:31
foxit::ofd::OFDLayer::e_LayerTypeBody
正文层。
Definition: fs_ofdlayer.h:42
foxit::ofd::OFDLayer::GetGraphicsObject
graphics::OFDGraphicsObject GetGraphicsObject(int index) const
获取指定索引的图元对象。
foxit::ofd::OFDLayer::~OFDLayer
~OFDLayer()
析构函数。
foxit::ofd::graphics::OFDTextObject
Definition: fs_ofdtextobject.h:90
foxit::ofd::OFDLayer::AddPathObject
graphics::OFDPathObject AddPathObject()
添加图元对象-路径对象。
foxit::ofd::graphics::OFDVideoObject
Definition: fs_ofdvideoobject.h:22