OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkPorterDuff_DEFINED | 8 #ifndef SkPorterDuff_DEFINED |
9 #define SkPorterDuff_DEFINED | 9 #define SkPorterDuff_DEFINED |
10 | 10 |
11 #include "SkColor.h" | 11 #include "SkColor.h" |
12 #include "SkXfermode.h" | 12 #include "SkXfermode.h" |
13 | 13 |
14 //#define SK_SUPPORT_LEGACY_PORTER_DUFF | |
15 | |
reed1
2014/12/03 13:41:11
// Temporary guard until we can remove the depende
tfarina
2014/12/03 21:02:29
Done.
| |
16 #ifdef SK_SUPPORT_LEGACY_PORTER_DUFF | |
17 | |
14 class SkXfermode; | 18 class SkXfermode; |
15 | 19 |
16 class SK_API SkPorterDuff { | 20 class SK_API SkPorterDuff { |
17 public: | 21 public: |
18 /** List of predefined xfermodes. In general, the algebra for the modes | 22 /** List of predefined xfermodes. In general, the algebra for the modes |
19 uses the following symbols: | 23 uses the following symbols: |
20 Sa, Sc - source alpha and color | 24 Sa, Sc - source alpha and color |
21 Da, Dc - destination alpha and color (before compositing) | 25 Da, Dc - destination alpha and color (before compositing) |
22 [a, c] - Resulting (alpha, color) values | 26 [a, c] - Resulting (alpha, color) values |
23 For these equations, the colors are in premultiplied state. | 27 For these equations, the colors are in premultiplied state. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 return false and ignore the mode parameter. | 74 return false and ignore the mode parameter. |
71 */ | 75 */ |
72 static bool IsMode(SkXfermode*, Mode* mode); | 76 static bool IsMode(SkXfermode*, Mode* mode); |
73 | 77 |
74 /** Return the corersponding SkXfermode::Mode | 78 /** Return the corersponding SkXfermode::Mode |
75 */ | 79 */ |
76 static SkXfermode::Mode ToXfermodeMode(Mode); | 80 static SkXfermode::Mode ToXfermodeMode(Mode); |
77 } SK_ATTR_DEPRECATED("use SkXfermode::Mode"); | 81 } SK_ATTR_DEPRECATED("use SkXfermode::Mode"); |
78 | 82 |
79 #endif | 83 #endif |
84 | |
85 #endif | |
OLD | NEW |