summaryrefslogtreecommitdiffstats
path: root/src/interfaces/renderer.php
blob: b14ecdeba32b73a8e0af8fa88348916f208a260c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
/**
 * File containing the abstract ezcGraphRenderer class
 *
 * @package Graph
 * @version //autogentag//
 * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved.
 * @license http://ez.no/licenses/new_bsd New BSD License
 */
/**
 * Abstract class to transform the basic chart components. To be extended by
 * three- and twodimensional renderers.
 *
 * @package Graph
 */
abstract class ezcGraphRenderer
{
    /**
     * Draw a pie segment
     * 
     * @param ezcGraphCoordinate $position 
     * @param mixed $radius 
     * @param float $startAngle 
     * @param float $endAngle 
     * @param float $moveOut 
     * @return void
     */
    abstract public function drawPieSegment( ezcGraphCoordinate $position, $radius, $startAngle = .0, $endAngle = 360., $moveOut = .0 );
    
    /**
     * Draw a line
     *
     * Semantically means a line as a chart element, not a single line like
     * the ones used in axes.
     * 
     * @param ezcGraphCoordinate $position 
     * @param ezcGraphCoordinate $end 
     * @param mixed $filled 
     * @return void
     */
    abstract public function drawLine( ezcGraphCoordinate $position, ezcGraphCoordinate $end, $filled = true );
    
    /**
     * Draws a text box
     * 
     * @param ezcGraphCoordinate $position 
     * @param mixed $text 
     * @param mixed $width 
     * @param mixed $height 
     * @return void
     */
    abstract public function drawTextBox( ezcGraphCoordinate $position, $text, $width = null, $height = null );
    
    /**
     * Draws a rectangle
     *
     * @param ezcGraphColor $color 
     * @param ezcGraphCoordinate $position 
     * @param mixed $width 
     * @param mixed $height 
     * @param float $borderWidth 
     * @return void
     */
    abstract public function drawRect( ezcGraphColor $color, ezcGraphCoordinate $position = null, $width = null, $height = null, $borderWidth = 1 );
    
    /**
     * Draw Background
     *
     * Draws a filled rectangle, used for backgrounds
     * 
     * @param ezcGraphColor $color 
     * @param ezcGraphCoordinate $position 
     * @param mixed $width 
     * @param mixed $height 
     * @return void
     */
    abstract public function drawBackground( ezcGraphColor $color, ezcGraphCoordinate $position = null, $width = null, $height = null );
    
    /**
     * Draws BackgrouniImage
     * 
     * @param mixed $file 
     * @param ezcGraphCoordinate $position 
     * @param mixed $width 
     * @param mixed $height 
     * @return void
     */
    abstract public function drawBackgroundImage( $file, ezcGraphCoordinate $position = null, $width = null, $height = null );
    
    /**
     * Draws a lines symbol
     * 
     * @param ezcGraphCoordinate $position 
     * @param float $width 
     * @param float $height 
     * @param int $symbol 
     * @return void
     */
    abstract public function drawSymbol( ezcGraphCoordinate $position, $width, $height, $symbol = ezcGraph::NO_SYMBOL);
}
OpenPOWER on IntegriCloud