Horde_Image_gd
Horde_Image_gd
( $params)
Draw an arc.
void
arc
(integer $x, integer $y, integer $r, integer $start, integer $end, [string $color = 'black'], [string $fill = null])
-
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 (defaults to none).
Draw a circle.
void
circle
(integer $x, integer $y, integer $r, string $color, [string $fill = null])
-
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.
Crop the current image.
void
crop
(integer $x1, integer $y1, integer $x2, integer $y2)
-
integer
$x1: The top left corner of the cropped image.
-
integer
$y1: The top right corner of the cropped image.
-
integer
$x2: The bottom left corner of the cropped image.
-
integer
$y2: The bottom right corner of the cropped image.
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
Flip the current image.
void
flip
()
Get the height and width of the current image.
array
getDimensions
()
Redefinition of:
- Horde_Image::getDimensions()
- Get the height and width of the current image data.
Convert the current image to grayscale.
void
grayscale
()
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
Load the image data from a file.
mixed
loadFile
(string $filename)
-
string
$filename: The full path and filename to the file to load the image data from. The filename will also be used for the image id.
Redefinition of:
- Horde_Image::loadFile()
- Load the image data from a file.
Load the image data from a string.
PEAR_Error
loadString
(string $id, string $image_data)
-
string
$id: An arbitrary id for the image.
-
string
$image_data: The data to use for the image.
Redefinition of:
- Horde_Image::loadString()
- Load the image data from a string.
Mirror the current image.
void
mirror
()
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
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
Returns the raw data for this image.
string
raw
([boolean $convert = false])
-
boolean
$convert: If true, the image data will be returned in the target format, independently from any image operations.
Redefinition of:
- Horde_Image::raw()
- Returns the raw data for this image.
Draw a rectangle.
void
rectangle
(integer $x, integer $y, integer $width, integer $height, [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.
-
string
$color: The line color of the rectangle.
-
string
$fill: The color to fill the rectangle with.
Resize the current image.
PEAR_Error
resize
(integer $width, integer $height, [boolean $ratio = true])
-
integer
$width: The new width.
-
integer
$height: The new height.
-
boolean
$ratio: Maintain original aspect ratio.
Rotate the current image.
void
rotate
(integer $angle, [integer $background = 'white'])
-
integer
$angle: The angle to rotate the image by, in the clockwise direction
-
integer
$background: The background color to fill any triangles
Draw a rounded 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 rounded rectangle with.
Sepia filter.
Basically turns the image to grayscale and then adds some defined tint on it (R += 30, G += 43, B += -23) so it will appear to be a very old picture.
void
sepia
()
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], [ $fontsize = 'small'], 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
-
$fontsize
Yellowize filter.
Adds a layer of yellow that can be transparent or solid. If $intensityA is 255 the image will be 0% transparent (solid).
void
yellowize
([integer $intensityY = 50], [integer $intensityB = 3])
-
integer
$intensityY: How strong should the yellow (red and green) be? (0-255)
-
integer
$intensityB: How weak should the blue be? (>= 2, in the positive limit it will be make BLUE 0)
Creates a color that can be accessed in this object. When a color is set, the integer resource of it is returned.
integer
_allocateColor
(string $name)
-
string
$name: The name of the color.
void
_allocateColorAlpha
( $gdimg_hexcolorallocate, $r, $g, $b, [ $alpha = false])
-
$gdimg_hexcolorallocate
-
$r
-
$g
-
$b
-
$alpha
Applies the specified mask to the image.
mixed
_applyMask
(resource $gdimg_mask)
-
resource
$gdimg_mask: The gd image resource representing the mask
Wraps a call to a function of the gd extension.
If the call produces an error, a PEAR_Error is returned, the function result otherwise.
mixed
&_call
(string $function, [array $params = null])
-
string
$function: The name of the function to wrap.
-
array
$params: An array with all parameters for that function.
Creates an image of the given size.
If possible the function returns a true color image.
resource|object PEAR
&_create
(integer $width, integer $height)
-
integer
$width: The image width.
-
integer
$height: The image height.
void
_grayscalePixel
( $OriginalPixel)
void
_grayscaleValue
( $r, $g, $b)
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()