HumHub Documentation (unofficial)

DrawerInterface

Interface for the drawer.

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.
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.
text()  : $this
Annotates image with specified text at a given position starting on the top left of the final text box.

Methods

text()

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
throws
RuntimeException
Return values
$this

        
On this page

Search results