Methods summary
public static
|
|
public static
|
|
public static
|
|
public static
|
#
contrastDisable( )
Colors which are too similar to the background will stay as they are
Colors which are too similar to the background will stay as they are
|
public static
|
#
contrastAuto( )
Colors which are too similar to the background will be automaically
contrasted
Colors which are too similar to the background will be automaically
contrasted
|
public static
|
#
contrastForceDarker( )
Colors which are too similar to the background will be always made darker
Colors which are too similar to the background will be always made darker
|
public static
|
#
contrastForceLighter( )
Colors which are too similar to the background will be always made darker
Colors which are too similar to the background will be always made darker
|
public static
|
|
public static
|
#
setBackground( mixed $background )
Set the background color for contrasting colors
Set the background color for contrasting colors
|
public static
|
#
declareFont( mixed $name, mixed $normal, mixed $bold = null, mixed $italic = null, mixed $boldItalic = null )
Declare a font to use with onImage function
Declare a font to use with onImage function
|
public static
|
|
public static
|
#
toHtml( mixed $string )
Get the html code of a string with style codes
Get the html code of a string with style codes
|
public static
|
#
onImage( string $string, imageResource $image, string $fontName, integer $x = 0, integer $y = 0, integer $size = 10, string $defaultColor = '000' )
Draw a string with on an image, method will be choose depending on the size
wanted
Draw a string with on an image, method will be choose depending on the size
wanted
Parameters
- $string
string $string The style-coded string to draw
- $image
imageResource $image The image to draw on
- $fontName
string $fontName The TTF font to use, which has been declared previously
- $x
integer $x X position
- $y
integer $y Y position
- $size
integer $size Font size
- $defaultColor
string $defaultColor Default text color in 3 or 6 hexadecimal characters
|
public static
|
#
onImageFast( string $string, imageResource $image, string $fontName, integer $x = 0, integer $y = 0, integer $size = 10, string $defaultColor = '000' )
Draw a string with on an image using fast method. There can be glitches when
using small sizes
Draw a string with on an image using fast method. There can be glitches when
using small sizes
Parameters
- $string
string $string The style-coded string to draw
- $image
imageResource $image The image to draw on
- $fontName
string $fontName The TTF font to use, which has been declared previously
- $x
integer $x X position
- $y
integer $y Y position
- $size
integer $size Font size
- $defaultColor
string $defaultColor Default text color in 3 or 6 hexadecimal characters
|
public static
|
#
onImageQuality( string $string, imageResource $image, string $fontName, integer $x = 0, integer $y = 0, integer $size = 10, string $defaultColor = '000', integer $precision = 2 )
Draw a string with on an image using quality method. Slow with big text
size
Draw a string with on an image using quality method. Slow with big text
size
Parameters
- $string
string $string The style-coded string to draw
- $image
imageResource $image The image to draw on
- $fontName
string $fontName The TTF font to use, which has been declared previously
- $x
integer $x X position
- $y
integer $y Y position
- $size
integer $size Font size
- $defaultColor
string $defaultColor Default text color in 3 or 6 hexadecimal characters
- $precision
integer $precision Higher value means higher precision (but also longer execution time),
usual values are 1 to 3
|