Source for file TeeShape.php
Documentation is available at TeeShape.php
* Description: Base class for Chart Shape elements
* @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 Shape Borders.
* Defines the boundaries of the Shape.
* Defines the boundaries of the Shape.
* Obsolete.&ndsp;Please use Bevel.<!-- -->Inner.
* Defines the inner bevel type of the TChart Panel border.<br>
* @param value BevelStyle
* Obsolete. Please use Bevel.<!-- -->Width
* Obsolete. Please use Bevel.<!-- -->Width
* Obsolete. Please use Bevel.<!-- -->Outer
* Defines the outer bevel type of the TChart Panel border.<br>
* @param value BevelStyle
* Chart associated with this object.
if ($this->pPen != null) {
* Sets the bevel characteristics of the Shape.
* Sets the bevel characteristics of the Shape.
* Internal use - serialization
* Defines the shape's Shadow characteristics.
* Defines the kind of brush used to fill shape background.
* Internal use - serialization
* Rounds the Borders of the Chart Shapes.
* Rounds the Borders of the Chart Shapes.
// Assign value to independent shape borders
* Rendered Image for Shape background.<br>
* Sets Rendered Image for Shape background.<br>
* ImageMode for rendered Shape background Image.<br>
* Default value: ImageMode::$Stretch
return $this->getBrush()->getImageMode();
* Sets the ImageMode for rendered Shape background Image.<br>
* Default value: ImageMode.Stretch
$this->getBrush()->setImageMode($value);
//CDI TTrack //#1480 -- added new property ... have to set Shape.Color to Color.Transparent for it to work
/** Sets the shape image to transparent.
return $this->getBrush()->getImageTransparent();
$this->getBrush()->setImageTransparent($value);
* Defines the shape Color.
* Defines the shape Color.
* Calls the Gradient characteristics for the shape.
return $this->getBrush()->getGradient();
* Shows or hides the Shape.
* Shows or hides the Shape.
* Enables/disables transparency of shape.<br>
* See transparency, which sets percentage transparency when
* @see Shape#getTransparency
* Enables/disables transparency of shape.<br>
* Specifies the pen used to draw the shape.
if ($this->pPen == null) {
* Internal use - serialization
public function setPen($value) {
* Shape rectangle left co-ordinate.
* Shape rectangle left co-ordinate.
$this->shapeBounds->x= $value; //$this->setIntegerProperty($this->shapeBounds->x, $value);
* Shape rectangle top co-ordinate.
* Shape rectangle top co-ordinate.
public function setTop($value) {
* Shape rectangle right co-ordinate.
* Shape rectangle right co-ordinate.
* Shape rectangle bottom co-ordinate.
* Shape rectangle bottom co-ordinate.
/* The Height of the shape. */
/* The Width of the shape. */
* Assign all properties from a shape to another.
public function assign($shape) {
if ($shape->bBevel != null) {
$this->bBevel->assign($shape->bBevel);
if ($shape->bBrush != null) {
$this->bBrush->assign($shape->bBrush);
if ($shape->pPen != null) {
$this->pPen->assign($shape->pPen, $shape->pPen->getColor());
if ($shape->shadow != null) {
$this->shadow->assign($shape->shadow);
public function paint($gd, $rect) {
//$gd->roundRectangle($rect->x, $rect->y, $rect->getRight(),
// $rect->getBottom(), $this->bBorderRound);
if ($this->getBrush()->getGradient()->getVisible()== true) {
$colA = array($this->getBrush()->getGradient()->getStartColor()->getRed(),
$this->getBrush()->getGradient()->getStartColor()->getGreen(),
$this->getBrush()->getGradient()->getStartColor()->getBlue());
$colB = array($this->getBrush()->getGradient()->getEndColor()->getRed(),
$this->getBrush()->getGradient()->getEndColor()->getGreen(),
$this->getBrush()->getGradient()->getEndColor()->getBlue());
$penWidth= $this->getPen()->getWidth();
$this->getChart()->getGraphics3D()->img,
$rect->getX()+ $penWidth, $rect->getY()+ $penWidth,
$rect->getRight()- $penWidth, $rect->getHeight()- $penWidth,
if (($this->shadow != null) && $this->shadow->getVisible()) {
$this->shadow->draw($gd, $rect);
$this->bBevel->draw($gd, $rect);
* The Transparency level from 0 to 100% of shape.<br>
* Transparency is a value between 0 and 100 which sets the transparency
* percentage with respect to foreground versus background.<br>
return $this->getBrush()->getTransparency();
* Sets Transparency level from 0 to 100% of shape.<br>
$this->getBrush()->setTransparency($value);
|