diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-08-02 14:07:19 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-08-02 14:07:19 +0000 |
commit | 97902f4d7de3482cf110950544cc4a186dd84b11 (patch) | |
tree | f2e064cc92d0f5c3645aa312b6737f556f71dfe7 /src/structs | |
parent | 21a3467e539669f6b8935db0668891a7507b3675 (diff) | |
download | zetacomponents-graph-97902f4d7de3482cf110950544cc4a186dd84b11.zip zetacomponents-graph-97902f4d7de3482cf110950544cc4a186dd84b11.tar.gz |
- Added basic 3d renderer
# Several unresolved rendering issues
- Fixed filled line charts in 2d renderer
Diffstat (limited to 'src/structs')
-rw-r--r-- | src/structs/color.php | 20 |
1 files changed, 18 insertions, 2 deletions
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 ) { |