Linear
in package
implements
FillInterface
AbstractYes
Linear gradient fill.
Table of Contents
Interfaces
- FillInterface
- Interface for the fill.
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.
- getEnd() : ColorInterface
- getStart() : ColorInterface
- getDistance() : int
- Get the distance of the position relative to the beginning of the gradient.
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
ColorInterfacegetEnd()
public
final getEnd() : ColorInterface
Return values
ColorInterfacegetStart()
public
final getStart() : ColorInterface
Return values
ColorInterfacegetDistance()
Get the distance of the position relative to the beginning of the gradient.
protected
abstract getDistance(PointInterface $position) : int
Parameters
- $position : PointInterface