Properties

$path

$path

$size

$size

$text

$text

$foregroundColor

$foregroundColor

$rotationAngle

$rotationAngle

$fontInfo

$fontInfo

$descenderSize

$descenderSize

Methods

__construct()

__construct(string  $fontPath, int  $size) : mixed

Constructor.

Parameters

string $fontPath

path to the file

int $size

size in point

Returns

mixed —

getText()

getText() : string

Gets the text associated to the font.

Returns

string —

setText()

setText(mixed  $text) : mixed

Sets the text associated to the font.

Parameters

mixed $text

Returns

mixed —

getRotationAngle()

getRotationAngle() : int

Gets the rotation in degree.

Returns

int —

setRotationAngle()

setRotationAngle(mixed  $rotationAngle) : mixed

Sets the rotation in degree.

Parameters

mixed $rotationAngle

Returns

mixed —

getBackgroundColor()

getBackgroundColor() : \BarcodeBakery\Common\BCGColor

Gets the background color.

Returns

\BarcodeBakery\Common\BCGColor —

setBackgroundColor()

setBackgroundColor(\BarcodeBakery\Common\BCGColor  $backgroundColor) : mixed

Sets the background color.

Parameters

\BarcodeBakery\Common\BCGColor $backgroundColor

Returns

mixed —

getForegroundColor()

getForegroundColor() : \BarcodeBakery\Common\BCGColor

Gets the foreground color.

Returns

\BarcodeBakery\Common\BCGColor —

setForegroundColor()

setForegroundColor(\BarcodeBakery\Common\BCGColor  $foregroundColor) : mixed

Sets the foreground color.

Parameters

\BarcodeBakery\Common\BCGColor $foregroundColor

Returns

mixed —

getDimension()

getDimension() : int[]

Returns the width and height that the text takes to be written.

Returns

int[] —

draw()

draw(resource  $im, int  $x, int  $y) : mixed

Draws the text on the image at a specific position.

$x and $y represent the left bottom corner.

Parameters

resource $im
int $x
int $y

Returns

mixed —

getDrawingPosition()

getDrawingPosition(mixed  $x, mixed  $y) : mixed

Parameters

mixed $x
mixed $y

Returns

mixed —

getFontInfo()

getFontInfo() : mixed

Returns

mixed —