aboutsummaryrefslogtreecommitdiffstats
path: root/lib/percept/src/egd_render.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2010-02-10 09:16:21 +0000
committerErlang/OTP <[email protected]>2010-02-10 09:16:21 +0000
commit29262ef2477ac656bf19073f90a742c23a7bb789 (patch)
treebb79b9a4ea5bc4d9a95708569a67c8a938a2e8f3 /lib/percept/src/egd_render.erl
parent3241e0ad7b6c85372b1c7577a760c8695e648e85 (diff)
parente7842b4f46ef909cac25666be43a5a6b6ca7551b (diff)
downloadotp-29262ef2477ac656bf19073f90a742c23a7bb789.tar.gz
otp-29262ef2477ac656bf19073f90a742c23a7bb789.tar.bz2
otp-29262ef2477ac656bf19073f90a742c23a7bb789.zip
Merge branch 'egil/egd_render' into ccase/r13b04_dev
* egil/egd_render: Fix egd_render transparent to use float constants OTP-8425 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.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/percept/src/egd_render.erl b/lib/percept/src/egd_render.erl
index cea9d2d926..4a0247dd33 100644
--- a/lib/percept/src/egd_render.erl
+++ b/lib/percept/src/egd_render.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
@@ -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).