From 3cb117beb5bd17c6f8082717eb40467f3ddf79c8 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Tue, 9 May 2006 10:13:54 +0000 Subject: - Added documentation to color class - Fixed typo --- src/structs/color.php | 42 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) (limited to 'src/structs') diff --git a/src/structs/color.php b/src/structs/color.php index 6fa5993..c9b1617 100644 --- a/src/structs/color.php +++ b/src/structs/color.php @@ -1,13 +1,49 @@ $key = hexdec( $hexValue ) % 255; + $color->$key = hexdec( $hexValue ) % 256; } } @@ -86,7 +122,7 @@ class ezcGraphColor if ( isset( $keys[$nr] ) ) { $key = $keys[$nr++]; - $color->$key = ( (int) $colorValue ) % 255; + $color->$key = ( (int) $colorValue ) % 256; } } @@ -117,7 +153,7 @@ class ezcGraphColor if ( isset( $keys[$nr] ) ) { $key = $keys[$nr++]; - $color->$key = ( (float) $colorValue * 255 ) % 255; + $color->$key = ( (float) $colorValue * 255 ) % 256; } } -- cgit v1.1