@@ -273,7 +273,7 @@ function changeLightness($degree = 10)
273273 * @static
274274 * @author Jason Lotito <[email protected] > 275275 */
276- function getTextColor ($ color , $ light = '#FFFFFF ' , $ dark = '#000000 ' )
276+ static function getTextColor ($ color , $ light = '#FFFFFF ' , $ dark = '#000000 ' )
277277 {
278278 $ color = Image_Color::_splitColor ($ color );
279279 if ($ color [1 ] > hexdec ('66 ' )) {
@@ -312,7 +312,7 @@ function _setColors($col1, $col2)
312312 * @static
313313 * @author Jason Lotito <[email protected] > 314314 */
315- function _splitColor ($ color )
315+ static function _splitColor ($ color )
316316 {
317317 $ color = str_replace ('# ' , '' , $ color );
318318 $ c [] = hexdec (substr ($ color , 0 , 2 ));
@@ -327,7 +327,7 @@ function _splitColor($color)
327327 * @deprecated Function deprecated after 1.0.1
328328 * @see rgb2hex().
329329 */
330- function _returnColor ( $ color )
330+ static function _returnColor ( $ color )
331331 {
332332 return Image_Color::rgb2hex ($ color );
333333 }
@@ -342,7 +342,7 @@ function _returnColor ( $color )
342342 * @author Jason Lotito <[email protected] > 343343 * @see hex2rgb()
344344 */
345- function rgb2hex ($ color )
345+ static function rgb2hex ($ color )
346346 {
347347 return sprintf ('%02X%02X%02X ' ,$ color [0 ],$ color [1 ],$ color [2 ]);
348348 }
@@ -359,7 +359,7 @@ function rgb2hex($color)
359359 * @author Jason Lotito <[email protected] > 360360 * @see rgb2hex()
361361 */
362- function hex2rgb ($ hex )
362+ static function hex2rgb ($ hex )
363363 {
364364 $ return = Image_Color::_splitColor ($ hex );
365365 $ return ['hex ' ] = $ hex ;
@@ -379,7 +379,7 @@ function hex2rgb($hex)
379379 * @uses hsv2hex() to convert the HSV value to Hex.
380380 * @uses hex2rgb() to convert the Hex value to RGB.
381381 */
382- function hsv2rgb ($ h , $ s , $ v )
382+ static function hsv2rgb ($ h , $ s , $ v )
383383 {
384384 return Image_Color::hex2rgb (Image_Color::hsv2hex ($ h , $ s , $ v ));
385385 }
@@ -399,7 +399,7 @@ function hsv2rgb($h, $s, $v)
399399 * @author Jurgen Schwietering <[email protected] > 400400 * @uses rgb2hex() to convert the return value to a hex string.
401401 */
402- function hsv2hex ($ h , $ s , $ v )
402+ static function hsv2hex ($ h , $ s , $ v )
403403 {
404404 $ s /= 256.0 ;
405405 $ v /= 256.0 ;
@@ -470,7 +470,7 @@ function hsv2hex($h, $s, $v)
470470 * @uses ImageColorAllocate() to allocate the color.
471471 * @uses color2RGB() to parse the color into RGB values.
472472 */
473- function allocateColor (&$ img , $ color ) {
473+ static function allocateColor (&$ img , $ color ) {
474474 $ color = Image_Color::color2RGB ($ color );
475475
476476 return ImageColorAllocate ($ img , $ color [0 ], $ color [1 ], $ color [2 ]);
@@ -490,11 +490,11 @@ function allocateColor(&$img, $color) {
490490 * @uses hex2rgb() to convert colors begining with the # character.
491491 * @uses namedColor2RGB() to convert everything not starting with a #.
492492 */
493- function color2RGB ($ color )
493+ static function color2RGB ($ color )
494494 {
495495 $ c = array ();
496496
497- if ($ color{ 0 } == '# ' ) {
497+ if ($ color[ 0 ] == '# ' ) {
498498 $ c = Image_Color::hex2rgb ($ color );
499499 } else {
500500 $ c = Image_Color::namedColor2RGB ($ color );
@@ -514,7 +514,7 @@ function color2RGB($color)
514514 * @static
515515 * @author Sebastian Bergmann <[email protected] > 516516 */
517- function namedColor2RGB ($ color )
517+ static function namedColor2RGB ($ color )
518518 {
519519 static $ colornames ;
520520
@@ -680,7 +680,7 @@ function namedColor2RGB($color)
680680 * @access public
681681 * @static
682682 */
683- function percentageColor2RGB ($ color )
683+ static function percentageColor2RGB ($ color )
684684 {
685685 // remove spaces
686686 $ color = str_replace (' ' , '' , $ color );
0 commit comments