Author: Kore Nordmann
Date: 2006-06-12 17:52:13 +0200 (Mon, 12 Jun 2006)
New Revision: 3124

Log:
- Added tests and implementation for ezcGraphRenderer2D::drawBackgroundImage

Modified:
   trunk/Graph/src/renderer/2d.php
   trunk/Graph/tests/renderer_2d_test.php

Modified: trunk/Graph/src/renderer/2d.php
===================================================================
--- trunk/Graph/src/renderer/2d.php     2006-06-12 14:25:10 UTC (rev 3123)
+++ trunk/Graph/src/renderer/2d.php     2006-06-12 15:52:13 UTC (rev 3124)
@@ -164,7 +164,12 @@
      */
     public function drawBackgroundImage( $file, ezcGraphCoordinate $position = 
null, $width = null, $height = null )
     {
-        
+        $this->driver->drawImage(
+            $file,
+            $position,
+            $width,
+            $height
+        );  
     }
     
     /**

Modified: trunk/Graph/tests/renderer_2d_test.php
===================================================================
--- trunk/Graph/tests/renderer_2d_test.php      2006-06-12 14:25:10 UTC (rev 
3123)
+++ trunk/Graph/tests/renderer_2d_test.php      2006-06-12 15:52:13 UTC (rev 
3124)
@@ -336,5 +336,25 @@
             50
         );
     }
+
+    public function testRenderBackgroundImage()
+    {
+        $this->driver
+            ->expects( $this->once() )
+            ->method( 'drawImage' )
+            ->with(
+                $this->equalTo( 'filename' ),
+                $this->equalTo( new ezcGraphCoordinate( 100, 100 ) ),
+                $this->equalTo( 50 ),
+                $this->equalTo( 50 )
+            );
+
+        $this->renderer->drawBackgroundImage(
+            'filename',
+            new ezcGraphCoordinate( 100, 100 ),
+            50,
+            50
+        );
+    }
 }
 ?>

-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to