foxit.pdf.annots.IconProviderCallback Class Reference

Inherits SystemIDisposable.

Public Member Functions

virtual bool CanChangeColor (Annot.Type annot_type, string icon_name)
 A callback function used to check if current icon provider supports to change color for a specified type. More...
 
virtual float GetDisplayHeight (Annot.Type 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...
 
virtual float GetDisplayWidth (Annot.Type 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...
 
virtual PDFPage GetIcon (Annot.Type annot_type, string icon_name, uint color)
 A callback function used to get the icon as PDF page contents for a specified type. More...
 
virtual string GetProviderID ()
 A callback function used to get provider ID. More...
 
virtual string GetProviderVersion ()
 A callback function used to get provider version. More...
 
virtual bool GetShadingColor (Annot.Type 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...
 
virtual bool HasIcon (Annot.Type annot_type, string icon_name)
 A callback function used to check if current icon provider supports icon for a specified type. More...
 
virtual void Release ()
 A callback function used to release current IconProviderCallback 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()

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

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

Parameters
annot_typeThe annotation type. It should be one of e_Note, e_FileAttachment and e_Stamp.
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 foxit.pdf.annots.IconProviderCallback.GetDisplayHeight ( Annot.Type  annot_type,
string  icon_name 
)
inlinevirtual

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

This can be triggered during rendering process only when function common::Renderer::SetTransformAnnotIcon is called with value false before rendering.

Parameters
annot_typeThe annotation type. It should be one of e_Note, e_FileAttachment and e_Stamp.
icon_nameIcon name of the annotation.
Returns
The height for display.

◆ GetDisplayWidth()

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

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

This can be triggered during rendering process only when function common::Renderer::SetTransformAnnotIcon is called with value false before rendering.

Parameters
annot_typeThe annotation type. It should be one of e_Note, e_FileAttachment and e_Stamp.
icon_nameIcon name of the annotation.
Returns
The width for display.

◆ GetIcon()

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

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

Parameters
annot_typeThe annotation type. It should be one of e_Note, e_FileAttachment and e_Stamp.
icon_nameIcon name of the annotation.
colorThe icon color of the annotation. Format: 0xAARRGGBB.
Returns
A pdf::PDFPage object whose content would be used as the icon.

◆ GetProviderID()

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

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 foxit.pdf.annots.IconProviderCallback.GetProviderVersion ( )
inlinevirtual

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()

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

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
annot_typeThe annotation type. It should be one of e_Note, e_FileAttachment and e_Stamp.
icon_nameIcon name of the annotation.
referenced_colorReferenced color. Format: 0xRRGGBB.
shading_indexIndex color of shading, starting from 0. If shading colors are more than one, this function will be called multiple times.
out_shading_colorThe two shading color value, returned by this function.
Returns
true means success, while false means failure.

◆ HasIcon()

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

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

Parameters
annot_typeThe annotation type. It should be one of e_Note, e_FileAttachment and e_Stamp.
icon_nameIcon name of the annotation.
Returns
true means current icon provider supports the specified icon, while false means not support.

◆ Release()

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

A callback function used to release current IconProviderCallback object itself.

Returns
None.

Foxit Software Corporation Logo
@2018 Foxit Software Incorporated. All rights reserved.