| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifndef SkTwoPointRadialGradient_DEFINED | 9 #ifndef SkTwoPointRadialGradient_DEFINED |
| 10 #define SkTwoPointRadialGradient_DEFINED | 10 #define SkTwoPointRadialGradient_DEFINED |
| 11 | 11 |
| 12 #include "SkGradientShaderPriv.h" | 12 #include "SkGradientShaderPriv.h" |
| 13 | 13 |
| 14 class SkTwoPointRadialGradient : public SkGradientShaderBase { | 14 class SkTwoPointRadialGradient : public SkGradientShaderBase { |
| 15 public: | 15 public: |
| 16 SkTwoPointRadialGradient(const SkPoint& start, SkScalar startRadius, | 16 SkTwoPointRadialGradient(const SkPoint& start, SkScalar startRadius, |
| 17 const SkPoint& end, SkScalar endRadius, | 17 const SkPoint& end, SkScalar endRadius, |
| 18 const SkColor colors[], const SkScalar pos[], | 18 const Descriptor&); |
| 19 int colorCount, SkShader::TileMode mode, | |
| 20 SkUnitMapper* mapper); | |
| 21 | 19 |
| 22 virtual BitmapType asABitmap(SkBitmap* bitmap, | 20 virtual BitmapType asABitmap(SkBitmap* bitmap, |
| 23 SkMatrix* matrix, | 21 SkMatrix* matrix, |
| 24 TileMode* xy) const SK_OVERRIDE; | 22 TileMode* xy) const SK_OVERRIDE; |
| 25 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; | 23 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; |
| 26 virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint&) const S
K_OVERRIDE; | 24 virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint&) const S
K_OVERRIDE; |
| 27 | 25 |
| 28 virtual void shadeSpan(int x, int y, SkPMColor* dstCParam, | 26 virtual void shadeSpan(int x, int y, SkPMColor* dstCParam, |
| 29 int count) SK_OVERRIDE; | 27 int count) SK_OVERRIDE; |
| 30 virtual bool setContext(const SkBitmap& device, | 28 virtual bool setContext(const SkBitmap& device, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 48 const SkPoint fCenter2; | 46 const SkPoint fCenter2; |
| 49 const SkScalar fRadius1; | 47 const SkScalar fRadius1; |
| 50 const SkScalar fRadius2; | 48 const SkScalar fRadius2; |
| 51 SkPoint fDiff; | 49 SkPoint fDiff; |
| 52 SkScalar fStartRadius, fDiffRadius, fSr2D2, fA, fOneOverTwoA; | 50 SkScalar fStartRadius, fDiffRadius, fSr2D2, fA, fOneOverTwoA; |
| 53 | 51 |
| 54 void init(); | 52 void init(); |
| 55 }; | 53 }; |
| 56 | 54 |
| 57 #endif | 55 #endif |
| OLD | NEW |