Foxit PDF SDK

Public Types | Public Member Functions | Properties | List of all members
foxit.pdf.annots.IconFit Class Reference

Inherits SystemIDisposable.

## Public Types
enum | ScaleWayType { ScaleWayType.e_ScaleWayNone = 0, ScaleWayType.e_ScaleWayAlways = 1, ScaleWayType.e_ScaleWayBigger = 2, ScaleWayType.e_ScaleWaySmaller = 3, ScaleWayType.e_ScaleWayNever = 4 }
| Enumeration for the type of icon scaling way. More...

## Public Member Functions
| IconFit ()
| Constructor.
| IconFit (IconFit.ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction, float vertical_fraction, bool fit_bounds)
| Constructor, with parameters. More...
| IconFit (IconFit icon_fit)
| Constructor, with another icon fit object. More...
void | Set (IconFit.ScaleWayType type, bool is_proportional_scaling, float horizontal_fraction, float vertical_fraction, bool fit_bounds)
| Set value. More...

## Properties
bool | fit_bounds`[get, set]`
| A boolean value that indicates whether to scale button appearance to fit fully within bounds or not. More...
float | horizontal_fraction`[get, set]`
| The horizontal fraction of left-over space to allocate at the left and bottom of the icon. More...
bool | is_proportional_scaling`[get, set]`
| A boolean value which indicates whether use proportional scaling or not. More...
IconFit.ScaleWayType | scale_way_type`[get, set]`
| The circumstances under which the icon should be scaled inside the annotation rectangle. Please refer to values starting from foxit.pdf.annots.IconFit.ScaleWayType.e_ScaleWayNone and this should be one of these values. When current icon fit object is used for setting, this value should not be foxit.pdf.annots.IconFit.ScaleWayType.e_ScaleWayNone .
float | vertical_fraction`[get, set]`
| The vertical fraction of left-over space to allocate at the left and bottom of the icon. More...

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

## Member Enumeration Documentation

## ◆ ScaleWayType

enum foxit.pdf.annots.IconFit.ScaleWayType
| strong

Enumeration for the type of icon scaling way.

Values of this enumeration should be used alone.

Enumerator
e_ScaleWayNone | No scaling way is specified.
e_ScaleWayAlways | Always scale.
e_ScaleWayBigger | Scale only when icon is bigger than annotation rectangle.
e_ScaleWaySmaller | Scale only when icon is smaller than annotation rectangle.
e_ScaleWayNever | Never scale.

## Constructor & Destructor Documentation

## ◆ IconFit() [1/2]

foxit.pdf.annots.IconFit.IconFit | ( | IconFit.ScaleWayType | type,
|  | bool | is_proportional_scaling,
|  | float | horizontal_fraction,
|  | float | vertical_fraction,
|  | bool | fit_bounds
| ) |  |
| inline

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 foxit.pdf.annots.IconFit.ScaleWayType.e_ScaleWayAlways and this should be one of these values. This value shold not be foxit.pdf.annots.IconFit.ScaleWayType.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]

foxit.pdf.annots.IconFit.IconFit | ( | IconFit | icon_fit | ) |
| inline

Constructor, with another icon fit object.

Parameters

  [in] | icon_fit | Another icon fit object.

## Member Function Documentation

## ◆ Set()

void foxit.pdf.annots.IconFit.Set | ( | IconFit.ScaleWayType | type,
|  | bool | is_proportional_scaling,
|  | float | horizontal_fraction,
|  | float | vertical_fraction,
|  | bool | fit_bounds
| ) |  |
| inline

Set value.

Parameters

  [in] | type | The circumstances under which the icon should be scaled inside the annotation rectangle. Please refer to values starting from foxit.pdf.annots.IconFit.ScaleWayType.e_ScaleWayAlways and this should be one of these values. This value shold not be foxit.pdf.annots.IconFit.ScaleWayType.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.

## Property Documentation

## ◆ fit_bounds

bool foxit.pdf.annots.IconFit.fit_bounds
| get 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.

## ◆ horizontal_fraction

float foxit.pdf.annots.IconFit.horizontal_fraction
| get 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.

## ◆ is_proportional_scaling

bool foxit.pdf.annots.IconFit.is_proportional_scaling
| get 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.

## ◆ vertical_fraction

float foxit.pdf.annots.IconFit.vertical_fraction
| get 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.