cvs: pear /Image_Color Color.php

From: Date: Sat, 18 May 2002 10:49:54 +0000
Subject: cvs: pear /Image_Color Color.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3919@lists.php.net to get a copy of this message
dallen Sat May 18 06:49:54 2002 EDT Modified files: /pear/Image_Color Color.php Log: - fixed references from Color:: to Image_Color:: when refering to methods in the class - getRange() was returning the first color but not the last...the documentation says that this function returns the colors "between" the two colors, so now the first color is not returned in the array (not sure if this is what we want, but maybe now someone will look into it) Index: pear/Image_Color/Color.php diff -u pear/Image_Color/Color.php:1.2 pear/Image_Color/Color.php:1.3 --- pear/Image_Color/Color.php:1.2 Mon Apr 8 10:05:15 2002 +++ pear/Image_Color/Color.php Sat May 18 06:49:53 2002 @@ -16,7 +16,7 @@ // | Ulf Wendel <ulf.wendel@phpdoc.de> | // +----------------------------------------------------------------------+ // -// $Id: Color.php,v 1.2 2002/04/08 14:05:15 jasonlotito Exp $ +// $Id: Color.php,v 1.3 2002/05/18 10:49:53 dallen Exp $ /** * Color @@ -329,7 +329,7 @@ */ // Loop through all the degrees between the colors - for ( $x = 0; $x < $degrees; $x++ ) + for ( $x = 1; $x < $degrees; $x++ ) { $col[0] = $red_steps * $x; $col[1] = $green_steps * $x; @@ -430,7 +430,7 @@ */ function getTextColor ( $color, $light='FFFFFF', $dark='000000' ) { - $color = Color::_splitColor($color); + $color = Image_Color::_splitColor($color); if ( $color[1] > hexdec('66') ) { return $dark; @@ -450,8 +450,8 @@ */ function _setColors ( $col1, $col2 ) { - $this->color1 = Color::_splitColor($col1); - $this->color2 = Color::_splitColor($col2); + $this->color1 = Image_Color::_splitColor($col1); + $this->color2 = Image_Color::_splitColor($col2); } /** @@ -496,7 +496,7 @@ */ function rgb2hex ( $color ) { - return Color::_returnColor( $color ); + return Image_Color::_returnColor( $color ); } /** @@ -512,7 +512,7 @@ */ function hex2rgb ( $hex ) { - $return = Color::_splitColor( $hex ); + $return = Image_Color::_splitColor( $hex ); $return['hex'] = $hex; return $return; } @@ -530,7 +530,7 @@ */ function hsv2rgb ( $h, $s, $v ) { - return Color::hex2rgb(Color::hsv2hex($h, $s, $v)); + return Image_Color::hex2rgb(Image_Color::hsv2hex($h, $s, $v)); } /**

« previous php.pear.cvs (#3919) next »