Horizontal
extends Linear
in package
FinalYes
Horizontal gradient fill.
Table of Contents
Properties
- $end : ColorInterface
- $length : int
- $start : ColorInterface
Methods
- __construct() : mixed
- Constructs a linear gradient with overall gradient length, and start and end shades, which default to 0 and 255 accordingly.
- getColor() : ColorInterface
- Gets color of the fill for the given position.
- getDistance() : int
- Get the distance of the position relative to the beginning of the gradient.
- getEnd() : ColorInterface
- getStart() : ColorInterface
Properties
$end
private
ColorInterface
$end
$length
private
int
$length
$start
private
ColorInterface
$start
Methods
__construct()
Constructs a linear gradient with overall gradient length, and start and end shades, which default to 0 and 255 accordingly.
public
final __construct(int $length, ColorInterface $start, ColorInterface $end) : mixed
Parameters
- $length : int
- $start : ColorInterface
- $end : ColorInterface
getColor()
Gets color of the fill for the given position.
public
final getColor(PointInterface $position) : ColorInterface
Parameters
- $position : PointInterface
Tags
Return values
ColorInterfacegetDistance()
Get the distance of the position relative to the beginning of the gradient.
public
getDistance(PointInterface $position) : int
Parameters
- $position : PointInterface
Tags
Return values
intgetEnd()
public
final getEnd() : ColorInterface
Return values
ColorInterfacegetStart()
public
final getStart() : ColorInterface