text()
public static method
Draws a text string on an existing image.
public static text ( string | resource | Imagine\Image\ImageInterface $image, string $text, string $fontFile, array $start = [0, 0], array $fontOptions = [] ) : Imagine\Image\ImageInterface |
$image |
string | resource | Imagine\Image\ImageInterface |
either ImageInterface, resource or a string containing file path |
$text |
string |
the text to write to the image |
$fontFile |
string |
the file path or path alias |
$start |
array |
the starting position of the text. This must be an array with two elements representing `x` and `y` coordinates. |
$fontOptions |
array |
the font options. The following options may be specified:
- color: The font color. Defaults to "fff".
- size: The font size. Defaults to 12.
- angle: The angle to use to write the text. Defaults to 0. |
return |
Imagine\Image\ImageInterface |
|