Source for file Walls.php
Documentation is available at Walls.php
* Description: Chart Walls. Accesses Wall and overall Wall
* display characteristics
* @copyright (c) 1995-2010 by Steema Software SL. All Rights Reserved. <info@steema.com>
* @link http://www.steema.com
function __get( $property ) {
$method = "get{$property}";
function __set ( $property,$value ) {
$method = "set{$property}";
return $this->$method($value);
* Defines the Pen and Brush used to fill the left chart side.<br>
* Available IWall properties are Brush, Color, Dark3D, Gradient, Pen,
* Size and Transparent.<br>
* tChart.Aspect.View3D and tChart.Walls.Visible
* should be true to use tChart.Walls.Back, tChart.Walls.Bottom,
* tChart.Walls.Left and tChart.Walls.Right.
* Defines the pen and brush used to fill the right chart side.<br>
* Available IWall properties are Brush, Color, Dark3D, Gradient, Pen,
* Size and Transparent.<br>
* tChart.Aspect.View3D and tChart.Walls.Visible
* should be true to use tChart.Walls.Back, tChart.Walls.Bottom,
* tChart.Walls.Left and tChart.Walls.Right.
* Defines the pen and brush used to fill the back chart side.<br>
* Available IWall properties are Brush, Color, Dark3D, Gradient, Pen,
* Size and Transparent.<br>
* tChart.Aspect.View3D and tChart.Walls.Visible
* should be true to use tChart.Walls.Back, tChart.Walls.Bottom,
* tChart.Walls.Left and tChart.Walls.Right.
* Defines the pen and brush used to fill the bottom chart side.<br>
* Available IWall properties are Brush, Color, Dark3D, Gradient, Pen,
* Size and Transparent.<br>
* tChart.Aspect.View3D and tChart.Walls.Visible
* should be true to use tChart.Walls.Back, tChart.Walls.Bottom,
* tChart.Walls.Left and tChart.Walls.Right.
* Shows / Hides all Chart walls.<br>
* Visible draws Left and Bottom "walls" to simulate 3D effect.<br>
* You can control the 3D Wall proportion by using
* Chart.Aspect.Chart3DPercent.<br>
* Chart.Aspect.View3D controls (on/off) Walls.Visible. <br>
* Shows / Hides all Chart walls.<br>
* Shows all Chart walls in 3D.<br>
* Shows all Chart walls in 3D when true.<br>
public function Walls($c) {
* Paints walls at rectangle r.
public function paint($g, $r) {
$old_name = TChart::$controlName;
if ($this->back->getVisible()) {
$this->back->paint($g, $r);
TChart::$controlName = $old_name;
if ($this->chart->getAspect()->getView3D() && $this->visible) {
if ($this->left->getVisible()) {
$this->left->paint($g, $r);
TChart::$controlName = $old_name;
if ($this->bottom->getVisible()) {
$this->bottom->paint($g, $r);
TChart::$controlName = $old_name;
if ($this->right->getVisible()) {
$this->right->paint($g, $r);
* Calculates the Wall thickness of the specified Axis.
if ($a === $this->chart->getAxes()->getLeft()) {
return $this->left->getSize();
if ($a === $this->chart->getAxes()->getBottom()) {
return $this->bottom->getSize();
$this->getLeft()->setChart($value);
$this->getBack()->setChart($value);
* <p>Title: LeftWall class</p>
* <p>Description: Wall Panel at left of Chart</p>
* <p>Copyright (c) 2005-2010 by Steema Software SL. All Rights Reserved.</p>
* <p>Company: Steema Software SL</p>
* Use this method to paint a left wall at rectangle r.
public function paint($g, $rect) {
TChart::$controlName .= 'LeftWall_';
$tmpB = $rect->getBottom() +
$this->chart->getWalls()->calcWallSize($this->chart->getAxes()->getBottom());
$w = $this->chart->getAspect()->getWidth3D();
$g->cube($rect->x - $this->iSize, $rect->y, $rect->x, $tmpB, 0, $w,
$g->rectangleZ($rect->x, $rect->y, $tmpB, 0, $w);
* The color used to fill the LeftWall background.<br>
* Default value: LIGHT_YELLOW
return parent::getColor();
* Specifies the color used to fill the LeftWall background.<br>
* Default value: LIGHT_YELLOW
parent::setColor($value);
* <p>Title: RightWall class</p>
* <p>Description: Wall Panel at right of Chart.</p>
* <p>Copyright (c) 2005-2010 by Steema Software SL. All Rights
* <p>Company: Steema Software SL</p>
* Use this method to paint a right wall at rectangle r.
public function paint($g, $rect) {
TChart::$controlName .= 'RightWall_';
$b = $rect->getBottom() + $this->chart->getWalls()->calcWallSize($this->chart->getAxes()->getBottom());
$w = $this->chart->getAspect()->getWidth3D();
$g->cube($rect->getRight(), $rect->y, $rect->getRight() + $this->iSize, $b, 0,
$g->rectangleZ($rect->getRight(), $rect->y, $b, 0, $w + 1);
* Shows/Hides Right Wall.<br>
return parent::getVisible();
* Shows/Hides Right Wall.<br>
parent::setVisible($value);
* <p>Title: BackWall class</p>
* <p>Description: Wall Panel at rear of Chart</p>
* <p>Copyright (c) 2005-2010 by Steema Software SL. All Rights
* <p>Company: Steema Software SL</p>
* Use this method to paint a back wall at rectangle r.
public function paint($g, $rect) {
TChart::$controlName .= 'BackWall_';
if ($this->chart->getAspect()->getView3D()) {
$w = $this->chart->getAspect()->getWidth3D();
$s = $this->chart->getWalls()->calcWallSize($this->chart->getAxes()->getLeft());
$r->height += $this->chart->getWalls()->calcWallSize($this->chart->getAxes()->getBottom());
$g->cube($r->getLeft(), $r->getTop(), $r->getRight(),$r->getBottom(), $w, $w + $this->iSize, $this->getShouldDark());
$g->rectangleWithZ($rect, $w);
* <p>Title: BottomWall class</p>
* <p>Description: Wall Panel at bottom of Chart.</p>
* <p>Copyright (c) 2005-2010 by Steema Software SL. All Rights
* <p>Company: Steema Software SL</p>
* Use this method to paint a bottom wall at rectangle r.
public function paint($g, $rect) {
TChart::$controlName .= 'BottomWall_';
$w = $this->chart->getAspect()->getWidth3D();
$r->height = $this->iSize;
$g->rectangleY($rect->x, $rect->getBottom(), $rect->getRight(), 0, $w);
|