Image_Canvas (Constructor) [line 153]
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 505]
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 634]
addVertex [line 479]
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 406]
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 569]
endGroup [line 696]
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 789]
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 215]
Get the height of the canvas
getWidth [line 205]
Get the width of the canvas
image [line 654]
line [line 428]
pieslice [line 593]
polygon [line 529]
rectangle [line 549]
reset [line 388]
Reset the canvas.
Includes fillstyle, linestyle, thickness and polygon
save [line 729]
setClipping [line 672]
setDefaultFont [line 358]
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 254]
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 272]
void setFillColor(
mixed
$color)
|
|
Sets the color of the filling of drawn objects
Parameters:
setFillImage [line 284]
setFont [line 316]
setGradientFill [line 295]
setLineColor [line 239]
void setLineColor(
mixed
$color)
|
|
Sets the color of the line(s) to be drawn
Parameters:
setLineThickness [line 227]
void setLineThickness(
int
$thickness)
|
|
Sets the thickness of the line(s) to be drawn
Parameters:
show [line 708]
startGroup [line 685]
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 616]
textWidth [line 605]
toHtml [line 748]