Image_Graph
[ class tree: Image_Graph ] [ index: Image_Graph ] [ all elements ]

Class: Image_Graph_Element

Source Location: /Image_Graph-0.8.0/Graph/Element.php

Class Overview

Image_Graph_Common
   |
   --Image_Graph_Element

Representation of a element.


Author(s):

Version:

  • Release: 0.8.0

Copyright:

  • 2003-2009 The PHP Group

Methods


Child classes:

Image_Graph_Plotarea_Element
Representation of a element on a plotarea.
Image_Graph_Figure_Polygon
Polygon to draw on the canvas
Image_Graph_Figure_Ellipse
Ellipse to draw on the canvas
Image_Graph_Figure_Rectangle
Rectangle to draw on the canvas
Image_Graph_Logo
Displays a logo on the canvas.
Image_Graph
Main class for the graph creation.

Inherited Variables

Inherited Methods

Class: Image_Graph_Common

Image_Graph_Common::Image_Graph_Common()
Constructor [Image_Graph_Common]
Image_Graph_Common::add()
Adds an element to the objects element list.
Image_Graph_Common::addNew()
Creates an object from the class and adds it to the objects element list.
Image_Graph_Common::hide()
Hide the element

Class Details

[line 53]
Representation of a element.

The Image_Graph_Element can be drawn on the canvas, ie it has coordinates, Image_Graph_Line, Image_Graph_Fill, border and background - although not all of these may apply to all children.



[ Top ]


Method Detail

height   [line 651]

int height( )

The height of the element on the canvas
  • Return: Number of pixels representing the height of the element

Overridden in child classes as:

Image_Graph::height()
Gets the height of this graph.

[ Top ]

setBackground   [line 161]

void setBackground( Image_Graph_Fill &$background)

Sets the background fill style of the element

Overridden in child classes as:

Image_Graph_Marker_Value::setBackground()
Sets the background fill style of the element

Parameters:

Image_Graph_Fill   &$background   —  The background

[ Top ]

setBackgroundColor   [line 199]

void setBackgroundColor( mixed $color)

Sets the background color of the element.

See colors.txt in the docs/ folder for a list of available named colors.


Overridden in child classes as:

Image_Graph_Marker_Value::setBackgroundColor()
Sets the background color of the element

Parameters:

mixed   $color   —  The color

[ Top ]

setBorderColor   [line 253]

void setBorderColor( mixed $color)

Sets the border color of the element.

See colors.txt in the docs/ folder for a list of available named colors.


Parameters:

mixed   $color   —  The color

[ Top ]

setBorderStyle   [line 231]

void setBorderStyle( Image_Graph_Line &$borderStyle)

Sets the border line style of the element
  • See: Image_Graph_Line

Parameters:

Image_Graph_Line   &$borderStyle   —  The line style of the border

[ Top ]

setFillColor   [line 374]

void setFillColor( mixed $color)

Sets the fill color of the element.

See colors.txt in the docs/ folder for a list of available named colors.


Parameters:

mixed   $color   —  The color

[ Top ]

setFillStyle   [line 352]

void setFillStyle( Image_Graph_Fill &$fillStyle)

Sets the fill style of the element

Parameters:

Image_Graph_Fill   &$fillStyle   —  The fill style of the element

[ Top ]

setFont   [line 456]

void setFont( Image_Graph_Font &$font)

Sets the font of the element

Parameters:

Image_Graph_Font   &$font   —  The font of the element

[ Top ]

setFontAngle   [line 485]

void setFontAngle( int $angle)

Sets the font angle

Parameters:

int   $angle   —  The angle of the font

[ Top ]

setFontColor   [line 502]

void setFontColor( mixed $color)

Sets the font color

Parameters:

mixed   $color   —  The color of the font

[ Top ]

setFontSize   [line 473]

void setFontSize( int $size)

Sets the font size

Parameters:

int   $size   —  The size of the font

[ Top ]

setLineColor   [line 310]

void setLineColor( mixed $color)

Sets the line color of the element.

See colors.txt in the docs/ folder for a list of available named colors.


Parameters:

mixed   $color   —  The color

[ Top ]

setLineStyle   [line 288]

void setLineStyle( Image_Graph_Line &$lineStyle)

Sets the line style of the element
  • See: Image_Graph_Line

Parameters:

Image_Graph_Line   &$lineStyle   —  The line style of the element

[ Top ]

setPadding   [line 618]

void setPadding( mixed $padding)

Sets padding of the element

Parameters:

mixed   $padding   —  Number of pixels the element should be padded with or an array of paddings (left, top, right and bottom as index)

[ Top ]

showShadow   [line 182]

void showShadow( [string $color = 'black@0.2'], [int $size = 5])

Shows shadow on the element

Parameters:

string   $color   —  Shadow color
int   $size   —  Shadow size

[ Top ]

width   [line 641]

int width( )

The width of the element on the canvas
  • Return: Number of pixels representing the width of the element

Overridden in child classes as:

Image_Graph::width()
Gets the width of this graph.

[ Top ]

write   [line 757]

void write( int $x, int $y, string $text, [int $alignment = false], [??? $font = false])

Writes text to the canvas.

Parameters:

int   $x   —  The x position relative to alignment
int   $y   —  The y position relative to alignment
string   $text   —  The text
int   $alignment   —  The text alignment (both vertically and horizontally)
???   $font   —  The font to use

[ Top ]

_clip   [line 515]

void _clip( bool $enable)

Clip the canvas to the coordinates of the element
  • Access: protected

Parameters:

bool   $enable   —  Whether clipping should be enabled or disabled

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:39:34 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.