Foxit PDF SDK
foxit::ofd::graphics::OFDImageObject类 参考
类 foxit::ofd::graphics::OFDImageObject 继承关系图:
foxit::ofd::graphics::OFDGraphicsObject foxit::Base

Public 成员函数

 OFDImageObject (OFDGraphicsObject object)
 构造函数,从现有foxit::ofd::graphics::OFDGraphicsObject对象。 更多...
 
 OFDImageObject (const OFDImageObject &other)
 构造函数,通过另一个OFD图像对象。 更多...
 
 ~OFDImageObject ()
 析构函数。
 
String GetImageBuffer () const
 获取图像对象中的图像数据。 更多...
 
foxit::common::Image::Type GetImageFormat () const
 获取图像对象格式。 更多...
 
bool IsEmpty () const
 检查当前对象是否为空。 更多...
 
bool operator != (const OFDImageObject &other) const
 不相等操作符。 更多...
 
OFDImageObjectoperator= (const OFDImageObject &other)
 赋值操作符。 更多...
 
bool operator== (const OFDImageObject &other) const
 相等操作符。 更多...
 
foxit::uint32 SetImage (const void *buffer, size_t size, foxit::common::Image::Type format)
 通过内存缓冲区设置图像对象中的图像数据。 更多...
 
foxit::uint32 SetImage (const String &file_path)
 通过文件设置图像对象中的图像数据。 更多...
 
foxit::uint32 SetImage (const WString &file_path)
 通过文件设置图像对象中的图像数据。 更多...
 
void SetImage (foxit::uint32 resource_id)
 通过资源ID设置图像对象中的图像数据。 更多...
 
- Public 成员函数 继承自 foxit::ofd::graphics::OFDGraphicsObject
 OFDGraphicsObject (const OFDGraphicsObject &other)
 构造函数,通过另一个OFD图元对象。 更多...
 
 ~OFDGraphicsObject ()
 析构函数。
 
Actions CreateActions ()
 创建图元对象动作集合对象。 更多...
 
Actions GetActions ()
 获取图元对象的动作集合。 更多...
 
foxit::uint8 GetAlpha ()
 获取图元对象alpha属性。 更多...
 
BorderInfo GetBorderInfo ()
 获取图元对象边框信息(只有Image和Video对象可能会存在边框)。 更多...
 
foxit::RectF GetBoundary ()
 获取图元对象矩形外接框。 更多...
 
float GetDashOffset ()
 获取图元对象虚线重复样式。 更多...
 
foxit::FloatArray GetDashPattern ()
 获取图元对象虚线重复样式数组。 更多...
 
foxit::RGB GetFillColor ()
 获取图元对象填充颜色。 更多...
 
foxit::uint32 GetID ()
 获取图元对象资源ID。 更多...
 
LineCapMode GetLineCap ()
 获取图元对象线帽样式。 更多...
 
LineJoinMode GetLineJoin ()
 获取线条连接样式。 更多...
 
float GetLineWidth ()
 获取图元对象线宽。 更多...
 
foxit::Matrix GetMatrix ()
 获取图元对象矩阵。 更多...
 
float GetMiterLimit ()
 获取图元对象斜切限制值。 更多...
 
String GetName ()
 获取图元对象名称。 更多...
 
int GetPageIndex ()
 获取图元对象所在页面的索引号。 更多...
 
foxit::RGB GetStrokeColor ()
 获取图元对象勾边颜色。 更多...
 
ObjectType GetType ()
 获取图元对象类型。 更多...
 
bool HasBorder ()
 判断图元对象是否有边框。 更多...
 
bool IsEmpty () const
 检查当前对象是否为空。 更多...
 
bool IsVisible ()
 获取图元对象可见性属性。 更多...
 
bool operator != (const OFDGraphicsObject &other) const
 不相等操作符。 更多...
 
OFDGraphicsObjectoperator= (const OFDGraphicsObject &other)
 赋值操作符。 更多...
 
bool operator== (const OFDGraphicsObject &other) const
 相等操作符。 更多...
 
void SetAlpha (foxit::uint8 alpha)
 设置图元对象alpha属性。 更多...
 
void SetBorderInfo (const BorderInfo &border_info)
 设置图元对象边框信息。 更多...
 
void SetBoundary (const RectF &boundary)
 设置图元对象矩形外接框。 更多...
 
void SetDashOffset (float dash_offset)
 设置图元对象虚线重复样式起始值。 更多...
 
void SetDashPattern (float dash_offset, const foxit::FloatArray &dash_offset_array)
 设置图元对象虚线重复样式。 更多...
 
void SetFillColor (foxit::uint32 fill_color)
 设置图元对象填充颜色。 更多...
 
void SetLineCap (LineCapMode line_cap=e_LineCapButt)
 设置图元对象线帽样式。 更多...
 
void SetLineJoin (LineJoinMode line_join=e_LineJoinMiter)
 设置线条连接样式。 更多...
 
void SetLineWidth (float line_width)
 设置图元对象线宽。 更多...
 
void SetMatrix (const Matrix &mt)
 设置图元对象矩阵。 更多...
 
