Foxit PDF SDK
foxit.pdf.annots.IconProviderCallback类 参考

继承自 SystemIDisposable .

Public 成员函数

virtual bool CanChangeColor (Annot.Type annot_type, string icon_name)
 用于检查当前图标提供程序是否支持为指定类型更改颜色的回调函数。 更多...
 
virtual float GetDisplayHeight (Annot.Type annot_type, string icon_name)
 用于获取指定图标显示高度的回调函数,以设备大小(通常为像素)为单位。 更多...
 
virtual float GetDisplayWidth (Annot.Type annot_type, string icon_name)
 用于获取指定图标显示宽度的回调函数,以设备大小(通常为像素)为单位。 更多...
 
virtual PDFPage GetIcon (Annot.Type annot_type, string icon_name, uint color, PDFDictionary annot_dict)
 用于获取指定类型图标作为PDF页面内容的回调函数。 更多...
 
virtual string GetProviderID ()
 用于获取提供程序ID的回调函数。 更多...
 
virtual string GetProviderVersion ()
 用于获取提供程序版本的回调函数。 更多...
 
virtual bool GetShadingColor (Annot.Type annot_type, string icon_name, int referenced_color, int shading_index, ShadingColor out_shading_color)
 用于获取着色颜色的回调函数(如果当前图标提供程序支持指定类型)。 目前,仅支持具有两个颜色值的Type-2着色设置。 更多...
 
virtual bool HasIcon (Annot.Type annot_type, string icon_name)
 用于检查当前图标提供程序是否支持指定类型图标的回调函数。 更多...
 
virtual void Release ()
 用于释放当前回调对象自身的回调函数。 更多...
 

详细描述

此类表示作为自定义注释图标提供程序的回调对象。 此类中的所有函数都用作回调函数。纯虚函数应由用户实现,用户也可以选择在必要时实现部分或全部重置虚函数。 图标提供程序只能用于便签、文件附件、印章注释。
图标提供程序的ID和版本被视为图标提供程序的名称,因此请通过回调函数 IconProviderCallback.GetProviderID IconProviderCallback.GetProviderVersion 为不同的图标提供程序提供不同的"ID + 版本"。

成员函数说明

◆ CanChangeColor()

bool foxit.pdf.annots.IconProviderCallback.CanChangeColor ( Annot.Type  annot_type,
string  icon_name 
)
inlinevirtual

用于检查当前图标提供程序是否支持为指定类型更改颜色的回调函数。

参数
[in]annot_type注释类型。应为 foxit.pdf.annots.Annot.Type.e_Note foxit.pdf.annots.Annot.Type.e_FileAttachment foxit.pdf.annots.Annot.Type.e_Stamp 之一。
[in]icon_name注释的图标名称。
返回
true 表示当前图标提供程序支持为指定图标类型更改颜色,false 表示不支持。

◆ GetDisplayHeight()

float foxit.pdf.annots.IconProviderCallback.GetDisplayHeight ( Annot.Type  annot_type,
string  icon_name 
)
inlinevirtual

用于获取指定图标显示高度的回调函数,以设备大小(通常为像素)为单位。

参数
[in]annot_type注释类型。应为 foxit.pdf.annots.Annot.Type.e_Note foxit.pdf.annots.Annot.Type.e_FileAttachment foxit.pdf.annots.Annot.Type.e_Stamp 之一。
[in]icon_name注释的图标名称。
返回
显示高度。

◆ GetDisplayWidth()

float foxit.pdf.annots.IconProviderCallback.GetDisplayWidth ( Annot.Type  annot_type,
string  icon_name 
)
inlinevirtual

用于获取指定图标显示宽度的回调函数,以设备大小(通常为像素)为单位。

参数
[in]annot_type注释类型。应为 foxit.pdf.annots.Annot.Type.e_Note foxit.pdf.annots.Annot.Type.e_FileAttachment foxit.pdf.annots.Annot.Type.e_Stamp 之一。
[in]icon_name注释的图标名称。
返回
显示宽度。

◆ GetIcon()

PDFPage foxit.pdf.annots.IconProviderCallback.GetIcon ( Annot.Type  annot_type,
string  icon_name,
uint  color,
PDFDictionary  annot_dict 
)
inlinevirtual

用于获取指定类型图标作为PDF页面内容的回调函数。

参数
[in]annot_type注释类型。应为 foxit.pdf.annots.Annot.Type.e_Note foxit.pdf.annots.Annot.Type.e_FileAttachment foxit.pdf.annots.Annot.Type.e_Stamp 之一。
[in]icon_name注释的图标名称。
[in]color注释的图标颜色。格式:0xAARRGGBB。
[in]annot_dict注释字典。
返回
内容将用作图标的PDF页面对象。

◆ GetProviderID()

string foxit.pdf.annots.IconProviderCallback.GetProviderID ( )
inlinevirtual

用于获取提供程序ID的回调函数。

图标提供程序的ID和版本被视为图标提供程序的名称,因此请为不同的图标提供程序 提供不同的"ID + 版本"。

返回
提供程序ID。

◆ GetProviderVersion()

string foxit.pdf.annots.IconProviderCallback.GetProviderVersion ( )
inlinevirtual

用于获取提供程序版本的回调函数。

图标提供程序的ID和版本被视为图标提供程序的名称,因此请为不同的图标提供程序 提供不同的"ID + 版本"。

返回
版本字符串。

◆ GetShadingColor()

bool foxit.pdf.annots.IconProviderCallback.GetShadingColor ( Annot.Type  annot_type,
string  icon_name,
int  referenced_color,
int  shading_index,
ShadingColor  out_shading_color 
)
inlinevirtual

用于获取着色颜色的回调函数(如果当前图标提供程序支持指定类型)。 目前,仅支持具有两个颜色值的Type-2着色设置。

参数
[in]annot_type注释类型。应为 foxit.pdf.annots.Annot.Type.e_Note foxit.pdf.annots.Annot.Type.e_FileAttachment foxit.pdf.annots.Annot.Type.e_Stamp 之一。
[in]icon_name注释的图标名称。
[in]referenced_color参考颜色。格式:0xRRGGBB。
[in]shading_index着色的索引颜色,从0开始。如果着色颜色超过一个,此函数将被多次调用。
[out]out_shading_color接收两个着色颜色值的输出参数。
返回
true 表示成功,false 表示失败。

◆ HasIcon()

bool foxit.pdf.annots.IconProviderCallback.HasIcon ( Annot.Type  annot_type,
string  icon_name 
)
inlinevirtual

用于检查当前图标提供程序是否支持指定类型图标的回调函数。

参数
[in]annot_type注释类型。应该是foxit.pdf.annots.Annot.Type.e_Note foxit.pdf.annots.Annot.Type.e_FileAttachment foxit.pdf.annots.Annot.Type.e_Stamp 中的一个。
[in]icon_name注释的图标名称。
返回
true表示当前图标提供程序支持指定的图标,而false表示不支持。

◆ Release()

void foxit.pdf.annots.IconProviderCallback.Release ( )
inlinevirtual

用于释放当前回调对象自身的回调函数。

返回
无。