GradientFade
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
GradientFade constructor.
Instructs the gradient fade to be applied symmetrically (to opposite edges of the image).
Instructs the gradient fade to be applied symmetrically (to opposite edges of the image) including background padding.
Sets the horizontal start point (x).
Sets the vertical start point (y).
Details
__construct(int|string $strength = null, string $type = null)
GradientFade constructor.
static string
symmetric()
Instructs the gradient fade to be applied symmetrically (to opposite edges of the image).
static string
symmetricPad()
Instructs the gradient fade to be applied symmetrically (to opposite edges of the image) including background padding.
$this
horizontalStartPoint(int|float|string $x)
Sets the horizontal start point (x).
$this
verticalStartPoint(int|float|string $y)
Sets the vertical start point (y).
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. |