summaryrefslogtreecommitdiffstats
path: root/src/driver
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-05-29 11:28:30 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-05-29 11:28:30 +0000
commit2942447b30b3be16ec869a40087ed6e79ed330e0 (patch)
tree762f8a0f86296ced69d23581623092f09af3b91d /src/driver
parent89a8010b0b0869d07cb1d433351a1334bf232c57 (diff)
downloadzetacomponents-graph-2942447b30b3be16ec869a40087ed6e79ed330e0.zip
zetacomponents-graph-2942447b30b3be16ec869a40087ed6e79ed330e0.tar.gz
- Added basic 2d renderer test
- Implemented tested 2d renderer functions
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/gd.php42
-rw-r--r--src/driver/svg.php45
2 files changed, 48 insertions, 39 deletions
diff --git a/src/driver/gd.php b/src/driver/gd.php
index 46107b3..eca864a 100644
--- a/src/driver/gd.php
+++ b/src/driver/gd.php
@@ -14,18 +14,15 @@
*/
class ezcGraphGDDriver extends ezcGraphDriver
{
-
/**
* Draws a single polygon
*
* @param mixed $points
* @param ezcGraphColor $color
* @param mixed $filled
- * @abstract
- * @access public
* @return void
*/
- public function drawPolygon( $points, ezcGraphColor $color, $filled = true )
+ public function drawPolygon( array $points, ezcGraphColor $color, $filled = true )
{
}
@@ -36,8 +33,6 @@ class ezcGraphGDDriver extends ezcGraphDriver
* @param ezcGraphCoordinate $start
* @param ezcGraphCoordinate $end
* @param ezcGraphColor $color
- * @abstract
- * @access public
* @return void
*/
public function drawLine( ezcGraphCoordinate $start, ezcGraphCoordinate $end, ezcGraphColor $color )
@@ -53,11 +48,9 @@ class ezcGraphGDDriver extends ezcGraphDriver
* @param mixed $width
* @param mixed $height
* @param ezcGraphColor $color
- * @abstract
- * @access public
* @return void
*/
- public function drawTextBox( $string, ezcGraphCoordinate $position, $width, $height, ezcGraphColor $color )
+ public function drawTextBox( $string, ezcGraphCoordinate $position, $width, $height, $align )
{
}
@@ -66,15 +59,14 @@ class ezcGraphGDDriver extends ezcGraphDriver
* Draws a sector of cirlce
*
* @param ezcGraphCoordinate $center
- * @param mixed $radius
+ * @param mixed $width
+ * @param mixed $height
* @param mixed $startAngle
* @param mixed $endAngle
* @param ezcGraphColor $color
- * @abstract
- * @access public
* @return void
*/
- public function drawCircleSector( ezcGraphCoordinate $center, $radius, $startAngle, $endAngle, ezcGraphColor $color )
+ public function drawCircleSector( ezcGraphCoordinate $center, $width, $height, $startAngle, $endAngle, ezcGraphColor $color )
{
}
@@ -83,16 +75,30 @@ class ezcGraphGDDriver extends ezcGraphDriver
* Draws a circular arc
*
* @param ezcGraphCoordinate $center
- * @param mixed $radius
+ * @param mixed $width
* @param mixed $height
* @param mixed $startAngle
* @param mixed $endAngle
* @param ezcGraphColor $color
- * @abstract
- * @access public
* @return void
*/
- public function drawCircularArc( ezcGraphCoordinate $center, $radius, $height, $startAngle, $endAngle, ezcGraphColor $color )
+ public function drawCircularArc( ezcGraphCoordinate $center, $width, $height, $startAngle, $endAngle, ezcGraphColor $color )
+ {
+
+ }
+
+ /**
+ * Draws a circle
+ *
+ * @param ezcGraphCoordinate $center
+ * @param mixed $width
+ * @param mixed $height
+ * @param ezcGraphColor $color
+ * @param bool $filled
+ *
+ * @return void
+ */
+ public function drawCircle( ezcGraphCoordinate $center, $width, $height, ezcGraphColor $color, $filled = true )
{
}
@@ -104,8 +110,6 @@ class ezcGraphGDDriver extends ezcGraphDriver
* @param ezcGraphCoordinate $position
* @param mixed $width
* @param mixed $height
- * @abstract
- * @access public
* @return void
*/
public function drawImage( $file, ezcGraphCoordinate $position, $width, $height )
diff --git a/src/driver/svg.php b/src/driver/svg.php
index 894ff8a..a5e9dae 100644
--- a/src/driver/svg.php
+++ b/src/driver/svg.php
@@ -1,6 +1,6 @@
<?php
/**
- * File containing the ezcGraphDriverSVG class
+ * File containing the ezcGraphSVGDriver class
*
* @package Graph
* @version //autogentag//
@@ -12,20 +12,18 @@
*
* @package Graph
*/
+
class ezcGraphSVGDriver extends ezcGraphDriver
{
-
/**
* Draws a single polygon
*
* @param mixed $points
* @param ezcGraphColor $color
* @param mixed $filled
- * @abstract
- * @access public
* @return void
*/
- public function drawPolygon( $points, ezcGraphColor $color, $filled = true )
+ public function drawPolygon( array $points, ezcGraphColor $color, $filled = true )
{
}
@@ -36,8 +34,6 @@ class ezcGraphSVGDriver extends ezcGraphDriver
* @param ezcGraphCoordinate $start
* @param ezcGraphCoordinate $end
* @param ezcGraphColor $color
- * @abstract
- * @access public
* @return void
*/
public function drawLine( ezcGraphCoordinate $start, ezcGraphCoordinate $end, ezcGraphColor $color )
@@ -53,11 +49,9 @@ class ezcGraphSVGDriver extends ezcGraphDriver
* @param mixed $width
* @param mixed $height
* @param ezcGraphColor $color
- * @abstract
- * @access public
* @return void
*/
- public function drawTextBox( $string, ezcGraphCoordinate $position, $width, $height, ezcGraphColor $color )
+ public function drawTextBox( $string, ezcGraphCoordinate $position, $width, $height, $align )
{
}
@@ -66,15 +60,14 @@ class ezcGraphSVGDriver extends ezcGraphDriver
* Draws a sector of cirlce
*
* @param ezcGraphCoordinate $center
- * @param mixed $radius
+ * @param mixed $width
+ * @param mixed $height
* @param mixed $startAngle
* @param mixed $endAngle
* @param ezcGraphColor $color
- * @abstract
- * @access public
* @return void
*/
- public function drawCircleSector( ezcGraphCoordinate $center, $radius, $startAngle, $endAngle, ezcGraphColor $color )
+ public function drawCircleSector( ezcGraphCoordinate $center, $width, $height, $startAngle, $endAngle, ezcGraphColor $color )
{
}
@@ -83,16 +76,30 @@ class ezcGraphSVGDriver extends ezcGraphDriver
* Draws a circular arc
*
* @param ezcGraphCoordinate $center
- * @param mixed $radius
+ * @param mixed $width
* @param mixed $height
* @param mixed $startAngle
* @param mixed $endAngle
* @param ezcGraphColor $color
- * @abstract
- * @access public
* @return void
*/
- public function drawCircularArc( ezcGraphCoordinate $center, $radius, $height, $startAngle, $endAngle, ezcGraphColor $color )
+ public function drawCircularArc( ezcGraphCoordinate $center, $width, $height, $startAngle, $endAngle, ezcGraphColor $color )
+ {
+
+ }
+
+ /**
+ * Draws a circle
+ *
+ * @param ezcGraphCoordinate $center
+ * @param mixed $width
+ * @param mixed $height
+ * @param ezcGraphColor $color
+ * @param bool $filled
+ *
+ * @return void
+ */
+ public function drawCircle( ezcGraphCoordinate $center, $width, $height, ezcGraphColor $color, $filled = true )
{
}
@@ -104,8 +111,6 @@ class ezcGraphSVGDriver extends ezcGraphDriver
* @param ezcGraphCoordinate $position
* @param mixed $width
* @param mixed $height
- * @abstract
- * @access public
* @return void
*/
public function drawImage( $file, ezcGraphCoordinate $position, $width, $height )
OpenPOWER on IntegriCloud