new ResizeMinimumPadAction()

Description

Defines an advanced resize with minimum padding.

Methods


gravity( gravity )

Description

Which part of the original image to include.

Parameters
Name Type Description
gravity Qualifiers.Gravity

background( backgroundQualifier )

Description

Sets the background.

Parameters
Name Type Description
backgroundQualifier Qualifiers.Background

Defines the background color to use instead of transparent background areas or when resizing with padding.


offsetX( x )

Description

Horizontal position for custom-coordinates based padding.

Parameters
Name Type Description
x number

The x position.


getActionTag() → {string}

Description

Returns the custom name tag that was given to this action

Returns
Details

height( x )

Description

Sets the height of the resize

Parameters
Name Type Description
x string | number

The height in pixels (if an integer is specified) or as a percentage (if a float is specified).


offsetY( y )

Description

Vertical position for custom-coordinates based padding

Parameters
Name Type Description
y number

The y position.


setActionTag() → {this}

Description

Sets the custom name tag for this action

Returns
Details

width( x )

Description

Sets the width of the resize

Parameters
Name Type Description
x string | number

The width in pixels (if an integer is specified) or as a percentage (if a float is specified).


toString() → {string}

Description

Calls toString() on all child qualifiers (implicitly by using .join()).

Returns
Details

aspectRatio( ratio ) → {this}

Description

Sets the aspect ratio of the asset. For a list of supported types see AspectRatio values

Parameters
Name Type Description
ratio AspectRatioType | number | string

The new aspect ratio, specified as a percentage or ratio.

Returns

addQualifier( qualifier ) → {this}

Description

Adds the parameter to the action.

Parameters
Name Type Description
qualifier SDK.Qualifier
Returns
Details

relative() → {this}

Description

Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the containing image instead of the added layer.

Returns

addFlag( flag ) → {this}

Description

Adds a flag to the current action.

Parameters
Name Type Description
flag Qualifiers.Flag
Returns
Details

regionRelative() → {this}

Description

Modifies percentage-based width & height parameters of overlays and underlays (e.g., 1.0) to be relative to the overlaid region

Returns