From 97902f4d7de3482cf110950544cc4a186dd84b11 Mon Sep 17 00:00:00 2001 From: Kore Nordmann Date: Wed, 2 Aug 2006 14:07:19 +0000 Subject: - Added basic 3d renderer # Several unresolved rendering issues - Fixed filled line charts in 2d renderer --- src/structs/color.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/structs') diff --git a/src/structs/color.php b/src/structs/color.php index a65dc31..99d9fde 100644 --- a/src/structs/color.php +++ b/src/structs/color.php @@ -203,10 +203,26 @@ class ezcGraphColor } /** - * Darkens the color + * Returns a copy of the current color made more transparent by the given + * factor + * + * @param mixed $value Percent to make color mor transparent + * @return ezcGraphColor New color + */ + public function transparent( $value ) + { + $color = clone $this; + + $color->alpha = 255 - (int) round( ( 255 - $this->alpha ) * ( 1 - $value ) ); + + return $color; + } + + /** + * Returns a copy of the current color darkened by the given factor * * @param float $value Percent to darken the color - * @return void + * @return ezcGraphColor New color */ public function darken( $value ) { -- cgit v1.1