From e474041293c79a80ca818338a5dde07e6d1fc898 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Tue, 30 May 2006 10:24:32 +0000 Subject: - Implemented circular arcs for gd driver --- src/structs/color.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/structs') diff --git a/src/structs/color.php b/src/structs/color.php index c9b1617..c95ce6c 100644 --- a/src/structs/color.php +++ b/src/structs/color.php @@ -197,6 +197,24 @@ class ezcGraphColor throw new ezcGraphUnknownColorDefinitionException( $color ); } } + + /** + * Darkens the color + * + * @param float $value Percent to darken the color + * @return void + */ + public function darken( $value ) + { + $color = clone $this; + + $value = 1 - $value; + $color->red *= $value; + $color->green *= $value; + $color->blue *= $value; + + return $color; + } } ?> -- cgit v1.1