Gd
extends AbstractDraw
in package
Draw class for Gd
Tags
Table of Contents
- $fillColor : Colorinterface
- Fill color
- $image : mixed
- Image object
- $opacity : int
- Opacity
- $strokeColor : Colorinterface
- Stroke color
- $strokeWidth : int
- Stroke width
- __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
- 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
$fillColor
= null
$image
Image object
protected
mixed
$image
= null
$opacity
Opacity
protected
int
$opacity
= 0
$strokeColor
Stroke color
protected
Colorinterface
$strokeColor
= null
$strokeWidth
Stroke width
protected
int
$strokeWidth
= 0
Methods
__construct()
Constructor
public
__construct([AbstractAdapter $image = null ]) : mixed
Instantiate an image edit object
Parameters
- $image : AbstractAdapter = null
Return values
mixed —arc()
Draw an arc on the image.
public
arc(int $x, int $y, int $start, int $end, int $w[, int $h = null ]) : Gd
Parameters
- $x : int
- $y : int
- $start : int
- $end : int
- $w : int
- $h : int = null
Return values
Gd —chord()
Draw a chord on the image.
public
chord(int $x, int $y, int $start, int $end, int $w[, int $h = null ]) : Gd
Parameters
- $x : int
- $y : int
- $start : int
- $end : int
- $w : int
- $h : int = null
Return values
Gd —circle()
Method to add a circle to the image.
public
circle(int $x, int $y, int $w) : Gd
Parameters
- $x : int
- $y : int
- $w : int
Return values
Gd —ellipse()
Draw an ellipse on the image.
public
ellipse(int $x, int $y, int $w[, int $h = null ]) : Gd
Parameters
- $x : int
- $y : int
- $w : int
- $h : int = null
Return values
Gd —getFillColor()
Get fill color
public
getFillColor() : Colorinterface
Return values
Colorinterface —getImage()
Get the image object
public
getImage() : AbstractAdapter
Return values
AbstractAdapter —getOpacity()
Get the opacity
public
getOpacity() : mixed
Return values
mixed —getStrokeColor()
Get stroke color
public
getStrokeColor() : Colorinterface
Return values
Colorinterface —getStrokeWidth()
Get stroke width
public
getStrokeWidth() : int
Return values
int —hasImage()
Has the image object
public
hasImage() : bool
Return values
bool —line()
Draw a line on the image.
public
line(int $x1, int $y1, int $x2, int $y2) : Gd
Parameters
- $x1 : int
- $y1 : int
- $x2 : int
- $y2 : int
Return values
Gd —pie()
Draw a slice on the image.
public
pie(int $x, int $y, int $start, int $end, int $w[, int $h = null ]) : Gd
Parameters
- $x : int
- $y : int
- $start : int
- $end : int
- $w : int
- $h : int = null
Return values
Gd —polygon()
Draw a polygon on the image.
public
polygon(array<string|int, mixed> $points) : Gd
Parameters
- $points : array<string|int, mixed>
Return values
Gd —rectangle()
Draw a rectangle on the image.
public
rectangle(int $x, int $y, int $w[, int $h = null ]) : Gd
Parameters
- $x : int
- $y : int
- $w : int
- $h : int = null
Return values
Gd —setFillColor()
Set fill color
public
setFillColor(ColorInterface $color) : AbstractDraw
Parameters
- $color : ColorInterface
Return values
AbstractDraw —setImage()
Set the image object
public
setImage(AbstractAdapter $image) : AbstractEditObject
Parameters
- $image : AbstractAdapter
Return values
AbstractEditObject —setOpacity()
Set the opacity
public
setOpacity(int $opacity) : Gd
Parameters
- $opacity : int
Return values
Gd —setStrokeColor()
Set stroke color
public
setStrokeColor(ColorInterface $color) : AbstractDraw
Parameters
- $color : ColorInterface
Return values
AbstractDraw —setStrokeWidth()
Get stroke width
public
setStrokeWidth(int $w) : AbstractDraw
Parameters
- $w : int
Return values
AbstractDraw —square()
Draw a square on the image.
public
square(int $x, int $y, int $w) : Gd
Parameters
- $x : int
- $y : int
- $w : int