| 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 SkGradientShader_DEFINED | 8 #ifndef SkGradientShader_DEFINED |
| 9 #define SkGradientShader_DEFINED | 9 #define SkGradientShader_DEFINED |
| 10 | 10 |
| 11 #include "SkShader.h" | 11 #include "SkShader.h" |
| 12 | 12 |
| 13 #define SK_SUPPORT_LEGACY_GRADIENT_FACTORIES | |
| 14 | |
| 15 /** \class SkGradientShader | 13 /** \class SkGradientShader |
| 16 | 14 |
| 17 SkGradientShader hosts factories for creating subclasses of SkShader that | 15 SkGradientShader hosts factories for creating subclasses of SkShader that |
| 18 render linear and radial gradients. | 16 render linear and radial gradients. |
| 19 */ | 17 */ |
| 20 class SK_API SkGradientShader { | 18 class SK_API SkGradientShader { |
| 21 public: | 19 public: |
| 22 enum Flags { | 20 enum Flags { |
| 23 /** By default gradients will interpolate their colors in unpremul space | 21 /** By default gradients will interpolate their colors in unpremul space |
| 24 * and then premultiply each of the results. By setting this flag, the | 22 * and then premultiply each of the results. By setting this flag, the |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 void* /*ignored*/, | 203 void* /*ignored*/, |
| 206 uint32_t flags, const SkMatrix* localMatrix) { | 204 uint32_t flags, const SkMatrix* localMatrix) { |
| 207 return CreateSweep(cx, cy, colors, pos, count, flags, localMatrix); | 205 return CreateSweep(cx, cy, colors, pos, count, flags, localMatrix); |
| 208 } | 206 } |
| 209 #endif | 207 #endif |
| 210 | 208 |
| 211 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() | 209 SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP() |
| 212 }; | 210 }; |
| 213 | 211 |
| 214 #endif | 212 #endif |
| OLD | NEW |