AlphaBlendingAwareDrawerInterface
extends
DrawerInterface
in
Interface for the drawers that support configuring the alpha blending.
Table of Contents
Methods
- arc() : $this
- Draws an arc on a starting at a given x, y coordinates under a given start and end angles.
- chord() : $this
- Same as arc, but also connects end points with a straight line.
- circle() : $this
- Draws and circle with center at the given x, y coordinates, and given radius.
- dot() : $this
- Places a one pixel point at specific coordinates and fills it with specified color.
- ellipse() : $this
- Draws and ellipse with center at the given x, y coordinates, and given width and height.
- getAlphaBlending() : bool
- Is the alpha blending activated?
- line() : $this
- Draws a line from start(x, y) to end(x, y) coordinates.
- pieSlice() : $this
- Same as arc, but connects end points and the center.
- polygon() : $this
- Draws a polygon using array of x, y coordinates. Must contain at least three coordinates.
- rectangle() : $this
- Draws a rectangle from left, top(x, y) to right, bottom(x, y) coordinates.
- setAlphaBlending() : $this
- Enable/disable the alpha blending.
- text() : $this
- Annotates image with specified text at a given position starting on the top left of the final text box.
- withAlphaBlending() : static
- Create a new instance of this drawer with the specified alpha blending value.
Methods
arc()
Draws an arc on a starting at a given x, y coordinates under a given start and end angles.
public
arc(PointInterface $center, BoxInterface $size, int $start, int $end, ColorInterface $color[, int $thickness = 1 ]) : $this
Parameters
- $center : PointInterface
- $size : BoxInterface
- $start : int
- $end : int
- $color : ColorInterface
- $thickness : int = 1
Tags
Return values
$thischord()
Same as arc, but also connects end points with a straight line.
public
chord(PointInterface $center, BoxInterface $size, int $start, int $end, ColorInterface $color[, bool $fill = false ][, int $thickness = 1 ]) : $this
Parameters
- $center : PointInterface
- $size : BoxInterface
- $start : int
- $end : int
- $color : ColorInterface
- $fill : bool = false
- $thickness : int = 1
Tags
Return values
$thiscircle()
Draws and circle with center at the given x, y coordinates, and given radius.
public
circle(PointInterface $center, int $radius, ColorInterface $color[, bool $fill = false ][, int $thickness = 1 ]) : $this
Parameters
- $center : PointInterface
- $radius : int
- $color : ColorInterface
- $fill : bool = false
- $thickness : int = 1
Tags
Return values
$thisdot()
Places a one pixel point at specific coordinates and fills it with specified color.
public
dot(PointInterface $position, ColorInterface $color) : $this
Parameters
- $position : PointInterface
- $color : ColorInterface
Tags
Return values
$thisellipse()
Draws and ellipse with center at the given x, y coordinates, and given width and height.
public
ellipse(PointInterface $center, BoxInterface $size, ColorInterface $color[, bool $fill = false ][, int $thickness = 1 ]) : $this
Parameters
- $center : PointInterface
- $size : BoxInterface
- $color : ColorInterface
- $fill : bool = false
- $thickness : int = 1
Tags
Return values
$thisgetAlphaBlending()
Is the alpha blending activated?
public
getAlphaBlending() : bool
Return values
boolline()
Draws a line from start(x, y) to end(x, y) coordinates.
public
line(PointInterface $start, PointInterface $end, ColorInterface $outline[, int $thickness = 1 ]) : $this
Parameters
- $start : PointInterface
- $end : PointInterface
- $outline : ColorInterface
- $thickness : int = 1
Return values
$thispieSlice()
Same as arc, but connects end points and the center.
public
pieSlice(PointInterface $center, BoxInterface $size, int $start, int $end, ColorInterface $color[, bool $fill = false ][, int $thickness = 1 ]) : $this
Parameters
- $center : PointInterface
- $size : BoxInterface
- $start : int
- $end : int
- $color : ColorInterface
- $fill : bool = false
- $thickness : int = 1
Tags
Return values
$thispolygon()
Draws a polygon using array of x, y coordinates. Must contain at least three coordinates.
public
polygon(array<string|int, PointInterface> $coordinates, ColorInterface $color[, bool $fill = false ][, int $thickness = 1 ]) : $this
Parameters
- $coordinates : array<string|int, PointInterface>
- $color : ColorInterface
- $fill : bool = false
- $thickness : int = 1
Tags
Return values
$thisrectangle()
Draws a rectangle from left, top(x, y) to right, bottom(x, y) coordinates.
public
rectangle(PointInterface $leftTop, PointInterface $rightBottom, ColorInterface $color[, bool $fill = false ][, int $thickness = 1 ]) : $this
Parameters
- $leftTop : PointInterface
- $rightBottom : PointInterface
- $color : ColorInterface
- $fill : bool = false
- $thickness : int = 1
Tags
Return values
$thissetAlphaBlending()
Enable/disable the alpha blending.
public
setAlphaBlending(bool $value) : $this
Parameters
- $value : bool
Return values
$thistext()
Annotates image with specified text at a given position starting on the top left of the final text box.
public
text(string $string, AbstractFont $font, PointInterface $position[, int $angle = 0 ][, int $width = null ]) : $this
The rotation is done CW
Parameters
- $string : string
- $font : AbstractFont
- $position : PointInterface
- $angle : int = 0
- $width : int = null
Tags
Return values
$thiswithAlphaBlending()
Create a new instance of this drawer with the specified alpha blending value.
public
withAlphaBlending(bool $value) : static
Parameters
- $value : bool