summaryrefslogtreecommitdiffstats
path: root/src/structs
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-05-30 10:24:32 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-05-30 10:24:32 +0000
commite474041293c79a80ca818338a5dde07e6d1fc898 (patch)
tree7743c13ce58d7cecf9b7e3c153d2de1be7c8ff2e /src/structs
parenta2be390c78a5b98655b08fc5c3da6c688011922d (diff)
downloadzetacomponents-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.php18
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;
+ }
}
?>
OpenPOWER on IntegriCloud