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

Public 成员函数

boolean canChangeColor (int annot_type, String icon_name)
 用于检查当前图标提供程序是否支持为指定类型更改颜色的回调函数。
更多...
 
float getDisplayHeight (int annot_type, String icon_name)
 用于获取指定图标显示高度的回调函数,以设备大小(通常为像素)为单位。
更多...
 
float getDisplayWidth (int annot_type, String icon_name)
 用于获取指定图标显示宽度的回调函数,以设备大小(通常为像素)为单位。
更多...
 
PDFPage getIcon (int annot_type, String icon_name, long color, PDFDictionary annot_dict)
 用于获取指定类型图标作为PDF页面内容的回调函数。
更多...
 
String getProviderID ()
 用于获取提供程序ID的回调函数。
更多...
 
String getProviderVersion ()
 用于获取提供程序版本的回调函数。
更多...
 
boolean getShadingColor (int annot_type, String icon_name, long referenced_color, int shading_index, ShadingColor out_shading_color)
 用于获取着色颜色的回调函数(如果当前图标提供程序支持指定类型)。 目前,仅支持具有两个颜色值的Type-2着色设置。
更多...
 
boolean hasIcon (int annot_type, String icon_name)
 用于检查当前图标提供程序是否支持指定类型图标的回调函数。
更多...
 
void release ()
 用于释放当前回调对象自身的回调函数。
更多...
 

详细描述

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

成员函数说明

◆ canChangeColor()

boolean com.foxit.sdk.pdf.annots.IconProviderCallback.canChangeColor ( int  annot_type,
String  icon_name 
)

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

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

◆ getDisplayHeight()

float com.foxit.sdk.pdf.annots.IconProviderCallback.getDisplayHeight ( int  annot_type,
String  icon_name 
)

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

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

◆ getDisplayWidth()

float com.foxit.sdk.pdf.annots.IconProviderCallback.getDisplayWidth ( int  annot_type,
String  icon_name 
)

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

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

◆ getIcon()

PDFPage com.foxit.sdk.pdf.annots.IconProviderCallback.getIcon ( int  annot_type,
String  icon_name,
long  color,
PDFDictionary  annot_dict 
)

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

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

◆ getProviderID()

String com.foxit.sdk.pdf.annots.IconProviderCallback.getProviderID ( )

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

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

返回
提供程序ID。

◆ getProviderVersion()

String com.foxit.sdk.pdf.annots.IconProviderCallback.getProviderVersion ( )

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

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

返回
版本字符串。

◆ getShadingColor()

boolean com.foxit.sdk.pdf.annots.IconProviderCallback.getShadingColor ( int  annot_type,
String  icon_name,
long  referenced_color,
int  shading_index,
ShadingColor  out_shading_color 
)

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

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

◆ hasIcon()

boolean com.foxit.sdk.pdf.annots.IconProviderCallback.hasIcon ( int  annot_type,
String  icon_name 
)

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

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

◆ release()

void com.foxit.sdk.pdf.annots.IconProviderCallback.release ( )

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

返回
无。