diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2007-01-24 10:45:35 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2007-01-24 10:45:35 +0000 |
commit | 937d04f2094624af45c0241bc75f3cbef4182c70 (patch) | |
tree | 86dd6071468f1b3e63a37e4a58228decb2e2464c /src | |
parent | 16bdb8776708f401d085c29222a88a2ae7667ced (diff) | |
download | zetacomponents-graph-937d04f2094624af45c0241bc75f3cbef4182c70.zip zetacomponents-graph-937d04f2094624af45c0241bc75f3cbef4182c70.tar.gz |
- Fixed issue #10056: Fixed drawing order for boxes with background and border
# SVG element order changed without visual difference in comparision images
# Mind, that bug #9765 hast severe effect for big borders
Diffstat (limited to 'src')
-rw-r--r-- | src/renderer/2d.php | 33 | ||||
-rw-r--r-- | src/renderer/3d.php | 33 |
2 files changed, 34 insertions, 32 deletions
diff --git a/src/renderer/2d.php b/src/renderer/2d.php index 7512bda..c509c7c 100644 --- a/src/renderer/2d.php +++ b/src/renderer/2d.php @@ -851,6 +851,21 @@ class ezcGraphRenderer2d extends ezcGraphRenderer $boundings->y0 += $margin; $boundings->x1 -= $margin; $boundings->y1 -= $margin; + + if ( $background instanceof ezcGraphColor ) + { + // Draw box background + $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 ), + ), + $background, + true + ); + } if ( ( $borderColor instanceof ezcGraphColor ) && ( $borderWidth > 0 ) ) @@ -864,7 +879,8 @@ class ezcGraphRenderer2d extends ezcGraphRenderer new ezcGraphCoordinate( $boundings->x0, $boundings->y1 ), ), $borderColor, - false + false, + $borderWidth ); // Reduce local boundings by borderWidth @@ -873,21 +889,6 @@ class ezcGraphRenderer2d extends ezcGraphRenderer $boundings->x1 -= $borderWidth; $boundings->y1 -= $borderWidth; } - - if ( $background instanceof ezcGraphColor ) - { - // Draw box background - $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 ), - ), - $background, - true - ); - } // Apply padding $boundings->x0 += $padding; diff --git a/src/renderer/3d.php b/src/renderer/3d.php index 4005255..dfa7cf6 100644 --- a/src/renderer/3d.php +++ b/src/renderer/3d.php @@ -1482,6 +1482,21 @@ class ezcGraphRenderer3d extends ezcGraphRenderer $boundings->y0 += $margin; $boundings->x1 -= $margin; $boundings->y1 -= $margin; + + if ( $background instanceof ezcGraphColor ) + { + // Draw box background + $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 ), + ), + $background, + true + ); + } if ( ( $borderColor instanceof ezcGraphColor ) && ( $borderWidth > 0 ) ) @@ -1495,7 +1510,8 @@ class ezcGraphRenderer3d extends ezcGraphRenderer new ezcGraphCoordinate( $boundings->x0, $boundings->y1 ), ), $borderColor, - false + false, + $borderWidth ); // Reduce local boundings by borderWidth @@ -1504,21 +1520,6 @@ class ezcGraphRenderer3d extends ezcGraphRenderer $boundings->x1 -= $borderWidth; $boundings->y1 -= $borderWidth; } - - if ( $background instanceof ezcGraphColor ) - { - // Draw box background - $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 ), - ), - $background, - true - ); - } // Apply padding $boundings->x0 += $padding; |