[ Index ]

PHP Cross Reference of MantisBT

title

Body

[close]

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

File containing the abstract ezcGraphAxisLabelRenderer 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: 557 lines (21 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 10 functions

  __construct()
  __set()
  determineLineCuttingPoint()
  drawStep()
  drawNonRectangularGrid()
  drawRectangularGrid()
  drawGrid()
  modifyChartBoundings()
  modifyChartDataPosition()
  getAxisSpace()

Functions
Functions that are not part of a class:

__construct( array $options = array()   X-Ref
Constructor

param: array $options Default option array
return: void

__set( $propertyName, $propertyValue )   X-Ref
__set

param: mixed $propertyName
param: mixed $propertyValue
return: void

determineLineCuttingPoint( ezcGraphCoordinate $aStart, ezcGraphCoordinate $aDir, ezcGraphCoordinate $bStart, ezcGraphCoordinate $bDir )   X-Ref
Checks for the cutting point of two lines.

The lines are given by a start position and the direction of the line,
both as instances of {@link ezcGraphCoordinate}. If no cutting point
could be calculated, because the lines are parallel the function will
return false. Otherwise the factor returned can be used to calculate the
cutting point using the following equatation:
point = $aStart + $factor * $aDir;

We return the factor instead of the resulting point because it can be
easily determined from the factor if the cutting point is in "behind"
the line starting point, or if the distance to the cutting point is
bigger then the direction vector is long ( $factor > 1 ).

param: ezcGraphCoordinate $aStart
param: ezcGraphCoordinate $aDir
param: ezcGraphCoordinate $bStart
param: ezcGraphCoordinate $bDir
return: mixed

drawStep( ezcGraphRenderer $renderer, ezcGraphCoordinate $position, ezcGraphCoordinate $direction, $axisPosition, $size, ezcGraphColor $color )   X-Ref
Draw single step on a axis

Draws a step on a axis at the current position

param: ezcGraphRenderer $renderer Renderer to draw the step with
param: ezcGraphCoordinate $position Position of step
param: ezcGraphCoordinate $direction Direction of axis
param: int $axisPosition Position of axis
param: int $size Step size
param: ezcGraphColor $color Color of axis
return: void

drawNonRectangularGrid( ezcGraphRenderer $renderer, ezcGraphBoundings $boundings, ezcGraphCoordinate $position, ezcGraphCoordinate $direction, ezcGraphColor $color )   X-Ref
Draw non-rectangular grid lines grid

Draws a grid line at the current position, for non-rectangular axis.

param: ezcGraphRenderer $renderer Renderer to draw the grid with
param: ezcGraphBoundings $boundings Boundings of axis
param: ezcGraphCoordinate $position Position of step
param: ezcGraphCoordinate $direction Direction of axis
param: ezcGraphColor $color Color of axis
return: void

drawRectangularGrid( ezcGraphRenderer $renderer, ezcGraphBoundings $boundings, ezcGraphCoordinate $position, ezcGraphCoordinate $direction, ezcGraphColor $color )   X-Ref
Draw rectangular grid

Draws a grid line at the current position for rectangular directed axis.

Method special for rectangularly directed axis to minimize the floating
point calculation inaccuracies. Those are not necessary for rectangles,
while for non-rectangular directed axis.

param: ezcGraphRenderer $renderer Renderer to draw the grid with
param: ezcGraphBoundings $boundings Boundings of axis
param: ezcGraphCoordinate $position Position of step
param: ezcGraphCoordinate $direction Direction of axis
param: ezcGraphColor $color Color of axis
return: void

drawGrid( ezcGraphRenderer $renderer, ezcGraphBoundings $boundings, ezcGraphCoordinate $position, ezcGraphCoordinate $direction, ezcGraphColor $color )   X-Ref
Draw grid

Draws a grid line at the current position

param: ezcGraphRenderer $renderer Renderer to draw the grid with
param: ezcGraphBoundings $boundings Boundings of axis
param: ezcGraphCoordinate $position Position of step
param: ezcGraphCoordinate $direction Direction of axis
param: ezcGraphColor $color Color of axis
return: void

modifyChartBoundings( ezcGraphBoundings $boundings, ezcGraphCoordinate $direction )   X-Ref
Modify chart boundings

Optionally modify boundings of chart data

param: ezcGraphBoundings $boundings Current boundings of chart
param: ezcGraphCoordinate $direction Direction of the current axis
return: ezcGraphBoundings Modified boundings

modifyChartDataPosition( ezcGraphCoordinate $coordinate )   X-Ref
Modify chart data position

Optionally additionally modify the coodinate of a data point

param: ezcGraphCoordinate $coordinate Data point coordinate
return: ezcGraphCoordinate Modified coordinate

getAxisSpace( ezcGraphRenderer $renderer, ezcGraphBoundings $boundings, ezcGraphChartElementAxis $axis, $innerBoundings, &$gridBoundings )   X-Ref
Get axis space values

Get axis space values, depending on passed parameters. If
$innerBoundings is given it will be used to caclulat the axis spaces
available for label rendering. If not given the legacy method will be
used, which uses the xAxisSpace and yAxisSpace values calcualted by the
renderer.

Returns an array( $xSpace, $ySpace ), containing the irespective size in
pixels. Additionally calculates the grid boundings passed by reference.

param: ezcGraphRenderer $renderer
param: ezcGraphBoundings $boundings
param: mixed $innerBoundings
return: array



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