[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Image/Graph/ -> Element.php (sommaire)

Image_Graph - Main class for the graph creation. PHP versions 4 and 5

Author: Jesper Veggerby <pear.nosey@veggerby.dk>
Copyright: Copyright (C) 2003, 2004 Jesper Veggerby Hansen
License: http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
Version: CVS: $Id: Element.php,v 1.18 2006/02/28 22:48:07 nosey Exp $
Poids: 763 lignes (22 kb)
Inclus ou requis: 8 fois
Référencé: 0 fois
Nécessite: 1 fichier
 Image/Graph/Common.php

Définit 1 class

Image_Graph_Element:: (35 méthodes):
  setBackground()
  showShadow()
  setBackgroundColor()
  _getBackground()
  setBorderStyle()
  setBorderColor()
  _getBorderStyle()
  setLineStyle()
  setLineColor()
  _getLineStyle()
  setFillStyle()
  setFillColor()
  _getFillStyle()
  _getFont()
  setFont()
  setFontSize()
  setFontAngle()
  setFontColor()
  _clip()
  _setCoords()
  _move()
  _setWidth()
  _setHeight()
  setPadding()
  width()
  height()
  _fillLeft()
  _fillTop()
  _fillRight()
  _fillBottom()
  _fillWidth()
  _fillHeight()
  _displayShadow()
  write()
  _done()


Classe: Image_Graph_Element  - X-Ref

Representation of a element.

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

setBackground(& $background)   X-Ref
Sets the background fill style of the element

param: Image_Graph_Fill $background The background

showShadow($color = 'black@0.2', $size = 5)   X-Ref
Shows shadow on the element


setBackgroundColor($color)   X-Ref
Sets the background color of the element.

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

param: mixed $color The color

_getBackground()   X-Ref
Gets the background fill style of the element

return: int A GD fillstyle representing the background style

setBorderStyle(& $borderStyle)   X-Ref
Sets the border line style of the element

param: Image_Graph_Line $borderStyle The line style of the border

setBorderColor($color)   X-Ref
Sets the border color of the element.

See colors.txt in the docs/ folder for a list of available named colors.
param: mixed $color The color

_getBorderStyle()   X-Ref
Gets the border line style of the element

return: int A GD linestyle representing the borders line style

setLineStyle(& $lineStyle)   X-Ref
Sets the line style of the element

param: Image_Graph_Line $lineStyle The line style of the element

setLineColor($color)   X-Ref
Sets the line color of the element.

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

param: mixed $color The color

_getLineStyle($ID = false)   X-Ref
Gets the line style of the element

return: int A GD linestyle representing the line style

setFillStyle(& $fillStyle)   X-Ref
Sets the fill style of the element

param: Image_Graph_Fill $fillStyle The fill style of the element

setFillColor($color)   X-Ref
Sets the fill color of the element.

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

param: mixed $color The color

_getFillStyle($ID = false)   X-Ref
Gets the fill style of the element

return: int A GD filestyle representing the fill style

_getFont($options = false)   X-Ref
Gets the font of the element.

If not font has been set, the parent font is propagated through it's
children.

return: array An associated array used for canvas

setFont(& $font)   X-Ref
Sets the font of the element

param: Image_Graph_Font $font The font of the element

setFontSize($size)   X-Ref
Sets the font size

param: int $size The size of the font

setFontAngle($angle)   X-Ref
Sets the font angle

param: int $angle The angle of the font

setFontColor($color)   X-Ref
Sets the font color

param: mixed $color The color of the font

_clip($enable)   X-Ref
Clip the canvas to the coordinates of the element

param: $enable bool Whether clipping should be enabled or disabled

_setCoords($left, $top, $right, $bottom)   X-Ref
Sets the coordinates of the element

param: int $left The leftmost pixel of the element on the canvas
param: int $top The topmost pixel of the element on the canvas
param: int $right The rightmost pixel of the element on the canvas
param: int $bottom The bottommost pixel of the element on the canvas

_move($deltaX, $deltaY)   X-Ref
Moves the element

param: int $deltaX Number of pixels to move the element to the right
param: int $deltaY Number of pixels to move the element downwards

_setWidth($width)   X-Ref
Sets the width of the element relative to the left side

param: int $width Number of pixels the element should be in width

_setHeight($height)   X-Ref
Sets the height of the element relative to the top

param: int $width Number of pixels the element should be in height

setPadding($padding)   X-Ref
Sets padding of the element

param: mixed $padding Number of pixels the element should be padded with

width()   X-Ref
The width of the element on the canvas

return: int Number of pixels representing the width of the element

height()   X-Ref
The height of the element on the canvas

return: int Number of pixels representing the height of the element

_fillLeft()   X-Ref
Left boundary of the background fill area

return: int Leftmost position on the canvas

_fillTop()   X-Ref
Top boundary of the background fill area

return: int Topmost position on the canvas

_fillRight()   X-Ref
Right boundary of the background fill area

return: int Rightmost position on the canvas

_fillBottom()   X-Ref
Bottom boundary of the background fill area

return: int Bottommost position on the canvas

_fillWidth()   X-Ref
Returns the filling width of the element on the canvas

return: int Filling width

_fillHeight()   X-Ref
Returns the filling height of the element on the canvas

return: int Filling height

_displayShadow()   X-Ref
Draws a shadow 'around' the element

Not implemented yet.


write($x, $y, $text, $alignment = false, $font = false)   X-Ref
Writes text to the canvas.

param: int $x The x position relative to alignment
param: int $y The y position relative to alignment
param: string $text The text
param: int $alignmen The text alignment (both vertically and horizontally)

_done()   X-Ref
Output the element to the canvas

return: bool Was the output 'good' (true) or 'bad' (false).



Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7