abstract class Linear implements FillInterface

Linear gradient fill.

Methods

__construct(int $length, ColorInterface $start, ColorInterface $end)

Constructs a linear gradient with overall gradient length, and start and end shades, which default to 0 and 255 accordingly.

getColor(PointInterface $position)

Gets color of the fill for the given position.

getStart()

No description

getEnd()

No description

int
getDistance(PointInterface $position)

Get the distance of the position relative to the beginning of the gradient.

Details

at line 46
final __construct(int $length, ColorInterface $start, ColorInterface $end)

Constructs a linear gradient with overall gradient length, and start and end shades, which default to 0 and 255 accordingly.

Parameters

int $length
ColorInterface $start
ColorInterface $end

at line 58
final ColorInterface getColor(PointInterface $position)

Gets color of the fill for the given position.

Parameters

PointInterface $position

Return Value

ColorInterface

See also

FillInterface::getColor

at line 76
final ColorInterface getStart()

Return Value

ColorInterface

at line 84
final ColorInterface getEnd()

Return Value

ColorInterface

at line 96
abstract protected int getDistance(PointInterface $position)

Get the distance of the position relative to the beginning of the gradient.

Parameters

PointInterface $position

Return Value

int