com.foxit.sdk.pdf.annots.IconProviderCallback Class Reference

Public Member Functions

boolean canChangeColor (int annot_type, String icon_name)
 A callback function used to check if current icon provider supports to change color for a specified type.
More...
 
float getDisplayHeight (int annot_type, String icon_name)
 A callback function used to get the height for display of a specified icon, in device size(pixel normally).
More...
 
float getDisplayWidth (int annot_type, String icon_name)
 A callback function used to get the width for display of a specified icon, in device size(pixel normally).
More...
 
PDFPage getIcon (int annot_type, String icon_name, int color)
 A callback function used to get the icon as PDF page contents for a specified type.
More...
 
String getProviderID ()
 A callback function used to get provider ID.
More...
 
String getProviderVersion ()
 A callback function used to get provider version.
More...
 
boolean getShadingColor (int annot_type, String icon_name, int referenced_color, int shading_index, ShadingColor out_shading_color)
 A callback function used to get the shading colors if current icon provider supports for a specified type. Currently, only support Type-2 shading settings with two color values.
More...
 
boolean hasIcon (int annot_type, String icon_name)
 A callback function used to check if current icon provider supports icon for a specified type.
More...
 
void release ()
 A callback function used to release current callback object itself.
More...
 

Detailed Description

This class represents a callback object as customized annotation icon provider. All the functions in this class are used as callback functions. Pure virtual functions should be implemented by user and user can also choose to implement some or all the reset virtual functions when necessary. Icon provider can only be used for note, file attachment, stamp annotations.
Icon provider's ID and version are treated as the name of the icon provider, so please offer different "ID + version" for different icon providers by callback functions IconProviderCallback.getProviderID and IconProviderCallback.getProviderVersion .

Member Function Documentation

◆ canChangeColor()

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

A callback function used to check if current icon provider supports to change color for a specified type.

Parameters
[in]annot_typeThe annotation type. It should be one of com.foxit.sdk.pdf.annots.Annot.e_Note , com.foxit.sdk.pdf.annots.Annot.e_FileAttachment and com.foxit.sdk.pdf.annots.Annot.e_Stamp .
[in]icon_nameIcon name of the annotation.
Returns
true means current icon provider supports to change color for a specified icon type, while false means not support.

◆ getDisplayHeight()

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

A callback function used to get the height for display of a specified icon, in device size(pixel normally).

Parameters
[in]annot_typeThe annotation type. It should be one of com.foxit.sdk.pdf.annots.Annot.e_Note , com.foxit.sdk.pdf.annots.Annot.e_FileAttachment and com.foxit.sdk.pdf.annots.Annot.e_Stamp .
[in]icon_nameIcon name of the annotation.
Returns
The height for display.

◆ getDisplayWidth()

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

A callback function used to get the width for display of a specified icon, in device size(pixel normally).

Parameters
[in]annot_typeThe annotation type. It should be one of com.foxit.sdk.pdf.annots.Annot.e_Note , com.foxit.sdk.pdf.annots.Annot.e_FileAttachment and com.foxit.sdk.pdf.annots.Annot.e_Stamp .
[in]icon_nameIcon name of the annotation.
Returns
The width for display.

◆ getIcon()

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

A callback function used to get the icon as PDF page contents for a specified type.

Parameters
[in]annot_typeThe annotation type. It should be one of com.foxit.sdk.pdf.annots.Annot.e_Note , com.foxit.sdk.pdf.annots.Annot.e_FileAttachment and com.foxit.sdk.pdf.annots.Annot.e_Stamp .
[in]icon_nameIcon name of the annotation.
[in]colorThe icon color of the annotation. Format: 0xAARRGGBB.
Returns
A PDF page object whose content would be used as the icon.

◆ getProviderID()

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

A callback function used to get provider ID.

Icon provider's ID and version are treated as the name of the icon provider, so please offer different "ID + version" for different icon providers.

Returns
The provider ID.

◆ getProviderVersion()

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

A callback function used to get provider version.

Icon provider's ID and version are treated as the name of the icon provider, so please offer different "ID + version" for different icon providers.

Returns
Version string.

◆ getShadingColor()

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

A callback function used to get the shading colors if current icon provider supports for a specified type. Currently, only support Type-2 shading settings with two color values.

Parameters
[in]annot_typeThe annotation type. It should be one of com.foxit.sdk.pdf.annots.Annot.e_Note , com.foxit.sdk.pdf.annots.Annot.e_FileAttachment and com.foxit.sdk.pdf.annots.Annot.e_Stamp .
[in]icon_nameIcon name of the annotation.
[in]referenced_colorReferenced color. Format: 0xRRGGBB.
[in]shading_indexIndex color of shading, starting from 0. If shading colors are more than one, this function will be called multiple times.
[out]out_shading_colorOutput parameter that receives the two shading color value.
Returns
true means success, while false means failure.

◆ hasIcon()

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

A callback function used to check if current icon provider supports icon for a specified type.

Parameters
[in]annot_typeThe annotation type. It should be one of com.foxit.sdk.pdf.annots.Annot.e_Note , com.foxit.sdk.pdf.annots.Annot.e_FileAttachment and com.foxit.sdk.pdf.annots.Annot.e_Stamp .
[in]icon_nameIcon name of the annotation.
Returns
true means current icon provider supports the specified icon, while false means not support.

◆ release()

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

A callback function used to release current callback object itself.

Returns
None.