* '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)
* @param array $params Parameter array
*/
function addVertex($params)
{
$params['X'] = $this->_getX($params['x']);
$params['Y'] = $this->_getY($params['y']);
$this->_polygon[] = $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)
* @param array $params Parameter array
*/
function addSpline($params)
{
$params['X'] = $this->_getX($params['x']);
$params['Y'] = $this->_getY($params['y']);
$params['P1X'] = $this->_getX($params['p1x']);
$params['P1Y'] = $this->_getY($params['p1y']);
$params['P2X'] = $this->_getX($params['p2x']);
$params['P2Y'] = $this->_getY($params['p2y']);
$this->_polygon[] = $params;
}
/**
* Draws a polygon
*
* Parameter array:
* 'connect': bool [optional] Specifies whether the start point should be
* connected to the endpoint (closed polygon) or not (connected line)
* 'fill': mixed [optional] The fill color
* 'line': mixed [optional] The line color
* @param array $params Parameter array
*/
function polygon($params)
{
$this->_reset();
}
/**
* Draw a rectangle
*
* Parameter array:
* 'x0': int X start point
* 'y0': int Y start point
* 'x1': int X end point
* 'y1': int Y end point
* 'fill': mixed [optional] The fill color
* 'line': mixed [optional] The line color
* @param array $params Parameter array
*/
function rectangle($params)
{
$this->_reset();
}
/**
* Draw an ellipse
*
* Parameter array:
* 'x': int X center point
* 'y': int Y center point
* 'rx': int X radius
* 'ry': int Y radius
* 'fill': mixed [optional] The fill color
* 'line': mixed [optional] The line color
* @param array $params Parameter array
*/
function ellipse($params)
{
$this->_reset();
}
/**
* 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
* @param array $params Parameter array
*/
function pieslice($params)
{
$this->_reset();
}
/**
* Get the width of a text,
*
* @param string $text The text to get the width of
* @return int The width of the text
*/
function textWidth($text)
{
}
/**
* Get the height of a text,
*
* @param string $text The text to get the height of
* @return int The height of the text
*/
function textHeight($text)
{
}
/**
* Writes text
*
* Parameter array:
* 'x': int X-point of text
* 'y': int Y-point of text
* 'text': string The text to add
* 'alignment': array [optional] Alignment
* 'color': mixed [optional] The color of the text
*/
function addText($params)
{
$this->_reset();
}
/**
* 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
*/
function image($params)
{
}
/**
* Set clipping to occur
*
* Parameter array:
*
* 'x0': int X point of Upper-left corner
* 'y0': int X point of Upper-left corner
* 'x1': int X point of lower-right corner
* 'y1': int Y point of lower-right corner
*/
function setClipping($params = false)
{
}
/**
* Start a group.
*
* What this does, depends on the canvas/format.
*
* @param string $name The name of the group
*/
function startGroup($name = false)
{
}
/**
* End the "current" group.
*
* What this does, depends on the canvas/format.
*/
function endGroup()
{
}
/**
* Output the result of the canvas to the browser
*
* @param array $params Parameter array, the contents and meaning depends on the actual Canvas
* @abstract
*/
function show($params = false)
{
if ($params === false) {
header('Expires: Tue, 2 Jul 1974 17:41:00 GMT'); // Date in the past
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified