com.lokorin.lokorin.lib
[ class tree: com.lokorin.lokorin.lib ] [ index: com.lokorin.lokorin.lib ] [ all elements ]

Procedural File: lib_graphs.php

Source Location: /_includes/lib_graphs.php



Classes:

Graph
Describes a graph that takes values and then transforms them into a graphical representation as a graph.
Axis
Desribes an graph axis. The axis is graded and can extend those marks to a grid if desired. The grades' labels can be altered with callbacks.
GraphFunction
Describes a function that can be displayed in a graph.


Page Details:

A library for creating and displaying graphs. Graphs takes arrays of values and composes images representing the values.



Tags:

filesource:  Source Code for this file
license:  GNU Lesser General Public License
version:  $Revision: 1.8 $
author:  Andreas Launila







AXIS_MARKER_SIZE [line 47]

AXIS_MARKER_SIZE = 5
The number of pixels of length that the label marker of the axis should take up.



Tags:

access:  private

[ Top ]



AXIS_POINT_LENGTH [line 34]

AXIS_POINT_LENGTH = 10
The length of the point of the arrow representing the axis.



Tags:

access:  private

[ Top ]



AXIS_WIDTH [line 40]

AXIS_WIDTH = 4
The width of the arrow that represents the axis.



Tags:

access:  private

[ Top ]



GRAPH_PADDING [line 54]

GRAPH_PADDING = 40
The number of pixels of padding that should be between the axes and the graph border.



Tags:

access:  private

[ Top ]




drawArrow [line 74]

void drawArrow( image &$img, integer $x1, integer $y1, integer $x2, mixed $y2, integer $length, integer $width, array $color)

Draws an arrow with specified paramaters on a specified image.



Tags:

access:  private


Parameters

image   $img   The image on which the arrow should be drawn.
integer   $x1   The x coordinate (pixels) for the starting point of the arrow in the image.
integer   $y1   The y coordinate (pixels) for the end point of the arrow in the image.
integer   $x2   The x coordinate (pixels) for the end point of the arrow in the image.
integer   $length   The length (in pixels) that the actual arrow point should have.
integer   $width   The width (in pixels) that the arrow should have.
array   $color   The color that the arrow should have, an array with the RGB values representing the color.
[ Top ]



drawStringCentered [line 111]

void drawStringCentered( image &$img, integer $font, integer $x, integer $y, string $string, array $color)

Draws a specified string with a specified color centered on specified coordinates on a specified image.



Tags:

access:  private


Parameters

image   $img   The image that the string should be drawn on.
integer   $font   The font that the drawn string should have.
integer   $x   The x coordinate (pixels) that the drawn string should be centered around in the image.
integer   $y   The y coordinate (pixels) that the drawn string should be centered around in the image.
string   $string   The actual string that should be drawn.
array   $color   The color that the drawn string should have as an array with the RGB values.
[ Top ]



drawStringRightAligned [line 131]

void drawStringRightAligned( image &$img, integer $font, integer $x, integer $y, string $string, array $color)

Draws a specified string with a specified color aligned right on specified coordinates on a specified image.



Tags:

access:  private


Parameters

image   $img   The image that the string should be drawn on.
integer   $font   The font that the drawn string should have.
integer   $x   The x coordinate (pixels) for the rightmost part of string.
integer   $y   The y coordinate (pixels) that the drawn string should be centered around in the image.
string   $string   The actual string that should be drawn.
array   $color   The color that the drawn string should have as an array with the RGB values.
[ Top ]



Documentation generated on Sun, 16 Apr 2006 21:03:31 +0200 by phpDocumentor 1.3.0RC4