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

Public Member Functions

 IconFit ()
 Constructor.

 
 IconFit (int type, boolean is_proportional_scaling, float horizontal_fraction, float vertical_fraction, boolean fit_bounds)
 Constructor, with parameters. More...
 
 IconFit (IconFit icon_fit)
 Constructor, with another IconFit object. More...
 
boolean getFit_bounds ()
 Get a boolean value that indicates whether to scale button appearance to fit fully within bounds or not. More...
 
float getHorizontal_fraction ()
 Get the horizontal fraction of left-over space to allocate at the left and bottom of the icon. More...
 
boolean getIs_proportional_scaling ()
 Get a boolean value which indicates whether use proportional scaling or not. More...
 
int getScale_way_type ()
 Get the circumstances under which the icon should be scaled inside the annotation rectangle. More...
 
float getVertical_fraction ()
 Get the vertical fraction of left-over space to allocate at the left and bottom of the icon. More...
 
void set (int type, boolean is_proportional_scaling, float horizontal_fraction, float vertical_fraction, boolean fit_bounds)
 Set value. More...
 
void setFit_bounds (boolean value)
 Set a boolean value that indicates whether to scale button appearance to fit fully within bounds or not. More...
 
void setHorizontal_fraction (float value)
 Set the horizontal fraction of left-over space to allocate at the left and bottom of the icon. More...
 
void setIs_proportional_scaling (boolean value)
 Set a boolean value which indicates whether use proportional scaling or not. More...
 
void setScale_way_type (int value)
 Set the circumstances under which the icon should be scaled inside the annotation rectangle. More...
 
void setVertical_fraction (float value)
 Set the vertical fraction of left-over space to allocate at the left and bottom of the icon. More...
 

Static Public Attributes

static final int e_ScaleWayAlways = 1
 Always scale.
 
static final int e_ScaleWayBigger = 2
 Scale only when icon is bigger than annotation rectangle.
 
static final int e_ScaleWayNever = 4
 Never scale.
 
static final int e_ScaleWaySmaller = 3
 Scale only when icon is smaller than annotation rectangle.
 

Detailed Description

This class represents icon fit information. Icon fit information is used to specify how to display a button's icon within the annotation rectangle of its associated widget annotation.

Constructor & Destructor Documentation

◆ IconFit() [1/2]

com.foxit.sdk.pdf.annots.IconFit.IconFit ( int  type,
boolean  is_proportional_scaling,
float  horizontal_fraction,
float  vertical_fraction,
boolean  fit_bounds 
)

Constructor, with parameters.

Parameters
typeThe circumstances under which the icon should be scaled inside the annotation rectangle. Please refer to values starting from e_ScaleWayAlways and this should be one of these values.
is_proportional_scalingIndicates whether use proportional scaling or not. true means to fill the annotation rectangle exactly, without regard to its original aspect ratio (ratio of width to height). false means scale the icon to scale the icon to fit the width or height of the annotation rectangle while maintaining the icon's original aspect ratio.
horizontal_fractionThe horizontal fraction of left-over space to allocate at the left and bottom of the icon if the icon is scaled proportionally. Valid range: 0.0 to 1.0.
vertical_fractionThe vertical fraction of left-over space to allocate at the left and bottom of the icon if the icon is scaled proportionally. Valid range: 0.0 to 1.0.
fit_boundsIndicates whether to scale button appearance to fit fully within bounds or not. true means that the button appearance should be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border.

◆ IconFit() [2/2]

com.foxit.sdk.pdf.annots.IconFit.IconFit ( IconFit  icon_fit)

Constructor, with another IconFit object.

Parameters
icon_fitAnother IconFit object.

Member Function Documentation

◆ getFit_bounds()

com.foxit.sdk.pdf.annots.IconFit.getFit_bounds ( )

Get a boolean value that indicates whether to scale button appearance to fit fully within bounds or not.

true indicates that the button appearance should be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border.

Returns
A boolean value that indicates whether to scale button appearance to fit fully within bounds or not.

◆ getHorizontal_fraction()

com.foxit.sdk.pdf.annots.IconFit.getHorizontal_fraction ( )

Get the horizontal fraction of left-over space to allocate at the left and bottom of the icon.

This entry is used only if the icon is scaled proportionally. Valid range: 0.0 to 1.0.

Returns
The horizontal fraction of left-over space to allocate at the left and bottom of the icon.

◆ getIs_proportional_scaling()

com.foxit.sdk.pdf.annots.IconFit.getIs_proportional_scaling ( )

