From 17b8e89991a4eee0944168aa10e0c43d2753db25 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Wed, 9 Aug 2006 13:03:53 +0000 Subject: - Added option to gd driver to set an external image as background - Got chart background images working again - Post process images in gd driver to not apply supersampling for images --- src/renderer/3d.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/renderer/3d.php') 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, -- cgit v1.1