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 SkTwoPointConicalGradient_DEFINED | 9 #ifndef SkTwoPointConicalGradient_DEFINED |
10 #define SkTwoPointConicalGradient_DEFINED | 10 #define SkTwoPointConicalGradient_DEFINED |
(...skipping 26 matching lines...) Expand all Loading... |
37 }; | 37 }; |
38 | 38 |
39 | 39 |
40 class SkTwoPointConicalGradient : public SkGradientShaderBase { | 40 class SkTwoPointConicalGradient : public SkGradientShaderBase { |
41 TwoPtRadial fRec; | 41 TwoPtRadial fRec; |
42 void init(); | 42 void init(); |
43 | 43 |
44 public: | 44 public: |
45 SkTwoPointConicalGradient(const SkPoint& start, SkScalar startRadius, | 45 SkTwoPointConicalGradient(const SkPoint& start, SkScalar startRadius, |
46 const SkPoint& end, SkScalar endRadius, | 46 const SkPoint& end, SkScalar endRadius, |
47 bool flippedGrad, const Descriptor&); | 47 bool flippedGrad, const Descriptor&, |
| 48 const SkMatrix* localMatrix); |
48 | 49 |
49 | 50 |
50 virtual SkShader::Context* createContext(const SkBitmap&, const SkPaint&, co
nst SkMatrix&, | 51 virtual SkShader::Context* createContext(const SkBitmap&, const SkPaint&, co
nst SkMatrix&, |
51 void* storage) const SK_OVERRIDE; | 52 void* storage) const SK_OVERRIDE; |
52 virtual size_t contextSize() const SK_OVERRIDE; | 53 virtual size_t contextSize() const SK_OVERRIDE; |
53 | 54 |
54 class TwoPointConicalGradientContext : public SkGradientShaderBase::Gradient
ShaderBaseContext { | 55 class TwoPointConicalGradientContext : public SkGradientShaderBase::Gradient
ShaderBaseContext { |
55 public: | 56 public: |
56 TwoPointConicalGradientContext(const SkTwoPointConicalGradient& shader, | 57 TwoPointConicalGradientContext(const SkTwoPointConicalGradient& shader, |
57 const SkBitmap& device, | 58 const SkBitmap& device, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 SkPoint fCenter1; | 92 SkPoint fCenter1; |
92 SkPoint fCenter2; | 93 SkPoint fCenter2; |
93 SkScalar fRadius1; | 94 SkScalar fRadius1; |
94 SkScalar fRadius2; | 95 SkScalar fRadius2; |
95 bool fFlippedGrad; | 96 bool fFlippedGrad; |
96 | 97 |
97 typedef SkGradientShaderBase INHERITED; | 98 typedef SkGradientShaderBase INHERITED; |
98 }; | 99 }; |
99 | 100 |
100 #endif | 101 #endif |
OLD | NEW |