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 470]
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 581]
addVertex [line 447]
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 380]
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
- Image_Canvas_SWF::drawEnd()
- Draw a line end
Parameters:
ellipse [line 525]
endGroup [line 631]
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 714]
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)
'ps': output in PostScript format (using pslib)
'svg': output in SVG format
'swf': output in SWF flash format (using ming extension)
'imagemap': output as a html image map
An example of usage:
<?php
$Canvas =& Image_Graph::factory('png',
array('width' => 800, 'height' => 600, 'antialias' => 'native')
);
?>
Parameters:
getHeight [line 211]
Get the height of the canvas
getWidth [line 201]
Get the width of the canvas
image [line 597]
line [line 399]
pieslice [line 546]
polygon [line 491]
rectangle [line 508]
reset [line 365]
Reset the canvas.
Includes fillstyle, linestyle, thickness and polygon
save [line 659]
setClipping [line 611]
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]
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 641]
startGroup [line 622]
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 567]
textWidth [line 557]
toHtml [line 674]