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

Class: Rectangle

Source Location: /Rectangle.php

Class Overview

Shape
   |
   --Rectangle

Wrapper around gd's Image(Filled)Rectangle functions


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 28]
Wrapper around gd's Image(Filled)Rectangle functions

Class used to draw rectangles in the chart image This class is utilized by:

  • Chart class for drawing the legend rectangles
  • BarChart class for drawing the chart bars




Tags:

license:  GNU Public License
author:  Tsiavos Chris <jaames@freemail.gr>


[ Top ]


Class Variables

$Caption =

[line 64]

the caption of the rectangle. (This property is mostly used for the status-indication

property of the chart)




Tags:

access:  private

Type:   string


[ Top ]

$CaptionColor =

[line 71]

the color of the rectangle's caption



Tags:

access:  private

Type:   string


[ Top ]

$Font =

[line 78]

the font instance used for drawing the Rectangle's caption



Tags:

access:  private

Type:   Font


[ Top ]

$X_Finish =

[line 42]

x value of the bottom right coordinate of the rectangle



Tags:

access:  private

Type:   integer


[ Top ]

$X_Start =

[line 35]

x value of the upper left coordinate of the rectangle



Tags:

access:  private

Type:   integer


[ Top ]

$Y_Finish =

[line 56]

y value of the bottom right coordinate of the rectangle



Tags:

access:  private

Type:   integer


[ Top ]

$Y_Start =

[line 49]

y value of the upper left coordinate of the rectangle



Tags:

access:  private

Type:   integer


[ Top ]



Class Methods


constructor __construct [line 91]

Rectangle __construct( mixed &$Canvas, ColorAllocator &$ColorAllocator, string $UseAntialias, integer $X_Start, integer $Y_Start, integer $X_Finish, integer $Y_Finish, string $Caption)

Constructor



Overrides Shape::__construct() (parent method not documented)

Parameters:

mixed   $Canvas   reference to the image identifier the rectangle will be drawn in
ColorAllocator   $ColorAllocator   reference to the ColorAllocator the class will use for allocating the rectangle color
string   $UseAntialias   whether antialias functions should be used or not when drawing the rectangle
integer   $X_Start   x value of the upper left coordinate of the rectangle
integer   $Y_Start   y value of the upper left coordinate of the rectangle
integer   $X_Finish   x value of the bottom right coordinate of the rectangle
integer   $Y_Finish   y value of the bottom right coordinate of the rectangle
string   $Caption   the caption of the rectangle

[ Top ]

method draw [line 122]

void draw( string $BorderColor, integer $Alpha)

Draws the border of the rectangle



Tags:

access:  public


Parameters:

string   $BorderColor  
integer   $Alpha   the alpha value of the border color

[ Top ]

method draw_Caption [line 184]

void draw_Caption( )

Draws the rectangle's caption



Tags:

access:  private


[ Top ]

method draw_Filled [line 146]

void draw_Filled( string $StartColor, string $FinishColor, integer $Alpha)

Draws a filled rectangle



Tags:

access:  public


Parameters:

string   $StartColor   specifies the starting color of the filled rectangle
string   $FinishColor   specifies the finish color of the filled rectangle If the $StartColor and $FinishColor are different then the rectangle will be filled with gradient color
integer   $Alpha   the alpha value of the rectangle's color

[ Top ]

method draw_GradientRectangle [line 174]

void draw_GradientRectangle( mixed $ColorHandler)

Draws a gradient color filled rectangle



Tags:

access:  private


Parameters:

mixed   $ColorHandler   the color indentifier which will be used to fill the rectangle

[ Top ]

method draw_NormalRectangle [line 164]

void draw_NormalRectangle( mixed $ColorHandler)

Draws a uniform color filled rectangle



Tags:

access:  private


Parameters:

mixed   $ColorHandler   the color indentifier which will be used to fill the rectangle

[ Top ]

method set_Caption [line 109]

void set_Caption( Font &$Font, string $Caption, string $CaptionColor)

Specifies the caption properties of the rectangle



Tags:

access:  public


Parameters:

Font   &$Font  
string   $Caption  
string   $CaptionColor  

[ Top ]


Documentation generated on Sun, 3 Oct 2004 14:59:32 +0300 by phpDocumentor 1.3.0RC3