$_background
$_background : string
Background color.
This class implements the Horde_Image API for SWF, using the PHP Ming extension.
__construct(array $params, array $context = array())
Constructor.
array | $params | The image object parameters. Values include:
|
array | $context | The object context - configuration, injected objects:
|
brush(integer $x, integer $y, string $color = 'black', string $shape = 'square')
Draws a shaped point at the specified (x,y) point.
Useful for scatter diagrams, debug points, etc. Draws squares, circles, diamonds, and triangles.
integer | $x | The x coordinate of the point to brush. |
integer | $y | The y coordinate of the point to brush. |
string | $color | The color to brush the point with. |
string | $shape | What brush to use? Defaults to a square. |
toFile( $data = null) : string
Saves image data to file.
If $data is false-ish, saves current image data after performing pending operations on the data. If $data contains raw image data, saves that data to file without regard for the current image data.
$data |
Path to temporary file.
getImageAtIndex(integer $index) : \Horde_Image_Base
Returns a specific image from the pages of images.
integer | $index | The index to return. |
The requested image
text( $string, integer $x, integer $y, string $font = 'monospace', string $color = 'black', integer $direction)
Draws a text string on the image in a specified location, with the specified style information.
$string | ||
integer | $x | The left x coordinate of the start of the text string. |
integer | $y | The top y coordinate of the start of the text string. |
string | $font | The font identifier you want to use for the text. |
string | $color | The color that you want the text displayed in. |
integer | $direction | An integer that specifies the orientation of the text. |
circle(integer $x, integer $y, integer $r, string $color, string $fill = 'none')
Draws a circle.
integer | $x | The x co-ordinate of the centre. |
integer | $y | The y co-ordinate of the centre. |
integer | $r | The radius of the circle. |
string | $color | The line color of the circle. |
string | $fill | The color to fill the circle. |
rectangle(integer $x, integer $y, integer $width, integer $height, string $color, string $fill = 'none')
Draws a rectangle.
integer | $x | The left x-coordinate of the rectangle. |
integer | $y | The top y-coordinate of the rectangle. |
integer | $width | The width of the rectangle. |
integer | $height | The height of the rectangle. |
string | $color | The line color of the rectangle. |
string | $fill | The color to fill the rectangle. |
roundedRectangle(integer $x, integer $y, integer $width, integer $height, integer $round, string $color = 'black', string $fill = 'none')
Draws a rounded rectangle.
integer | $x | The left x-coordinate of the rectangle. |
integer | $y | The top y-coordinate of the rectangle. |
integer | $width | The width of the rectangle. |
integer | $height | The height of the rectangle. |
integer | $round | The width of the corner rounding. |
string | $color | The line color of the rectangle. |
string | $fill | The color to fill the rectangle. |
dashedLine(integer $x0, integer $y0, integer $x1, integer $y1, string $color = 'black', string $width = 1, integer $dash_length = 2, integer $dash_space = 2)
Draws a dashed line.
integer | $x0 | The x co-ordinate of the start. |
integer | $y0 | The y co-ordinate of the start. |
integer | $x1 | The x co-ordinate of the end. |
integer | $y1 | The y co-ordinate of the end. |
string | $color | The line color. |
string | $width | The width of the line. |
integer | $dash_length | The length of a dash on the dashed line. |
integer | $dash_space | The length of a space in the dashed line. |
arc(integer $x, integer $y, integer $r, integer $start, integer $end, string $color = 'black', string $fill = 'none')
Draws an arc.
integer | $x | The x co-ordinate of the centre. |
integer | $y | The y co-ordinate of the centre. |
integer | $r | The radius of the arc. |
integer | $start | The start angle of the arc. |
integer | $end | The end angle of the arc. |
string | $color | The line color of the arc. |
string | $fill | The fill color of the arc. |
gradientRectangle(integer $x, integer $y, integer $width, integer $height, string $color = 'black', string $fill1 = 'black', string $fill2 = 'white')
Draws a rectangle filled with a gradient.
integer | $x | The left x-coordinate of the rectangle. |
integer | $y | The top y-coordinate of the rectangle. |
integer | $width | The width of the rectangle. |
integer | $height | The height of the rectangle. |
string | $color | The outline color of the rectangle. |
string | $fill1 | The name of the start color for the gradient. |
string | $fill2 | The name of the end color for the gradient. |