void SetMiterLimit (float miter_limit)
 设置图元对象斜切限制值。 更多...
 
void SetName (const String &name)
 设置图元对象名称。 更多...
 
void SetStrokeColor (foxit::uint32 stroke_color)
 设置图元对象勾边颜色。 更多...
 
void SetVisible (bool visible)
 设置图元对象可见性属性。 更多...
 
- Public 成员函数 继承自 foxit::Base
FS_HANDLE Handle () const
 获取当前对象的句柄。 更多...
 

额外继承的成员函数

- Public 类型 继承自 foxit::ofd::graphics::OFDGraphicsObject
enum  LineCapMode { e_LineCapButt = 0, e_LineCapRound = 1, e_LineCapSquare = 2 }
 OFD线端点样式枚举。 更多...
 
enum  LineJoinMode { e_LineJoinMiter = 0, e_LineJoinRound = 1, e_LineJoinBevel = 2 }
 OFD线条连接样式枚举。 更多...
 
enum  ObjectType {
  e_ObjectTypeUnknown = 0, e_ObjectTypePageBlock = 2, e_ObjectTypeComposite = 3, e_ObjectTypeSVG = 4,
  e_ObjectTypeText = 5, e_ObjectTypePath = 6, e_ObjectTypeImage = 7, e_ObjectTypeVideo = 8
}
 OFD图元对象类型定义枚举类型. 更多...
 

详细描述

此类表示和OFD图像对象相关的方法。

构造及析构函数说明

◆ OFDImageObject() [1/2]

foxit::ofd::graphics::OFDImageObject::OFDImageObject ( OFDGraphicsObject  object)
explicit

构造函数,从现有foxit::ofd::graphics::OFDGraphicsObject对象。

参数
[in]objectOFDGraphicsObject对象。 此对象必须是一个有效的对象,并且其类型必须是foxit::ofd::graphics::OFDGraphicsObject::e_ObjectTypeImage,否则构造函数将抛出异常。

◆ OFDImageObject() [2/2]

foxit::ofd::graphics::OFDImageObject::OFDImageObject ( const OFDImageObject other)

构造函数,通过另一个OFD图像对象。

参数
[in]other另一个OFD图像对象。

成员函数说明

◆ GetImageBuffer()

String foxit::ofd::graphics::OFDImageObject::GetImageBuffer ( ) const

获取图像对象中的图像数据。

返回
图像对象中的图像数据。

◆ GetImageFormat()

foxit::common::Image::Type foxit::ofd::graphics::OFDImageObject::GetImageFormat ( ) const

获取图像对象格式。

返回
图像对象格式。请参考从 foxit::common::Image::e_Unknown 开始的值, 应该是这些值中的一个。

◆ IsEmpty()

bool foxit::ofd::graphics::OFDImageObject::IsEmpty ( ) const

检查当前对象是否为空。

当前对象为空时,表示当前对象是无用的。

返回
true 表示当前对象为空,false 表示不为空。

◆ operator !=()

bool foxit::ofd::graphics::OFDImageObject::operator != ( const OFDImageObject other) const

不相等操作符。

参数
[in]other另一个OFD图像对象。此函数将检查当前对象是否不等于这个对象。
返回
true 表示不相等,false 表示相等。

◆ operator=()

OFDImageObject& foxit::ofd::graphics::OFDImageObject::operator= ( const OFDImageObject other)

赋值操作符。

参数
[in]other另一个OFD图像对象,其值将被赋给当前对象。
返回
当前对象自身的引用。

◆ operator==()

bool foxit::ofd::graphics::OFDImageObject::operator== ( const OFDImageObject other) const

相等操作符。

参数
[in]other另一个OFD图像对象。此函数将检查当前对象是否等于这个对象。
返回
true 表示相等,false 表示不相等。

◆ SetImage() [1/4]

foxit::uint32 foxit::ofd::graphics::OFDImageObject::SetImage ( const void *  buffer,
size_t  size,
foxit::common::Image::Type  format 
)

通过内存缓冲区设置图像对象中的图像数据。

参数
[in]buffer指定的内存缓冲区。
[in]size指定的内存缓冲区大小。
[in]format指定的图像格式。
返回
图像资源ID。

◆ SetImage() [2/4]

foxit::uint32 foxit::ofd::graphics::OFDImageObject::SetImage ( const String file_path)

通过文件设置图像对象中的图像数据。

参数
[in]file_path指定的图像文件路径。它不应该是空字符串。
返回
图像资源ID。

◆ SetImage() [3/4]

foxit::uint32 foxit::ofd::graphics::OFDImageObject::SetImage ( const WString file_path)

通过文件设置图像对象中的图像数据。

参数
[in]file_path指定的图像文件路径。它不应该是空字符串。
返回
图像资源ID。

◆ SetImage() [4/4]

void foxit::ofd::graphics::OFDImageObject::SetImage ( foxit::uint32  resource_id)

通过资源ID设置图像对象中的图像数据。

参数
[in]resource_id指定的图像资源ID。
返回
无。