OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 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 SkPixelXorXfermode_DEFINED | 8 #ifndef SkPixelXorXfermode_DEFINED |
9 #define SkPixelXorXfermode_DEFINED | 9 #define SkPixelXorXfermode_DEFINED |
10 | 10 |
11 #include "SkXfermode.h" | 11 #include "SkXfermode.h" |
12 | 12 |
| 13 #if SK_INCLUDE_DEPRECATED_XFERMODES |
| 14 |
13 /** SkPixelXorXfermode implements a simple pixel xor (op ^ src ^ dst). | 15 /** SkPixelXorXfermode implements a simple pixel xor (op ^ src ^ dst). |
14 This transformation does not follow premultiplied conventions, therefore | 16 This transformation does not follow premultiplied conventions, therefore |
15 this proc *always* returns an opaque color (alpha == 255). Thus it is | 17 this proc *always* returns an opaque color (alpha == 255). Thus it is |
16 not really usefull for operating on blended colors. | 18 not really usefull for operating on blended colors. |
17 */ | 19 */ |
18 class SK_API SkPixelXorXfermode : public SkXfermode { | 20 class SK_API SkPixelXorXfermode : public SkXfermode { |
19 public: | 21 public: |
20 static SkXfermode* Create(SkColor opColor) { | 22 static SkXfermode* Create(SkColor opColor) { |
21 return new SkPixelXorXfermode(opColor); | 23 return new SkPixelXorXfermode(opColor); |
22 } | 24 } |
(...skipping 16 matching lines...) Expand all Loading... |
39 explicit SkPixelXorXfermode(SkColor opColor) : fOpColor(opColor) {} | 41 explicit SkPixelXorXfermode(SkColor opColor) : fOpColor(opColor) {} |
40 | 42 |
41 SkColor fOpColor; | 43 SkColor fOpColor; |
42 | 44 |
43 SkValue asValue() const override; | 45 SkValue asValue() const override; |
44 | 46 |
45 typedef SkXfermode INHERITED; | 47 typedef SkXfermode INHERITED; |
46 }; | 48 }; |
47 | 49 |
48 #endif | 50 #endif |
| 51 |
| 52 #endif |
OLD | NEW |