summaryrefslogtreecommitdiffstats
path: root/src/renderer/3d.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer/3d.php')
-rw-r--r--src/renderer/3d.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/renderer/3d.php b/src/renderer/3d.php
index 819b6f5..1997e56 100644
--- a/src/renderer/3d.php
+++ b/src/renderer/3d.php
@@ -1189,7 +1189,13 @@ class ezcGraphRenderer3d extends ezcGraphRenderer
$imageWidth = $imageData[0];
$imageHeight = $imageData[1];
- $imagePosition = new ezcGraphCoordinate( 0, 0 );
+ $imageWidth = min( $imageWidth, $boundings->x1 - $boundings->x0 );
+ $imageHeight = min( $imageHeight, $boundings->y1 - $boundings->y0 );
+
+ $imagePosition = new ezcGraphCoordinate(
+ $boundings->x0,
+ $boundings->y0
+ );
// Determine x position
switch ( true ) {
@@ -1233,9 +1239,6 @@ class ezcGraphRenderer3d extends ezcGraphRenderer
break;
}
- $imageWidth = min( $imageWidth, $boundings->x1 - $boundings->x0 );
- $imageHeight = min( $imageHeight, $boundings->y1 - $boundings->y0 );
-
// Texturize backround based on position and repetition
$position = new ezcGraphCoordinate(
$imagePosition->x,
OpenPOWER on IntegriCloud