Get a boolean value which indicates whether use proportional scaling or not.

true means to fill the annotation rectangle exactly, without regard to its original aspect ratio (ratio of width to height). false means scale the icon to scale the icon to fit the width or height of the annotation rectangle while maintaining the icon's original aspect ratio.

Returns
A boolean value which indicates whether use proportional scaling or not.

◆ getScale_way_type()

com.foxit.sdk.pdf.annots.IconFit.getScale_way_type ( )

Get the circumstances under which the icon should be scaled inside the annotation rectangle.

Returns
The circumstances under which the icon should be scaled inside the annotation rectangle. Please refer to values starting from e_ScaleWayAlways and this should be one of these values.

◆ getVertical_fraction()

com.foxit.sdk.pdf.annots.IconFit.getVertical_fraction ( )

Get the vertical fraction of left-over space to allocate at the left and bottom of the icon.

This entry is used only if the icon is scaled proportionally. Valid range: 0.0 to 1.0.

Returns
The vertical fraction of left-over space to allocate at the left and bottom of the icon.

◆ set()

void com.foxit.sdk.pdf.annots.IconFit.set ( int  type,
boolean  is_proportional_scaling,
float  horizontal_fraction,
float  vertical_fraction,
boolean  fit_bounds 
)

Set value.

Parameters
typeThe circumstances under which the icon should be scaled inside the annotation rectangle. Please refer to values starting from e_ScaleWayAlways and this should be one of these values.
is_proportional_scalingIndicates whether use proportional scaling or not. true means to fill the annotation rectangle exactly, without regard to its original aspect ratio (ratio of width to height). false means scale the icon to scale the icon to fit the width or height of the annotation rectangle while maintaining the icon's original aspect ratio.
horizontal_fractionThe horizontal fraction of left-over space to allocate at the left and bottom of the icon if the icon is scaled proportionally. Valid range: 0.0 to 1.0.
vertical_fractionThe vertical fraction of left-over space to allocate at the left and bottom of the icon if the icon is scaled proportionally. Valid range: 0.0 to 1.0.
fit_boundsIndicates whether to scale button appearance to fit fully within bounds or not. true means that the button appearance should be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border.
Returns
None.

◆ setFit_bounds()

com.foxit.sdk.pdf.annots.IconFit.setFit_bounds ( boolean  value)

Set a boolean value that indicates whether to scale button appearance to fit fully within bounds or not.

true indicates that the button appearance should be scaled to fit fully within the bounds of the annotation without taking into consideration the line width of the border.

Parameters
[in]fit_boundsA boolean value that indicates whether to scale button appearance to fit fully within bounds or not.
Returns
None.

◆ setHorizontal_fraction()

com.foxit.sdk.pdf.annots.IconFit.setHorizontal_fraction ( float  value)

Set the horizontal fraction of left-over space to allocate at the left and bottom of the icon.

This entry is used only if the icon is scaled proportionally. Valid range: 0.0 to 1.0.

Parameters
[in]horizontal_fractionThe horizontal fraction of left-over space to allocate at the left and bottom of the icon.
Returns
None.

◆ setIs_proportional_scaling()

com.foxit.sdk.pdf.annots.IconFit.setIs_proportional_scaling ( boolean  value)

Set a boolean value which indicates whether use proportional scaling or not.

true means to fill the annotation rectangle exactly, without regard to its original aspect ratio (ratio of width to height). false means scale the icon to scale the icon to fit the width or height of the annotation rectangle while maintaining the icon's original aspect ratio.

Parameters
[in]is_proportional_scalingA boolean value which indicates whether use proportional scaling or not.
Returns
None.

◆ setScale_way_type()

com.foxit.sdk.pdf.annots.IconFit.setScale_way_type ( int  value)

Set the circumstances under which the icon should be scaled inside the annotation rectangle.

Parameters
[in]scale_way_typeThe circumstances under which the icon should be scaled inside the annotation rectangle. Please refer to values starting from e_ScaleWayAlways and this should be one of these values.
Returns
None.

◆ setVertical_fraction()

com.foxit.sdk.pdf.annots.IconFit.setVertical_fraction ( float  value)

Set the vertical fraction of left-over space to allocate at the left and bottom of the icon.

This entry is used only if the icon is scaled proportionally. Valid range: 0.0 to 1.0.

Parameters
[in]vertical_fractionThe vertical fraction of left-over space to allocate at the left and bottom of the icon.
Returns
None.

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