$imagick
$imagick : \Imagick
The underlaying Imagick object.
ImageMagick driver for the Horde_Image API.
__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.
raw(boolean $convert = false, array $options = array()) : mixed
Returns the raw data for this image.
boolean | $convert | If true, the image data will be returned in the target format, independently from any image operations. |
array | $options | Array of options:
|
The raw image data either as a string or stream resource.
getImageAtIndex(integer $index) : \Horde_Image_Base
Request a specific image from the collection of images.
integer | $index | The index to return |
text( $string, integer $x, integer $y, string $font = '', string $color = 'black', integer $direction, string $fontsize = 'small')
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. |
string | $fontsize | Size of the font (small, medium, large, giant) |
circle(integer $x, integer $y, integer $r, string $color, string $fill = 'none')
Draws a circle.
integer | $x | The x coordinate of the centre. |
integer | $y | The y coordinate 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, string $fill)
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 rounded rectangle with. |
line(integer $x0, integer $y0, integer $x1, integer $y1, string $color = 'black', string $width = 1)
Draws a line.
integer | $x0 | The x coordinate of the start. |
integer | $y0 | The y coordinate of the start. |
integer | $x1 | The x coordinate of the end. |
integer | $y1 | The y coordinate of the end. |
string | $color | The line color. |
string | $width | The width of the line. |
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 coordinate of the centre. |
integer | $y | The y coordinate 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 (defaults to none). |
executeConvertCmd(string $cmd, array $values = array())
Method to execute a raw command directly in convert.
Useful for executing more involved operations that may require multiple convert commands piped into each other as could be needed by Im based Horde_Image_Effect objects.
The input and output files are quoted and substituted for FILEIN and FILEOUT respectfully. In order to support piped convert commands, the path to the convert command is substitued for CONVERT (but the initial convert command is added automatically).
string | $cmd | The command string, with substitutable tokens |
array | $values | Any values that should be substituted for tokens. |
current() : \Horde_Image_Imagick
Return the current image from the internal iterator.
next() : \Horde_Image_Im
Advance the iterator
_raw(boolean $convert = false, array $options = array()) : \Horde_Stream
Returns the raw data for this image.
boolean | $convert | If true, the image data will be returned in the target format, independently from any image operations. |
array | $options | An array of options:
|
The data, in a Horde_Stream object.