Image_Text::set
Synopsis
bool Image_Text::set (
mixed $option
, mixed $value
= null
)
Description
Set a single or multiple options. It may happen that you have to reinitialize the Image_Text object after changing options.
Option | Description |
---|---|
x |
This sets the top left coordinates (using x/y) or the center point coordinates (using cx/cy) for your text box. The values from cx/cy will overwrite x/y. |
y |
|
cx |
|
cy |
|
canvas |
You can set different values as a canvas:
|
antialias |
This is usually |
width |
The width and height for your text box. |
height |
|
halign |
Alignment of your text inside the textbox. Use alignment constants to define vertical and horizontal alignment. |
valign |
|
angle |
The angle to rotate your text box. |
color |
An array of color values. Colors will be rotated in the mode you choose (linewise or paragraphwise). Can be in the following formats:
|
color_mode |
The color rotation mode for your color sets. Does only apply if you defined multiple colors. Use 'line' or 'paragraph'. |
background_color |
Defines the background color. Use NULL if you would like to
have the background transparent. Default is
|
enable_alpha |
If the alpha channel should be enabled. Automatically enabled when background_color is set to NULL. Default is FALSE. |
font_path |
Location of the font to use. |
font_file |
|
font_size |
The font size to render text in (will be overwriten if you use automeasurize). |
line_spacing |
Measure for the line spacing to use. Default is
|
min_font_size |
Automeasurize settings. Try to keep this area as small as possible to get better performance. |
max_font_size |
|
max_lines |
The maximum number of lines to render. Default is
|
image_type |
The type of image (use image type constants).
Is default set to |
dest_file |
The destination to (optionally) save your file. |
Parameter
-
mixed
$option
-
A single option name or the options array.
-
mixed
$value
-
Option value if $option is string.
Return value
returns True on success, otherwise PEAR_Error.
Throws
throws no exceptions thrown
See
Note
This function can not be called statically.