Foxit PDF SDK
FSDK.IconFit Class Reference

Public Member Functions

 constructor ()
 Constructor.
 
 constructor (type, is_proportional_scaling, horizontal_fraction, vertical_fraction, fit_bounds)
 Constructor, with parameters. More...
 
 Set (type, is_proportional_scaling, horizontal_fraction, vertical_fraction, fit_bounds)
 Set value. More...
 

Public Attributes

 fit_bounds
 A boolean value that indicates whether to scale button appearance to fit fully within bounds or not. More...
 
 horizontal_fraction
 The horizontal fraction of left-over space to allocate at the left and bottom of the icon. More...
 
 is_proportional_scaling
 A boolean value which indicates whether use proportional scaling or not. More...
 
 scale_way_type
 The circumstances under which the icon should be scaled inside the annotation rectangle. Please refer to values starting from FSDK.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 FSDK.IconFit.e_ScaleWayNone.
 
 vertical_fraction
 The vertical fraction of left-over space to allocate at the left and bottom of the icon. More...
 

Static Public Attributes

static e_ScaleWayAlways
 Always scale.
 
static e_ScaleWayBigger
 Scale only when icon is bigger than annotation rectangle.
 
static e_ScaleWayNever
 Never scale.
 
static e_ScaleWayNone
 Enumeration for the type of icon scaling way. More...
 
static e_ScaleWaySmaller
 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.

Member Function Documentation

◆ constructor()

FSDK.IconFit.constructor ( type  ,
is_proportional_scaling  ,
horizontal_fraction  ,
vertical_fraction  ,
fit_bounds   
)

Constructor, with parameters.

Parameters
[in]typeThe circumstances under which the icon should be scaled inside the annotation rectangle. Please refer to values starting from FSDK.IconFit.e_ScaleWayAlways and this should be one of these values. This value shold not be FSDK.IconFit.e_ScaleWayNone when current icon fit object is used for setting.
[in]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 fit the width or height of the annotation rectangle while maintaining the icon's original aspect ratio.
[in]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.
[in]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.
[in]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.

◆ Set()

FSDK.IconFit.Set ( type  ,
is_proportional_scaling  ,
horizontal_fraction  ,
vertical_fraction  ,
fit_bounds   
)

Set value.

Parameters
[in]typeThe circumstances under which the icon should be scaled inside the annotation rectangle. Please refer to values starting from FSDK.IconFit.e_ScaleWayAlways and this should be one of these values. This value shold not be FSDK.IconFit.e_ScaleWayNone when current icon fit object is used for setting.
[in]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.
[in]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.
[in]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.
[in]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.

Member Data Documentation

◆ e_ScaleWayNone

FSDK.IconFit.e_ScaleWayNone
static

Enumeration for the type of icon scaling way.

Values of this enumeration should be used alone.

No scaling way is specified.

◆ fit_bounds

FSDK.IconFit.fit_bounds

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

FSDK.IconFit.horizontal_fraction

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

FSDK.IconFit.is_proportional_scaling

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

FSDK.IconFit.vertical_fraction

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.