Image_Text::set

Image_Text::set()

Image_Text::set() -- Set options

Description

Set a single or multiple options. It may happen that you have to reinitialize the Image_Text object after changing options.

Possible options to set are: 'x' | This sets the top left coordinates (using x/y) or the center point 'y' | coordinates (using cx/cy) for your text box. The values from 'cx' | cx/cy will overwrite x/y. 'cy' | 'canvas' | You can set different values as a canvas: | - A gd image resource. | - An array with 'width' and 'height'. | - Nothing (the canvas will be measured after the real text size). 'antialias' | This is usually true. Set it to false to switch antialiasing off. 'width' | The width and height for your text box. 'height' | 'halign' | Alignment of your text inside the textbox. Use alignmnet constants to define 'valign' | vertical and horizontal alignment. '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: | - String representing HTML style hex couples (+ unusual alpha couple in the first place, optional). | - Array of int values using 'r', 'g', 'b' and optionally 'a' as keys. 'color_mode' | The color rotation mode for your color sets. Does only apply if you | defined multiple colors. Use 'line' or 'paragraph'. '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 0.5. 'min_font_size' | Automeasurize settings. Try to keep this area as small as possible to get better 'max_font_size' | performance. 'image_type' | The type of image (use image type constants). Is default set to PNG. '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

Note

This function can not be called statically.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.