diff options
author | Björn-Egil Dahlberg <[email protected]> | 2010-02-04 18:04:37 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2010-02-04 18:04:37 +0100 |
commit | e7842b4f46ef909cac25666be43a5a6b6ca7551b (patch) | |
tree | 51e5a6857d1386e851e0b3d5215dea1ad10cb8fb /lib/percept/src/egd_render.erl | |
parent | 76e9c68368dfd9ec20181939511e2baf93fc73d9 (diff) | |
download | otp-e7842b4f46ef909cac25666be43a5a6b6ca7551b.tar.gz otp-e7842b4f46ef909cac25666be43a5a6b6ca7551b.tar.bz2 otp-e7842b4f46ef909cac25666be43a5a6b6ca7551b.zip |
Fix egd_render transparent to use float constants
The render engine has float guards to enhance beam code
generation. However, the default case used integers which
caused the engine to crash.
This is now fixed.
Diffstat (limited to 'lib/percept/src/egd_render.erl')
-rw-r--r-- | lib/percept/src/egd_render.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/percept/src/egd_render.erl b/lib/percept/src/egd_render.erl index cea9d2d926..0d459f8b09 100644 --- a/lib/percept/src/egd_render.erl +++ b/lib/percept/src/egd_render.erl @@ -179,7 +179,7 @@ color(Trans,Layers,Type,OldC) -> color([],_) -> {0.0,0.0,0.0,0.0}; color([{_,C}|_],opaque) -> C; -color(Layers,alpha) -> color1({0,0,0,0},Layers). +color(Layers,alpha) -> color1({0.0,0.0,0.0,0.0},Layers). color1(Color,[]) -> Color; color1(Color,[{_,C}|Layers]) -> color1(alpha_blend(Color,C),Layers). |