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 21 matching lines...) Expand all Loading... |
32 bool flipped); | 32 bool flipped); |
33 | 33 |
34 static bool DontDrawT(SkFixed t) { | 34 static bool DontDrawT(SkFixed t) { |
35 return kDontDrawT == (uint32_t)t; | 35 return kDontDrawT == (uint32_t)t; |
36 } | 36 } |
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(); | |
43 | |
44 public: | 42 public: |
45 SkTwoPointConicalGradient(const SkPoint& start, SkScalar startRadius, | 43 SkTwoPointConicalGradient(const SkPoint& start, SkScalar startRadius, |
46 const SkPoint& end, SkScalar endRadius, | 44 const SkPoint& end, SkScalar endRadius, |
47 bool flippedGrad, const Descriptor&); | 45 bool flippedGrad, const Descriptor&); |
48 | 46 |
49 | 47 |
50 virtual size_t contextSize() const SK_OVERRIDE; | 48 virtual size_t contextSize() const SK_OVERRIDE; |
51 | 49 |
52 class TwoPointConicalGradientContext : public SkGradientShaderBase::Gradient
ShaderBaseContext { | 50 class TwoPointConicalGradientContext : public SkGradientShaderBase::Gradient
ShaderBaseContext { |
53 public: | 51 public: |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 SkPoint fCenter2; | 87 SkPoint fCenter2; |
90 SkScalar fRadius1; | 88 SkScalar fRadius1; |
91 SkScalar fRadius2; | 89 SkScalar fRadius2; |
92 bool fFlippedGrad; | 90 bool fFlippedGrad; |
93 | 91 |
94 friend class SkGradientShader; | 92 friend class SkGradientShader; |
95 typedef SkGradientShaderBase INHERITED; | 93 typedef SkGradientShaderBase INHERITED; |
96 }; | 94 }; |
97 | 95 |
98 #endif | 96 #endif |
OLD | NEW |