@@ -69,7 +69,7 @@ class Image_Canvas_Tool
69
69
* @return string The filename of the font
70
70
* @static
71
71
*/
72
- function fontMap ($ name , $ type = '.ttf ' )
72
+ static function fontMap ($ name , $ type = '.ttf ' )
73
73
{
74
74
static $ _fontMap ;
75
75
@@ -126,7 +126,7 @@ function fontMap($name, $type = '.ttf')
126
126
* @return double The average of P1 and P2
127
127
* @static
128
128
*/
129
- function mid ($ p1 , $ p2 )
129
+ static function mid ($ p1 , $ p2 )
130
130
{
131
131
return ($ p1 + $ p2 ) / 2 ;
132
132
}
@@ -142,7 +142,7 @@ function mid($p1, $p2)
142
142
* @return double $p1 mirrored in $p2 by Factor
143
143
* @static
144
144
*/
145
- function mirror ($ p1 , $ p2 , $ factor = 1 )
145
+ static function mirror ($ p1 , $ p2 , $ factor = 1 )
146
146
{
147
147
return $ p2 + $ factor * ($ p2 - $ p1 );
148
148
}
@@ -159,7 +159,7 @@ function mirror($p1, $p2, $factor = 1)
159
159
* @return double P1 mirrored in P2 by Factor
160
160
* @static
161
161
*/
162
- function controlPoint ($ p1 , $ p2 , $ factor , $ smoothFactor = 0.75 )
162
+ static function controlPoint ($ p1 , $ p2 , $ factor , $ smoothFactor = 0.75 )
163
163
{
164
164
$ sa = Image_Canvas_Tool::mirror ($ p1 , $ p2 , $ smoothFactor );
165
165
$ sb = Image_Canvas_Tool::mid ($ p2 , $ sa );
@@ -185,7 +185,7 @@ function controlPoint($p1, $p2, $factor, $smoothFactor = 0.75)
185
185
* $p1 and $p4 to calculate control points
186
186
* @static
187
187
*/
188
- function bezier ($ t , $ p1 , $ p2 , $ p3 , $ p4 )
188
+ static function bezier ($ t , $ p1 , $ p2 , $ p3 , $ p4 )
189
189
{
190
190
// (1-t)^3*p1 + 3*(1-t)^2*t*p2 + 3*(1-t)*t^2*p3 + t^3*p4
191
191
return pow (1 - $ t , 3 ) * $ p1 +
@@ -205,7 +205,7 @@ function bezier($t, $p1, $p2, $p3, $p4)
205
205
* @return double The angle in degrees of the line
206
206
* @static
207
207
*/
208
- function getAngle ($ x0 , $ y0 , $ x1 , $ y1 )
208
+ static function getAngle ($ x0 , $ y0 , $ x1 , $ y1 )
209
209
{
210
210
211
211
$ dx = ($ x1 - $ x0 );
0 commit comments