Class Horde_Image_swf

Description

This class implements the Horde_Image:: API for SWF, using the PHP Ming extension.

$Horde: framework/Image/Image/swf.php,v 1.24.10.10 2009/01/06 15:23:12 jan Exp $

Copyright 2002-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/swf.php (line 20)

Horde_Image
   |
   --Horde_Image_swf
Variable Summary
 resource $_movie
Method Summary
 Horde_Image_swf Horde_Image_swf ( $params)
 array allocateColor (string $name)
 void arc (integer $x, integer $y, integer $r, integer $start, integer $end, [string $color = 'black'], [string $fill = 'none'])
 void circle (integer $x, integer $y, integer $r, string $color, [string $fill = 'none'])
 void dashedLine (integer $x0, integer $y0, integer $x1, integer $y1, [string $color = 'black'], [string $width = 1], [integer $dash_length = 2], [integer $dash_space = 2])
 void display ()
 void getContentType ()
 void getFont ( $font)
 void gradientRectangle (integer $x, integer $y, integer $width, integer $height, [string $color = 'black'], [string $fill1 = 'black'], [string $fill2 = 'white'])
 void line (integer $x1, integer $y1,  $x2,  $y2, [string $color = 'black'], [string $width = 1], integer $x0, integer $y0)
 void polygon ( $verts, string $color, [string $fill = 'none'], array $vertices)
 void polyline ( $verts, string $color, [string $width = 1], array $vertices)
 string raw ()
 void rectangle (integer $x, integer $y, integer $width, integer $height, string $color, [string $fill = 'none'])
 void roundedRectangle (integer $x, integer $y, integer $width, integer $height, integer $round, [string $color = 'black'], [string $fill = 'none'])
 void text ( $string, integer $x, integer $y, [string $font = 'monospace'], [string $color = 'black'], [integer $direction = 0], string $text)
Variables
array $_capabilities = array('canvas') (line 27)

Capabilites of this driver.


Redefinition of:
Horde_Image::$_capabilities
Capabilites of this driver.
resource $_movie (line 34)

SWF root movie.

Inherited Variables

Inherited from Horde_Image

Horde_Image::$_background
Horde_Image::$_data
Horde_Image::$_height
Horde_Image::$_loadedEffects
Horde_Image::$_observers
Horde_Image::$_rgb
Horde_Image::$_tmpdir
Horde_Image::$_type
Horde_Image::$_width
Methods
Constructor Horde_Image_swf (line 36)
Horde_Image_swf Horde_Image_swf ( $params)
  • $params
allocateColor (line 85)

Creates a color that can be accessed in this object. When a color is set, the rgba values are returned in an array.

  • return: The red, green, blue, alpha values of the color.
array allocateColor (string $name)
  • string $name: The name of the color.
arc (line 432)

Draw an arc.

void arc (integer $x, integer $y, integer $r, integer $start, integer $end, [string $color = 'black'], [string $fill = 'none'])
  • 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.
circle (line 151)

Draw a circle.

void circle (integer $x, integer $y, integer $r, string $color, [string $fill = 'none'])
  • 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.
dashedLine (line 371)

Draw a dashed line.

void dashedLine (integer $x0, integer $y0, integer $x1, integer $y1, [string $color = 'black'], [string $width = 1], [integer $dash_length = 2], [integer $dash_space = 2])
  • 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
display (line 56)

Display the movie.

void display ()

Redefinition of:
Horde_Image::display()
Display the current image.
getContentType (line 48)
void getContentType ()
getFont (line 94)
void getFont ( $font)
  • $font
gradientRectangle (line 492)

Draw a rectangle filled with a gradient from $color1 to $color2.

void gradientRectangle (integer $x, integer $y, integer $width, integer $height, [string $color = 'black'], [string $fill1 = 'black'], [string $fill2 = 'white'])
  • 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.
line (line 343)

Draw a line.

void line (integer $x1, integer $y1,  $x2,  $y2, [string $color = 'black'], [string $width = 1], integer $x0, integer $y0)
  • 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.
  • $x2
  • $y2
polygon (line 188)

Draw a polygon based on a set of vertices.

void polygon ( $verts, string $color, [string $fill = 'none'], array $vertices)
  • array $vertices: An array of x and y labeled arrays (eg. $vertices[0]['x'], $vertices[0]['y'], ...).
  • string $color: The color you want to draw the polygon with.
  • string $fill: The color to fill the polygon.
  • $verts
polyline (line 402)

Draw a polyline (a non-closed, non-filled polygon) based on a set of vertices.

void polyline ( $verts, string $color, [string $width = 1], array $vertices)
  • array $vertices: An array of x and y labeled arrays (eg. $vertices[0]['x'], $vertices[0]['y'], ...).
  • string $color: The color you want to draw the line with.
  • string $width: The width of the line.
  • $verts
raw (line 67)

Return the raw data for this image.

  • return: The raw image data.
string raw ()

Redefinition of:
Horde_Image::raw()
Returns the raw data for this image.
rectangle (line 232)

Draw a rectangle.

void rectangle (integer $x, integer $y, integer $width, integer $height, string $color, [string $fill = 'none'])
  • 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 (line 253)

Draw a rectangle.

void roundedRectangle (integer $x, integer $y, integer $width, integer $height, integer $round, [string $color = 'black'], [string $fill = 'none'])
  • 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.
text (line 122)

Draws a text string on the image in a specified location, with the specified style information.

void text ( $string, integer $x, integer $y, [string $font = 'monospace'], [string $color = 'black'], [integer $direction = 0], string $text)
  • string $text: The text to draw.
  • 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

Inherited Methods

Inherited From Horde_Image

 Horde_Image::Horde_Image()
 Horde_Image::addEffect()
 Horde_Image::addObserver()
 Horde_Image::applyEffects()
 Horde_Image::brightness()
 Horde_Image::brush()
 Horde_Image::display()
 Horde_Image::factory()
 Horde_Image::getCapabilities()
 Horde_Image::getDimensions()
 Horde_Image::getHexColor()
 Horde_Image::getLink()
 Horde_Image::getLoadedEffects()
 Horde_Image::getRGB()
 Horde_Image::hasCapability()
 Horde_Image::headers()
 Horde_Image::loadFile()
 Horde_Image::loadString()
 Horde_Image::modifyColor()
 Horde_Image::moreIntenseColor()
 Horde_Image::notifyObservers()
 Horde_Image::raw()
 Horde_Image::reset()
 Horde_Image::singleton()
 Horde_Image::toFile()

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