OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #ifndef Color_h | 26 #ifndef Color_h |
27 #define Color_h | 27 #define Color_h |
28 | 28 |
29 #include "platform/animation/AnimationUtilities.h" | 29 #include "platform/animation/AnimationUtilities.h" |
30 #include "wtf/FastAllocBase.h" | 30 #include "wtf/FastAllocBase.h" |
31 #include "wtf/Forward.h" | 31 #include "wtf/Forward.h" |
32 #include "wtf/unicode/Unicode.h" | 32 #include "wtf/unicode/Unicode.h" |
33 | 33 |
34 namespace WebCore { | 34 namespace blink { |
35 | 35 |
36 class Color; | 36 class Color; |
37 | 37 |
38 typedef unsigned RGBA32; // RGBA quadruplet | 38 typedef unsigned RGBA32; // RGBA quadruplet |
39 | 39 |
40 PLATFORM_EXPORT RGBA32 makeRGB(int r, int g, int b); | 40 PLATFORM_EXPORT RGBA32 makeRGB(int r, int g, int b); |
41 PLATFORM_EXPORT RGBA32 makeRGBA(int r, int g, int b, int a); | 41 PLATFORM_EXPORT RGBA32 makeRGBA(int r, int g, int b, int a); |
42 | 42 |
43 PLATFORM_EXPORT RGBA32 colorWithOverrideAlpha(RGBA32 color, float overrideAlpha)
; | 43 PLATFORM_EXPORT RGBA32 colorWithOverrideAlpha(RGBA32 color, float overrideAlpha)
; |
44 PLATFORM_EXPORT RGBA32 makeRGBA32FromFloats(float r, float g, float b, float a); | 44 PLATFORM_EXPORT RGBA32 makeRGBA32FromFloats(float r, float g, float b, float a); |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 blend(premultFrom.alpha(), premultTo.alpha(), progr
ess)); | 164 blend(premultFrom.alpha(), premultTo.alpha(), progr
ess)); |
165 | 165 |
166 return Color(colorFromPremultipliedARGB(premultBlended.rgb())); | 166 return Color(colorFromPremultipliedARGB(premultBlended.rgb())); |
167 } | 167 } |
168 | 168 |
169 return Color(blend(from.red(), to.red(), progress), | 169 return Color(blend(from.red(), to.red(), progress), |
170 blend(from.green(), to.green(), progress), | 170 blend(from.green(), to.green(), progress), |
171 blend(from.blue(), to.blue(), progress), | 171 blend(from.blue(), to.blue(), progress), |
172 blend(from.alpha(), to.alpha(), progress)); | 172 blend(from.alpha(), to.alpha(), progress)); |
173 } | 173 } |
174 } // namespace WebCore | 174 } // namespace blink |
175 | 175 |
176 #endif // Color_h | 176 #endif // Color_h |
OLD | NEW |