AbstractFont
abstract class AbstractFont implements FontInterface, ClassFactoryAwareInterface
Abstract font base class.
Properties
protected string | $file | ||
protected int | $size | ||
protected ColorInterface | $color |
Methods
__construct(string $file, int $size, ColorInterface $color)
Constructs a font with specified $file, $size and $color.
string
getFile()
Gets the fontfile for current font.
int
getSize()
Gets font's integer point size.
getColor()
Gets font's color.
string
wrapText(string $string, int $maxWidth, int $angle = 0)
Split a string into multiple lines so that it fits a specific width.
getClassFactory()
Get the class factory instance to be used.
$this
Details
at line 54
__construct(string $file, int $size, ColorInterface $color)
Constructs a font with specified $file, $size and $color.
The font size is to be specified in points (e.g. 10pt means 10)
at line 66
final string
getFile()
Gets the fontfile for current font.
at line 76
final int
getSize()
Gets font's integer point size.
at line 86
final ColorInterface
getColor()
Gets font's color.
at line 96
string
wrapText(string $string, int $maxWidth, int $angle = 0)
Split a string into multiple lines so that it fits a specific width.
at line 135
ClassFactoryInterface
getClassFactory()
Get the class factory instance to be used.
at line 149
$this
setClassFactory(ClassFactoryInterface $classFactory)
Set the class factory instance to be used.