@@ 2120-2127 (lines=8) @@ | ||
2117 | ||
2118 | // increases opacity by amount |
|
2119 | protected static $lib_opacify = array("color", "amount"); |
|
2120 | protected function lib_opacify($args) { |
|
2121 | $color = $this->assertColor($args[0]); |
|
2122 | $amount = $this->coercePercent($args[1]); |
|
2123 | ||
2124 | $color[4] = (isset($color[4]) ? $color[4] : 1) + $amount; |
|
2125 | $color[4] = min(1, max(0, $color[4])); |
|
2126 | return $color; |
|
2127 | } |
|
2128 | ||
2129 | protected static $lib_fade_in = array("color", "amount"); |
|
2130 | protected function lib_fade_in($args) { |
|
@@ 2136-2143 (lines=8) @@ | ||
2133 | ||
2134 | // decreases opacity by amount |
|
2135 | protected static $lib_transparentize = array("color", "amount"); |
|
2136 | protected function lib_transparentize($args) { |
|
2137 | $color = $this->assertColor($args[0]); |
|
2138 | $amount = $this->coercePercent($args[1]); |
|
2139 | ||
2140 | $color[4] = (isset($color[4]) ? $color[4] : 1) - $amount; |
|
2141 | $color[4] = min(1, max(0, $color[4])); |
|
2142 | return $color; |
|
2143 | } |
|
2144 | ||
2145 | protected static $lib_fade_out = array("color", "amount"); |
|
2146 | protected function lib_fade_out($args) { |