Foxit PDF SDK
fs_ofdimageobject.h
1 #ifndef FS_OFD_IMAGEOBJECT_H_
2 #define FS_OFD_IMAGEOBJECT_H_
3 
4 #include "common/fs_common.h"
5 #include "fs_ofdgraphicsobject.h"
6 
12 namespace foxit {
16 namespace ofd {
20 namespace graphics {
22 class OFDImageObject FS_FINAL : public OFDGraphicsObject {
23  public:
29  explicit OFDImageObject(OFDGraphicsObject object);
30 
33 
39  OFDImageObject(const OFDImageObject& other);
40 
49 
57  bool operator == (const OFDImageObject& other) const;
58 
66  bool operator != (const OFDImageObject& other) const;
67 
75  bool IsEmpty() const;
76 
82  String GetImageBuffer() const;
83 
93  foxit::uint32 SetImage(const void* buffer, size_t size, foxit::common::Image::Type format);
94 
102  foxit::uint32 SetImage(const String& file_path);
103 
111  foxit::uint32 SetImage(const WString& file_path);
112 
120  void SetImage(foxit::uint32 resource_id);
121 
129 
130  explicit OFDImageObject(FS_HANDLE handle);
131 };
132 
133 } // namespace objects
134 } // namespace ofd
135 } // namespace foxit
136 
137 #endif // FS_OFD_IMAGEOBJECT_H_
Definition: fs_ofdgraphicsobject.h:177
bool IsEmpty() const
检查当前对象是否为空。
宽字符串类
Definition: fx_string.h:1457
String GetImageBuffer() const
获取图像对象中的图像数据。
foxit::common::Image::Type GetImageFormat() const
获取图像对象格式。
OFDImageObject & operator=(const OFDImageObject &other)
赋值操作符。
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:195
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
通用定义和类的头文件。
bool operator==(const OFDImageObject &other) const
相等操作符。
Definition: fs_ofdimageobject.h:22
bool operator !=(const OFDImageObject &other) const
不相等操作符。
Type
图像类型的枚举。
Definition: fs_image.h:457
foxit::uint32 SetImage(const void *buffer, size_t size, foxit::common::Image::Type format)
通过内存缓冲区设置图像对象中的图像数据。
Foxit命名空间。
Definition: fs_pdf3d.h:26
字节字符串类
Definition: fx_string.h:317
OFDImageObject(OFDGraphicsObject object)
构造函数,从现有foxit::ofd::graphics::OFDGraphicsObject对象。