Gd
extends AbstractEffect
in package
Effect class for Gd
Tags
Table of Contents
Properties
- $image : mixed
- Image object
Methods
- __construct() : mixed
- Constructor
- border() : Gd
- Draw a border around the image.
- calculateSteps() : int|float
- Calculate the steps between two points
- fill() : Gd
- Flood the image with a color fill.
- getBlend() : array<string|int, mixed>
- Get the blend between 2 colors
- getImage() : AbstractAdapter|null
- Get the image object
- hasImage() : bool
- Has the image object
- horizontalGradient() : Gd
- Flood the image with a vertical color gradient.
- linearGradient() : Gd
- Flood the image with a color gradient.
- radialGradient() : Gd
- Flood the image with a vertical color gradient.
- setImage() : AbstractEditObject
- Set the image object
- verticalGradient() : Gd
- Flood the image with a vertical color gradient.
Properties
$image
Image object
protected
mixed
$image
= null
Methods
__construct()
Constructor
public
__construct([AbstractAdapter|null $image = null ]) : mixed
Instantiate an image edit object
Parameters
- $image : AbstractAdapter|null = null
border()
Draw a border around the image.
public
border(ColorInterface $color, int|float $w[, int|float|null $h = null ]) : Gd
Parameters
- $color : ColorInterface
- $w : int|float
- $h : int|float|null = null
Return values
GdcalculateSteps()
Calculate the steps between two points
public
calculateSteps(int $curStep, int $start, int $end, int $totalSteps) : int|float
Parameters
- $curStep : int
- $start : int
- $end : int
- $totalSteps : int
Return values
int|floatfill()
Flood the image with a color fill.
public
fill(ColorInterface $color) : Gd
Parameters
- $color : ColorInterface
Return values
GdgetBlend()
Get the blend between 2 colors
public
getBlend(ColorInterface $color1, ColorInterface $color2, int $tween) : array<string|int, mixed>
Parameters
- $color1 : ColorInterface
- $color2 : ColorInterface
- $tween : int
Return values
array<string|int, mixed>getImage()
Get the image object
public
getImage() : AbstractAdapter|null
Return values
AbstractAdapter|nullhasImage()
Has the image object
public
hasImage() : bool
Return values
boolhorizontalGradient()
Flood the image with a vertical color gradient.
public
horizontalGradient(ColorInterface $color1, ColorInterface $color2) : Gd
Parameters
- $color1 : ColorInterface
- $color2 : ColorInterface
Return values
GdlinearGradient()
Flood the image with a color gradient.
public
linearGradient(ColorInterface $color1, ColorInterface $color2[, bool $vertical = true ]) : Gd
Parameters
- $color1 : ColorInterface
- $color2 : ColorInterface
- $vertical : bool = true
Tags
Return values
GdradialGradient()
Flood the image with a vertical color gradient.
public
radialGradient(ColorInterface $color1, ColorInterface $color2) : Gd
Parameters
- $color1 : ColorInterface
- $color2 : ColorInterface
Return values
GdsetImage()
Set the image object
public
setImage(AbstractAdapter $image) : AbstractEditObject
Parameters
- $image : AbstractAdapter
Return values
AbstractEditObjectverticalGradient()
Flood the image with a vertical color gradient.
public
verticalGradient(ColorInterface $color1, ColorInterface $color2) : Gd
Parameters
- $color1 : ColorInterface
- $color2 : ColorInterface