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

Class: Image_Graph_Element

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

Class Overview

Image_Graph_Common
   |
   --Image_Graph_Element

Representation of a element.


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • Copyright (C) 2003, 2004 Jesper Veggerby Hansen

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 51]
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 602]

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 157]

void setBackground( &$background, 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
   &$background   — 

[ Top ]

setBackgroundColor   [line 188]

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 237]

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 218]

void setBorderStyle( &$borderStyle, 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
   &$borderStyle   — 

[ Top ]

setFillColor   [line 348]

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 328]

void setFillStyle( &$fillStyle, Image_Graph_Fill $fillStyle)

Sets the fill style of the element

Parameters:

Image_Graph_Fill   $fillStyle   —  The fill style of the element
   &$fillStyle   — 

[ Top ]

setFont   [line 424]

void setFont( &$font, Image_Graph_Font $font)

Sets the font of the element

Parameters:

Image_Graph_Font   $font   —  The font of the element
   &$font   — 

[ Top ]

setFontAngle   [line 449]

void setFontAngle( int $angle)

Sets the font angle

Parameters:

int   $angle   —  The angle of the font

[ Top ]

setFontColor   [line 464]

void setFontColor( mixed $color)

Sets the font color

Parameters:

mixed   $color   —  The color of the font

[ Top ]

setFontSize   [line 439]

void setFontSize( int $size)

Sets the font size

Parameters:

int   $size   —  The size of the font

[ Top ]

setLineColor   [line 290]

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 270]

void setLineStyle( &$lineStyle, 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
   &$lineStyle   — 

[ Top ]

setPadding   [line 568]

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 173]

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

Shows shadow on the element

Parameters:

   $color   — 
   $size   — 

[ Top ]

width   [line 592]

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 704]

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

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   $alignmen   —  The text alignment (both vertically and horizontally)
   $alignment   — 
   $font   — 

[ Top ]

_clip   [line 475]

void _clip( $enable $enable)

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

Parameters:

$enable   $enable   —  bool Whether clipping should be enabled or disabled

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:37:23 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.