diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2009-01-20 11:42:06 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2009-01-20 11:42:06 +0000 |
commit | af6c8b78b44a48da82b94c0f47b248a66f54d275 (patch) | |
tree | 43b5a8581d872ed701838a9b973d99f861db041c /src | |
parent | c8e553c98361944727f7ae933e5fc89d7ba5956c (diff) | |
download | zetacomponents-graph-af6c8b78b44a48da82b94c0f47b248a66f54d275.zip zetacomponents-graph-af6c8b78b44a48da82b94c0f47b248a66f54d275.tar.gz |
- Implamented feature #14146: Add new data symbols - square and box
Diffstat (limited to 'src')
-rw-r--r-- | src/graph.php | 8 | ||||
-rw-r--r-- | src/interfaces/renderer.php | 13 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/graph.php b/src/graph.php index 1bfc924..14a1b3b 100644 --- a/src/graph.php +++ b/src/graph.php @@ -36,6 +36,14 @@ class ezcGraph * symbol. */ const ARROW = 4; + /** + * A square, filled box, symbol + */ + const SQUARE = 5; + /** + * A non-filled box symbol + */ + const BOX = 6; /** * Constant used for background repetition. No repeat. diff --git a/src/interfaces/renderer.php b/src/interfaces/renderer.php index 090b947..f87257e 100644 --- a/src/interfaces/renderer.php +++ b/src/interfaces/renderer.php @@ -488,6 +488,7 @@ abstract class ezcGraphRenderer switch ( $symbol ) { case ezcGraph::NO_SYMBOL: + case ezcGraph::SQUARE: $return = $this->driver->drawPolygon( array( new ezcGraphCoordinate( $boundings->x0, $boundings->y0 ), @@ -531,6 +532,18 @@ abstract class ezcGraphRenderer ); } return $return; + case ezcGraph::BOX: + $return = $this->driver->drawPolygon( + array( + new ezcGraphCoordinate( $boundings->x0, $boundings->y0 ), + new ezcGraphCoordinate( $boundings->x1, $boundings->y0 ), + new ezcGraphCoordinate( $boundings->x1, $boundings->y1 ), + new ezcGraphCoordinate( $boundings->x0, $boundings->y1 ), + ), + $color, + false + ); + return $return; case ezcGraph::DIAMOND: $return = $this->driver->drawPolygon( array( |