Class Horde_Image_ImagickProxy

Description

Proxy class for using PHP5 Imagick code in PHP4 compliant code.

Mostly used to be able to deal with any exceptions that are thrown from Imagick.

All methods not explicitly set below are passed through as-is to the imagick object.

$Horde: framework/Image/Image/imagick.php,v 1.8.2.4 2009/03/23 18:15:47 mrubinsk Exp $

Copyright 2007-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /Image/Image/imagick.php (line 21)


	
			
Variable Summary
 Imagick $_imagick
Method Summary
 Horde_Image_ImagickProxy __construct ([ $width = 1], [ $height = 1], [ $bg = 'white'], [ $format = 'png'])
 mixed addImage ( &$imagickProxy)
 mixed borderImage (string $color, integer $width, integer $height)
 mixed circle ( $x,  $y,  $r,  $color,  $fill)
 mixed &cloneIM ()
 mixed compositeImage ( &$imagickProxy,  $constant,  $x,  $y, [ $channel = null])
 mixed dashedLine ( $x0,  $y0,  $x1,  $y1,  $color,  $width,  $dash_length,  $dash_space)
 Imagick &getIMObject ()
 mixed grayscale ()
 mixed line ( $x0,  $y0,  $x1,  $y1,  $color,  $width)
 mixed loadString (string $image_data)
 boolean methodExists (string $methodName)
 void polaroidImage ([ $angle = 0])
 mixed polygon ( $verts,  $color,  $fill)
 mixed polyline ( $verts,  $color,  $width)
 mixed rectangle ( $x,  $y,  $width,  $height,  $color, [ $fill = 'none'])
 mixed rotateImage (string $bg, integer $angle)
 void roundedRectangle ( $x,  $y,  $width,  $height,  $round,  $color,  $fill)
 mixed setImageBackgroundColor ( $color)
 mixed text ( $string,  $x,  $y, [ $font = 'ariel'], [ $color = 'black'], [ $direction = 0], [ $fontsize = 'small'])
 void __call ( $method,  $params)
Variables
Imagick $_imagick = null (line 28)

Instance variable for our Imagick object.

  • var: object
  • access: protected
Methods
Constructor __construct (line 33)

Constructor. Instantiate our imagick object and set some defaults.

  • access: public
Horde_Image_ImagickProxy __construct ([ $width = 1], [ $height = 1], [ $bg = 'white'], [ $format = 'png'])
  • $width
  • $height
  • $bg
  • $format
addImage (line 330)
  • return: true || PEAR_Error
  • TODO:
mixed addImage ( &$imagickProxy)
  • &$imagickProxy
borderImage (line 353)

Add a border to this image.

  • return: true || PEAR_Error
mixed borderImage (string $color, integer $width, integer $height)
  • string $color: The color of the border.
  • integer $width: The border width
  • integer $height: The border height
circle (line 135)
  • return: true || PEAR_Error
  • TODO:
mixed circle ( $x,  $y,  $r,  $color,  $fill)
  • $x
  • $y
  • $r
  • $color
  • $fill
cloneIM (line 388)

Produces a clone of this ImagickProxy object.

  • return: Horde_Image_ImagickProxy object || PEAR_Error
mixed &cloneIM ()
compositeImage (line 309)
  • return: true || PEAR_Error
  • TODO:
mixed compositeImage ( &$imagickProxy,  $constant,  $x,  $y, [ $channel = null])
  • &$imagickProxy
  • $constant
  • $x
  • $y
  • $channel
dashedLine (line 243)
  • return: true || PEAR_Error
  • TODO:
mixed dashedLine ( $x0,  $y0,  $x1,  $y1,  $color,  $width,  $dash_length,  $dash_space)
  • $x0
  • $y0
  • $x1
  • $y1
  • $color
  • $width
  • $dash_length
  • $dash_space
getIMObject (line 377)

Return the raw Imagick object

  • return: The Imagick object for this proxy.
Imagick &getIMObject ()
grayscale (line 89)

Change image to a grayscale image.

  • return: true || PEAR_Error
mixed grayscale ()
line (line 220)
  • return: true || PEAR_Error
  • TODO:
mixed line ( $x0,  $y0,  $x1,  $y1,  $color,  $width)
  • $x0
  • $y0
  • $x1
  • $y1
  • $color
  • $width
loadString (line 48)

Clears the current imagick object and reloads it with the passed in binary data.

  • return: true || PEAR_Error
  • access: public
mixed loadString (string $image_data)
  • string $image_data: The data representing an image.
methodExists (line 423)

Check if a particular method exists in the installed version of Imagick

boolean methodExists (string $methodName)
  • string $methodName: The name of the method to check for.
polaroidImage (line 405)
void polaroidImage ([ $angle = 0])
  • $angle
polygon (line 158)
  • return: true || PEAR_Error
  • TODO:
mixed polygon ( $verts,  $color,  $fill)
  • $verts
  • $color
  • $fill
polyline (line 267)
  • return: true || PEAR_Error
  • TODO:
mixed polyline ( $verts,  $color,  $width)
  • $verts
  • $color
  • $width
rectangle (line 181)
  • return: true || Pear_Error
  • TODO:
mixed rectangle ( $x,  $y,  $width,  $height,  $color, [ $fill = 'none'])
  • $x
  • $y
  • $width
  • $height
  • $color
  • $fill
rotateImage (line 72)

Rotates image as described. Don't pass through since we are not passing a ImagickPixel object from PHP4 code.

  • return: true || PEAR_Error
  • access: public
mixed rotateImage (string $bg, integer $angle)
  • string $bg: Background color
  • integer $angle: Angle to rotate
roundedRectangle (line 204)

Rounded Rectangle

void roundedRectangle ( $x,  $y,  $width,  $height,  $round,  $color,  $fill)
  • $x
  • $y
  • $width
  • $height
  • $round
  • $color
  • $fill
setImageBackgroundColor (line 291)
  • return: true || PEAR_Error
  • TODO:
mixed setImageBackgroundColor ( $color)
  • $color
text (line 108)

Places a string of text on this image with the specified properties

  • return: true || PEAR_Error
  • TODO:
mixed text ( $string,  $x,  $y, [ $font = 'ariel'], [ $color = 'black'], [ $direction = 0], [ $fontsize = 'small'])
  • $string
  • $x
  • $y
  • $font
  • $color
  • $direction
  • $fontsize
__call (line 438)

Pass through any methods not explicitly handled above.

Note that any methods that take any Imagick* object as a parameter should be called through it's own method as above so we can avoid having objects that might throw exceptions running in PHP4 code.

void __call ( $method,  $params)
  • $method
  • $params

Documentation generated on Sun, 30 Jan 2011 05:18:24 +0000 by phpDocumentor 1.4.3