Class Image_Graph_Base

Description

Base class for data-storage in common objects

Some attributes and methods to manipulate them are used in almost any object for the graph. This class provides the base-functionality for the classes derived from it.

Located in /Graph/Elements.php (line 75)


	
			
Direct descendents
Class Description
 class Image_Graph_Title Class for storing a title
 class Image_Graph_Axis Class for storing axis settings
 class Image_Graph_Grid Class for storing grid-element settings
Method Summary
 void setColor (mixed $color)
 void setFontOptions ([array $options = array()])
 void setSpacer (array $spacer)
 void setText (string $text)
Methods
setColor (line 130)

Set color

For some objects if the color-value is "null" instead of an array default values will be taken. Note that the feature of using "null" might possibly not be available for some objects.

void setColor (mixed $color)
  • mixed $color: any color representation supported by Image_Graph_Color::color2RGB()

Redefined in descendants as:
setFontOptions (line 152)

Set options for fonts

All information not given in this array (e.g. font_path) will be taken from the default font-options set in the Image_Graph-object. These options are directly given to the class Image_Text which handles text-output. For a full list of necessary/available font-options please refer to the Image_Text-docs and/or have a look at the examples shipped with the Image_Graph-package. !! Note that the option "font_type" defaults to "ttf" (TrueType-fonts) at the moment. As soon as PHP-internal (bitmap) fonts are also supported by Image_Text this will default to those internal fonts instead. !!

  • access: public
void setFontOptions ([array $options = array()])
  • array $options: stores information like font_type, font_path, font_file, font_size, antialiasing etc.
setSpacer (line 172)

Set spacer

The spacer-array stores values how many pixels of space should be added between above, below and besides an object. Note that possibly not all values are used for all objects. This depends upon the type of object and their position inside the graph. If some elements of the array are missing the current values are left in place. This way you can e.g. just modify the top-spacer for an object or set all bounds in one go.

  • access: public
void setSpacer (array $spacer)
  • array $spacer: (array of 4 ints) array with keys "top, bottom, left, right"
setText (line 189)

Set text

Multiple lines are possible by using "\n" as separator.

  • access: public
void setText (string $text)
  • string $text

Redefined in descendants as:

Documentation generated on Sat, 21 Feb 2004 23:28:04 +0100 by phpDocumentor 1.3.0RC2