diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-02-26 10:18:00 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-02-26 10:18:00 +0000 |
commit | 15e0162c83faa211ea4e4e6cae7faf70e10e9a9c (patch) | |
tree | 972999d0443918acf78454610bb8cd9c32955753 /src/structs | |
parent | e9d7bc2afe91b3aa6633cfc987ffe29b0206fa89 (diff) | |
download | zetacomponents-graph-15e0162c83faa211ea4e4e6cae7faf70e10e9a9c.zip zetacomponents-graph-15e0162c83faa211ea4e4e6cae7faf70e10e9a9c.tar.gz |
- Implemented #20276 for centered axis label renderer
Diffstat (limited to 'src/structs')
-rw-r--r-- | src/structs/step.php | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/src/structs/step.php b/src/structs/step.php new file mode 100644 index 0000000..7dcb593 --- /dev/null +++ b/src/structs/step.php @@ -0,0 +1,96 @@ +<?php +/** + * File containing the ezcGraphAxisStep struct + * + * @package Graph + * @version //autogentag// + * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved. + * @license http://ez.no/licenses/new_bsd New BSD License + */ +/** + * Represents a single step on the axis + * + * @package Graph + */ +class ezcGraphAxisStep +{ + /** + * Position of step on one axis. + * + * @var float + */ + public $position = 0; + + /** + * Size of step + * + * @var float + */ + public $width = 0; + + /** + * Steps label + * + * @var string + */ + public $label = false; + + /** + * Childrens of step + * + * @var array( ezcGraphAxisStep ) + */ + public $childs = array(); + + /** + * True if the step is at the same position as the other axis + * + * @var bool + */ + public $isZero = false; + + /** + * True if this step is the last one + * + * @var bool + */ + public $isLast = false; + + /** + * Simple constructor + * + * @param float $position + * @param float $width + * @param string $label + * @param array $childs + * @ignore + */ + public function __construct( $position = .0, $width = .0, $label = false, array $childs = array(), $isZero = false, $isLast = false ) + { + $this->position = (float) $position; + $this->width = (float) $width; + $this->label = $label; + $this->childs = $childs; + $this->isZero = (bool) $isZero; + $this->isLast = (bool) $isLast; + } + + /** + * __set_state + * + * @param array $properties Struct properties + * @return void + * @ignore + */ + public function __set_state( array $properties ) + { + $this->position = $properties['position']; + $this->width = $properties['width']; + $this->label = $properties['label']; + $this->childs = $properties['childs']; + $this->isZero = $properties['isZero']; + $this->isLast = $properties['isLast']; + } +} + +?> |