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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE
RRIDE; | 58 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE
RRIDE; |
59 | 59 |
60 private: | 60 private: |
61 typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; | 61 typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; |
62 }; | 62 }; |
63 | 63 |
64 virtual BitmapType asABitmap(SkBitmap* bitmap, | 64 virtual BitmapType asABitmap(SkBitmap* bitmap, |
65 SkMatrix* matrix, | 65 SkMatrix* matrix, |
66 TileMode* xy) const; | 66 TileMode* xy) const; |
67 virtual SkShader::GradientType asAGradient(GradientInfo* info) const SK_OVE
RRIDE; | 67 virtual SkShader::GradientType asAGradient(GradientInfo* info) const SK_OVE
RRIDE; |
68 virtual bool asNewEffect(GrContext*, const SkPaint&, const SkMatrix*, GrColo
r* grColor, | 68 virtual bool asNewEffect(GrContext*, const SkPaint&, const SkMatrix*, GrColo
r* paintColor, |
69 GrEffect**) const SK_OVERRIDE; | 69 GrEffect**) const SK_OVERRIDE; |
70 virtual bool isOpaque() const SK_OVERRIDE; | 70 virtual bool isOpaque() const SK_OVERRIDE; |
71 | 71 |
72 SkScalar getCenterX1() const { return SkPoint::Distance(fCenter1, fCenter2);
} | 72 SkScalar getCenterX1() const { return SkPoint::Distance(fCenter1, fCenter2);
} |
73 SkScalar getStartRadius() const { return fRadius1; } | 73 SkScalar getStartRadius() const { return fRadius1; } |
74 SkScalar getDiffRadius() const { return fRadius2 - fRadius1; } | 74 SkScalar getDiffRadius() const { return fRadius2 - fRadius1; } |
75 const SkPoint& getStartCenter() const { return fCenter1; } | 75 const SkPoint& getStartCenter() const { return fCenter1; } |
76 const SkPoint& getEndCenter() const { return fCenter2; } | 76 const SkPoint& getEndCenter() const { return fCenter2; } |
77 SkScalar getEndRadius() const { return fRadius2; } | 77 SkScalar getEndRadius() const { return fRadius2; } |
78 bool isFlippedGrad() const { return fFlippedGrad; } | 78 bool isFlippedGrad() const { return fFlippedGrad; } |
(...skipping 10 matching lines...) Expand all Loading... |
89 SkPoint fCenter1; | 89 SkPoint fCenter1; |
90 SkPoint fCenter2; | 90 SkPoint fCenter2; |
91 SkScalar fRadius1; | 91 SkScalar fRadius1; |
92 SkScalar fRadius2; | 92 SkScalar fRadius2; |
93 bool fFlippedGrad; | 93 bool fFlippedGrad; |
94 | 94 |
95 typedef SkGradientShaderBase INHERITED; | 95 typedef SkGradientShaderBase INHERITED; |
96 }; | 96 }; |
97 | 97 |
98 #endif | 98 #endif |
OLD | NEW |