Gd
extends AbstractDraw
in package
Draw class for Gd
Tags
Table of Contents
Properties
- $fillColor : Colorinterface|null
- Fill color
- $image : mixed
- Image object
- $opacity : int
- Opacity
- $strokeColor : Colorinterface|null
- Stroke color
- $strokeWidth : int
- Stroke width
Methods
- __construct() : mixed
- Constructor
- arc() : Gd
- Draw an arc on the image.
- chord() : Gd
- Draw a chord on the image.
- circle() : Gd
- Method to add a circle to the image.
- ellipse() : Gd
- Draw an ellipse on the image.
- getFillColor() : Colorinterface
- Get fill color
- getImage() : AbstractAdapter|null
- Get the image object
- getOpacity() : mixed
- Get the opacity
- getStrokeColor() : Colorinterface
- Get stroke color
- getStrokeWidth() : int
- Get stroke width
- hasImage() : bool
- Has the image object
- line() : Gd
- Draw a line on the image.
- pie() : Gd
- Draw a slice on the image.
- polygon() : Gd
- Draw a polygon on the image.
- rectangle() : Gd
- Draw a rectangle on the image.
- setFillColor() : AbstractDraw
- Set fill color
- setImage() : AbstractEditObject
- Set the image object
- setOpacity() : Gd
- Set the opacity
- setStrokeColor() : AbstractDraw
- Set stroke color
- setStrokeWidth() : AbstractDraw
- Get stroke width
- square() : Gd
- Draw a square on the image.
Properties
$fillColor
Fill color
protected
Colorinterface|null
$fillColor
= null
$image
Image object
protected
mixed
$image
= null
$opacity
Opacity
protected
int
$opacity
= 0
$strokeColor
Stroke color
protected
Colorinterface|null
$strokeColor
= null
$strokeWidth
Stroke width
protected
int
$strokeWidth
= 0
Methods
__construct()
Constructor
public
__construct([AbstractAdapter|null $image = null ]) : mixed
Instantiate an image edit object
Parameters
- $image : AbstractAdapter|null = null
arc()
Draw an arc on the image.
public
arc(int|float $x, int|float $y, int|float $start, int|float $end, int|float $w[, int|float|null $h = null ]) : Gd
Parameters
- $x : int|float
- $y : int|float
- $start : int|float
- $end : int|float
- $w : int|float
- $h : int|float|null = null
Return values
Gdchord()
Draw a chord on the image.
public
chord(int|float $x, int|float $y, int|float $start, int|float $end, int|float $w[, int|float|null $h = null ]) : Gd
Parameters
- $x : int|float
- $y : int|float
- $start : int|float
- $end : int|float
- $w : int|float
- $h : int|float|null = null
Return values
Gdcircle()
Method to add a circle to the image.
public
circle(int|float $x, int|float $y, int|float $w) : Gd
Parameters
- $x : int|float
- $y : int|float
- $w : int|float
Return values
Gdellipse()
Draw an ellipse on the image.
public
ellipse(int|float $x, int|float $y, int|float $w[, int|float|null $h = null ]) : Gd
Parameters
- $x : int|float
- $y : int|float
- $w : int|float
- $h : int|float|null = null
Return values
GdgetFillColor()
Get fill color
public
getFillColor() : Colorinterface
Return values
ColorinterfacegetImage()
Get the image object
public
getImage() : AbstractAdapter|null
Return values
AbstractAdapter|nullgetOpacity()
Get the opacity
public
getOpacity() : mixed
getStrokeColor()
Get stroke color
public
getStrokeColor() : Colorinterface
Return values
ColorinterfacegetStrokeWidth()
Get stroke width
public
getStrokeWidth() : int
Return values
inthasImage()
Has the image object
public
hasImage() : bool
Return values
boolline()
Draw a line on the image.
public
line(int|float $x1, int|float $y1, int|float $x2, int|float $y2) : Gd
Parameters
- $x1 : int|float
- $y1 : int|float
- $x2 : int|float
- $y2 : int|float
Return values
Gdpie()
Draw a slice on the image.
public
pie(int|float $x, int|float $y, int|float $start, int|float $end, int|float $w[, int|float|null $h = null ]) : Gd
Parameters
- $x : int|float
- $y : int|float
- $start : int|float
- $end : int|float
- $w : int|float
- $h : int|float|null = null
Return values
Gdpolygon()
Draw a polygon on the image.
public
polygon(array<string|int, mixed> $points) : Gd
Parameters
- $points : array<string|int, mixed>
Return values
Gdrectangle()
Draw a rectangle on the image.
public
rectangle(int|float $x, int|float $y, int|float $w[, int|float|null $h = null ]) : Gd
Parameters
- $x : int|float
- $y : int|float
- $w : int|float
- $h : int|float|null = null
Return values
GdsetFillColor()
Set fill color
public
setFillColor(ColorInterface $color) : AbstractDraw
Parameters
- $color : ColorInterface
Return values
AbstractDrawsetImage()
Set the image object
public
setImage(AbstractAdapter $image) : AbstractEditObject
Parameters
- $image : AbstractAdapter
Return values
AbstractEditObjectsetOpacity()
Set the opacity
public
setOpacity(int|float $opacity) : Gd
Parameters
- $opacity : int|float
Return values
GdsetStrokeColor()
Set stroke color
public
setStrokeColor(ColorInterface $color) : AbstractDraw
Parameters
- $color : ColorInterface
Return values
AbstractDrawsetStrokeWidth()
Get stroke width
public
setStrokeWidth(int $w) : AbstractDraw
Parameters
- $w : int
Return values
AbstractDrawsquare()
Draw a square on the image.
public
square(int|float $x, int|float $y, int|float $w) : Gd
Parameters
- $x : int|float
- $y : int|float
- $w : int|float