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