Constants

PHP_BOX_FIX

PHP_BOX_FIX = 0

Properties

$path

$path : 

Type

$size

$size : 

Type

$text

$text : 

Type

$foregroundColor

$foregroundColor : 

Type

$rotationAngle

$rotationAngle : 

Type

$box

$box : 

Type

$boxFix

$boxFix : 

Type

Methods

__construct()

__construct(string  $fontPath, integer  $size) 

Constructor.

Parameters

string $fontPath

path to the file

integer $size

size in point

getText()

getText() : string

Gets the text associated to the font.

Returns

string

setText()

setText(  $text) 

Sets the text associated to the font.

Parameters

$text

getRotationAngle()

getRotationAngle() : integer

Gets the rotation in degree.

Returns

integer

setRotationAngle()

setRotationAngle(  $rotationAngle) 

Sets the rotation in degree.

Parameters

$rotationAngle

getBackgroundColor()

getBackgroundColor() : \BCGColor

Gets the background color.

Returns

\BCGColor

setBackgroundColor()

setBackgroundColor(\BCGColor  $backgroundColor) 

Sets the background color.

Parameters

\BCGColor $backgroundColor

getForegroundColor()

getForegroundColor() : \BCGColor

Gets the foreground color.

Returns

\BCGColor

setForegroundColor()

setForegroundColor(\BCGColor  $foregroundColor) 

Sets the foreground color.

Parameters

\BCGColor $foregroundColor

getBoxFix()

getBoxFix() : integer

Gets the box fix information.

Returns

integer

setBoxFix()

setBoxFix(integer  $value) 

Sets the box fix information.

Parameters

integer $value

getDimension()

getDimension() : array<mixed,integer>

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

Returns

array<mixed,integer>

draw()

draw(resource  $im, integer  $x, integer  $y) 

Draws the text on the image at a specific position.

$x and $y represent the left bottom corner.

Parameters

resource $im
integer $x
integer $y

getDrawingPosition()

getDrawingPosition(  $x,   $y) 

Parameters

$x
$y

getBox()

getBox()