[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

/library/ezc/Graph/src/interfaces/ -> renderer.php (summary)

File containing the abstract ezcGraphRenderer class

Copyright: Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
License: http://ez.no/licenses/new_bsd New BSD License
Version: 1.5
File Size: 717 lines (26 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 functions

  setDriver()
  addElementReference()
  getElementReferences()
  __get()
  drawAxisArrowHead()
  drawSymbol()
  resetRenderer()
  render()

Functions
Functions that are not part of a class:

setDriver( ezcGraphDriver $driver )   X-Ref
Set renderers driver

This method is used internally to set the direver used inside the chart
class in the renderer. If you want to change the driver used for your
chart, you should do this using the chart driver property, like:

<code>
$chart = new ezcGraphPieChart();
$chart->driver = new ezcGraphSvgDriver();
</code>

param: ezcGraphDriver $driver Output driver
return: void

addElementReference( ezcGraphContext $context, $reference )   X-Ref
Adds a element reference for context

param: ezcGraphContext $context Dataoint context
param: mixed $reference Driver dependant reference
return: void

getElementReferences()   X-Ref
Return all chart element references

Returns element references for the data sets in the chart, so the
created graphic may be enhanced later.

The resulting array looks like:
<code>
array (
legend_url => array (
$name => $url | null,
...
),
legend => array (
$name => $data,
...
)
data => array (
$dataset => array (
$name => $data,
...
),
...
)
)
</code>

The legend elements won't show up in the array, if there is no legend
redered. The URLs are only available, if the url property has been set
on the respective dataset.

The data assigned to the legends and data elements is completely direver
dependent. In the SVG and Flash driver there will jsut be some IDs,
which allow you to reference the affected elements or element groups
inside the flash or SVG file.

For bitmap formats, like in the Cairo or GD driver, $data will be an
array of ezcGraphCoordinate objects, which roughly describe the outline
of the referenced element. For circles and alike the resolution of this
outline can be configured in the respective driver.

return: array

__get( $propertyName )   X-Ref
__get

param: string $propertyName
return: mixed

drawAxisArrowHead( ezcGraphCoordinate $position, ezcGraphVector $direction, $size, ezcGraphColor $color )   X-Ref
Draw axis arrow head

Draw an arrow head at the specified position using specified size
and direction of the error head. Repsects the axisEndStyle option in
the base renderer options class.

param: ezcGraphCoordinate $position
param: ezcGraphVector $direction
param: float $size
param: ezcGraphColor $color
return: void

drawSymbol(ezcGraphBoundings $boundings,ezcGraphColor $color,$symbol = ezcGraph::NO_SYMBOL )   X-Ref
Draw Symbol

Draws a single symbol defined by the symbol constants in ezcGraph. for
NO_SYMBOL a rect will be drawn.

param: ezcGraphBoundings $boundings Boundings of symbol
param: ezcGraphColor $color Color of symbol
param: int $symbol Type of symbol
return: void

resetRenderer()   X-Ref
Reset renderer properties

Reset all renderer properties, which were calculated during the
rendering process, to offer a clean environment for rerendering.

return: void

render( $file = null )   X-Ref
Finally renders the image

param: string $file Filename of destination file
return: void



Generated: Thu Jul 28 15:48:31 2011 Cross-referenced by PHPXref 0.7