diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-05-30 10:24:32 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-05-30 10:24:32 +0000 |
commit | e474041293c79a80ca818338a5dde07e6d1fc898 (patch) | |
tree | 7743c13ce58d7cecf9b7e3c153d2de1be7c8ff2e /src/structs | |
parent | a2be390c78a5b98655b08fc5c3da6c688011922d (diff) | |
download | zetacomponents-graph-e474041293c79a80ca818338a5dde07e6d1fc898.zip zetacomponents-graph-e474041293c79a80ca818338a5dde07e6d1fc898.tar.gz |
- Implemented circular arcs for gd driver
Diffstat (limited to 'src/structs')
-rw-r--r-- | src/structs/color.php | 18 |
1 files changed, 18 insertions, 0 deletions
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; + } } ?> |