class GradientFade extends StrengthEffectAction

Class GradientFade

Applies a gradient fade effect from one edge of the image.

Use ->horizontalStartPoint() for x or ->verticalStartPoint() for y to indicate from which edge to fade and how much of the image should be faded. Values of x and y can be specified as a percentage (Range: 0.0 to 1.0), or in pixels (integer values). Positive values fade from the top (y) or left (x). Negative values fade from the bottom (y) or right (x). By default, the gradient is applied to the top 50% of the image (y = 0.5). Only one direction can be specified but the fade can be applied symmetrically using the mode qualifier. To apply different amounts of fade to multiple edges, use chained fade effects.

Methods

__construct(int|string $strength = null, string $type = null)

GradientFade constructor.

symmetric()

Instructs the gradient fade to be applied symmetrically (to opposite edges of the image).

symmetricPad()

Instructs the gradient fade to be applied symmetrically (to opposite edges of the image) including background padding.

horizontalStartPoint(int|float|string $x)

Sets the horizontal start point (x).

verticalStartPoint(int|float|string $y)

Sets the vertical start point (y).

Details

__construct(int|string $strength = null, string $type = null)

GradientFade constructor.

Parameters

Name Type Description
$strength int|string
$type string

static string symmetric()

Instructs the gradient fade to be applied symmetrically (to opposite edges of the image).

Return Value

string

static string symmetricPad()

Instructs the gradient fade to be applied symmetrically (to opposite edges of the image) including background padding.

Return Value

string

$this horizontalStartPoint(int|float|string $x)

Sets the horizontal start point (x).

Parameters

Name Type Description
$x int|float|string The value of the x dimension.

Return Value

$this

$this verticalStartPoint(int|float|string $y)

Sets the vertical start point (y).

Parameters

Name Type Description
$y int|float|string The value of the y dimension.

Return Value

$this

Constants

SYMMETRIC

Instructs the gradient fade to be applied symmetrically (to opposite edges of the image).

SYMMETRIC_PAD

Instructs the gradient fade to be applied symmetrically (to opposite edges of the image) including background padding.