Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
com.foxit.sdk.pdf.annots.IconFit Class Reference

## Public Member Functions
| IconFit ()
| Constructor.
| IconFit (IconFit icon_fit)
| Constructor, with another icon fit object. More...
| IconFit (int type, boolean is_proportional_scaling, float horizontal_fraction, float vertical_fraction, boolean fit_bounds)
| Constructor, with parameters. More...
synchronized void | delete ()
| Clean up related C++ resources immediately. 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_ScaleWayNone = 0
| No scaling way is specified.
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

  [in] | type | The circumstances under which the icon should be scaled inside the annotation rectangle. Please refer to values starting from com.foxit.sdk.pdf.annots.IconFit.e_ScaleWayAlways and this should be one of these values. This value shold not be com.foxit.sdk.pdf.annots.IconFit.e_ScaleWayNone when current icon fit object is used for setting.
  [in] | is_proportional_scaling | 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 fit the width or height of the annotation rectangle while maintaining the icon's original aspect ratio.
  [in] | horizontal_fraction | The 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.
  [in] | vertical_fraction | The 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.
  [in] | fit_bounds | Indicates 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 icon fit object.

Parameters

  [in] | icon_fit | Another icon fit object.

## Member Function Documentation

## ◆ delete()

synchronized void com.foxit.sdk.pdf.annots.IconFit.delete | ( |  | ) |

Clean up related C++ resources immediately.

Returns
  None.

Note
  Once this function is called, current object cannot be used anymore.

## ◆ 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 com.foxit.sdk.pdf.annots.IconFit.e_ScaleWayNone and this should be one of these values. When current icon fit object is used for setting, this value should not be com.foxit.sdk.pdf.annots.IconFit.e_ScaleWayNone .

## ◆ 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

  [in] | type | The circumstances under which the icon should be scaled inside the annotation rectangle. Please refer to values starting from com.foxit.sdk.pdf.annots.IconFit.e_ScaleWayAlways and this should be one of these values. This value shold not be com.foxit.sdk.pdf.annots.IconFit.e_ScaleWayNone when current icon fit object is used for setting.
  [in] | is_proportional_scaling | 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.
  [in] | horizontal_fraction | The 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.
  [in] | vertical_fraction | The 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.
  [in] | fit_bounds | Indicates 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] | value | A 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] | value | The 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] | value | A 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] | value | The circumstances under which the icon should be scaled inside the annotation rectangle. Please refer to values starting from com.foxit.sdk.pdf.annots.IconFit.e_ScaleWayNone and this should be one of these values. When current icon fit object is used for setting, this value should not be com.foxit.sdk.pdf.annots.IconFit.e_ScaleWayNone .

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] | value | The vertical fraction of left-over space to allocate at the left and bottom of the icon.

Returns
  None.