Image_Canvas (Constructor) [line 151]
Image_Canvas &Image_Canvas(
array
$params)
|
|
Create the canvas.
Parameters available:
'width' The width of the graph on the canvas
'height' The height of the graph on the canvas
'left' The left offset of the graph on the canvas
'top' The top offset of the graph on the canvas
Parameters:
addSpline [line 460]
void addSpline(
array
$params)
|
|
Adds "splined" vertex to a polygon
Parameter array: 'x': int X point 'y': int Y point 'p1x': int X Control point 1 'p1y': int Y Control point 1 'p2x': int X Control point 2 'p2y': int Y Control point 2 'url': string [optional] URL to link the vertex to (must be used with 'map_vertices' in polygon() on a canvas that support image maps) 'alt': string [optional] Alternative text to show in the image map (must be used with 'map_vertices' in polygon() on a canvas that support image maps) 'target': string [optional] The link target on the image map (must be used with 'map_vertices' in polygon() on a canvas that support image maps) 'mapsize': int [optional] The size of the "map", i.e. the size of the hot spot (must be used with 'map_vertices' in polygon() on a canvas that support image maps)
Overridden in child classes as:
- Image_Canvas_WithMap::addSpline()
- Adds "splined" vertex to a polygon
Parameters:
addText [line 571]
addVertex [line 437]
void addVertex(
array
$params)
|
|
Adds vertex to a polygon
Parameter array: 'x': int X point 'y': int Y point 'url': string [optional] URL to link the vertex to (must be used with 'map_vertices' in polygon() on a canvas that support image maps) 'alt': string [optional] Alternative text to show in the image map (must be used with 'map_vertices' in polygon() on a canvas that support image maps) 'target': string [optional] The link target on the image map (must be used with 'map_vertices' in polygon() on a canvas that support image maps) 'mapsize': int [optional] The size of the "map", i.e. the size of the hot spot (must be used with 'map_vertices' in polygon() on a canvas that support image maps)
Overridden in child classes as:
- Image_Canvas_WithMap::addVertex()
- Adds vertex to a polygon
Parameters:
drawEnd [line 370]
void drawEnd(
array
$params)
|
|
Draw a line end
Parameter array: 'x': int X point 'y': int Y point 'end': string The end type of the end 'angle': int [optional] The angle with which to draw the end
Overridden in child classes as:
- Image_Canvas_GD::drawEnd()
- Draw a line end
Parameters:
ellipse [line 515]
endGroup [line 607]
End the "current" group.
What this does, depends on the canvas/format.
Overridden in child classes as:
- Image_Canvas_SVG::endGroup()
- End the "current" group.
factory [line 675]
Canvas factory method.
Supported canvass are:
'png': output in PNG format (using GD)
'jpg': output in JPEG format (using GD)
'pdf': output in PDF format (using PDFlib)
'svg': output in SVG format
'imagemap': output as a html image map
Parameters:
getHeight [line 211]
Get the height of the canvas
getWidth [line 201]
Get the width of the canvas
image [line 587]
Overlay image
Parameter array: 'x': int X-point of overlayed image 'y': int Y-point of overlayed image 'filename': string The filename of the image to overlay 'width': int [optional] The width of the overlayed image (resizing if possible) 'height': int [optional] The height of the overlayed image (resizing if possible) 'alignment': array [optional] Alignment
Overridden in child classes as:
- Image_Canvas_WithMap::image()
- Overlay image
- Image_Canvas_GD::image()
- Overlay image
- Image_Canvas_PDF::image()
- Overlay image
- Image_Canvas_SVG::image()
- Overlay image
Parameters:
line [line 389]
pieslice [line 536]
void pieslice(
array
$params)
|
|
Draw a pie slice
Parameter array: 'x': int X center point 'y': int Y center point 'rx': int X radius 'ry': int Y radius 'v1': int The starting angle (in degrees) 'v2': int The end angle (in degrees) 'srx': int [optional] Starting X-radius of the pie slice (i.e. for a doughnut) 'sry': int [optional] Starting Y-radius of the pie slice (i.e. for a doughnut) 'fill': mixed [optional] The fill color 'line': mixed [optional] The line color
Overridden in child classes as:
- Image_Canvas_WithMap::pieslice()
- Draw a pie slice
- Image_Canvas_GD::pieslice()
- Draw a pie slice
- Image_Canvas_PDF::pieslice()
- Draw a pie slice
- Image_Canvas_SVG::pieslice()
- Draw a pie slice
- Image_Canvas_ImageMap::pieslice()
- Draw a pie slice
Parameters:
polygon [line 481]
rectangle [line 498]
save [line 635]
setDefaultFont [line 338]
void setDefaultFont(
array
$fontOptions)
|
|
Sets the default font options.
The $font array may have the following entries:
'name' The name of the font. This name must either be supported natively by the canvas or mapped to a font using the font-mapping scheme
'size' Size in pixels
'angle' The angle with which to write the text
Parameters:
setFill [line 244]
void setFill(
mixed
$fill)
|
|
Sets the style of the filling of drawn objects.
This method gives simple access to setFillColor(), setFillImage() and setGradientFill()
Parameters:
setFillColor [line 260]
void setFillColor(
mixed
$color)
|
|
Sets the color of the filling of drawn objects
Parameters:
setFillImage [line 270]
setFont [line 298]
void setFont(
array
$fontOptions)
|
|
Sets the font options.
The $font array may have the following entries:
'name' The name of the font. This name must either be supported natively by the canvas or mapped to a font using the font-mapping scheme
'size' Size in pixels
'angle' The angle with which to write the text
Overridden in child classes as:
- Image_Canvas_GD::setFont()
- Sets the font options.
- Image_Canvas_PDF::setFont()
- Sets the font options.
- Image_Canvas_SVG::setFont()
- Sets the font options.
Parameters:
setGradientFill [line 279]
setLineColor [line 231]
void setLineColor(
mixed
$color)
|
|
Sets the color of the line(s) to be drawn
Parameters:
setLineThickness [line 221]
void setLineThickness(
int
$thickness)
|
|
Sets the thickness of the line(s) to be drawn
Parameters:
show [line 617]
startGroup [line 598]
void startGroup(
[string
$name = false])
|
|
Start a group.
What this does, depends on the canvas/format.
Overridden in child classes as:
- Image_Canvas_SVG::startGroup()
- Start a group.
Parameters:
textHeight [line 557]
textWidth [line 547]
toHtml [line 650]
Get a canvas specific HTML tag.
This method implicitly saves the canvas to the filename in the filesystem path specified and parses it as URL specified by URL path
Parameter array: 'filename': string 'filepath': string Path to the file on the file system. Remember the final slash 'urlpath': string Path to the file available through an URL. Remember the final slash
Overridden in child classes as:
- Image_Canvas_GD::toHtml()
- Get a canvas specific HTML tag.
- Image_Canvas_PDF::toHtml()
- Get a canvas specific HTML tag.
- Image_Canvas_SVG::toHtml()
- Get a canvas specific HTML tag.
- Image_Canvas_ImageMap::toHtml()
- Get a canvas specific HTML tag.
Parameters: