Gradient
class Gradient extends BaseComponent
Defines how to implement a background gradient fade effect.
Learn more: Content aware padding
Methods
Gradient constructor.
Sets the type of gradient fade.
Sets the number of predominant colors to use (2 or 4).
Sets the direction of fade.
Serializes to string.
Serializes to json.
Details
__construct(string $type = null, int $numberOfColors = null, string $direction = null)
Gradient constructor.
Gradient
type(string $type)
Sets the type of gradient fade.
Gradient
numberOfColors(int $numberOfColors)
Sets the number of predominant colors to use (2 or 4).
Gradient
direction(string $direction)
Sets the direction of fade.
string
__toString()
Serializes to string.
mixed
jsonSerialize()
Serializes to json.
Constants
PREDOMINANT_GRADIENT |
Base the gradient fade effect on the predominant colors in the image. |
PREDOMINANT_GRADIENT_CONTRAST |
Base the effect on the colors that contrast the predominant colors in the image. |
BORDER_GRADIENT |
Base the gradient fade effect on the predominant colors in the border pixels of the image. |
BORDER_GRADIENT_CONTRAST |
Base the effect on the colors that contrast the predominant colors in the border pixels of the image. |