Index: src/effects/gradients/SkTwoPointConicalGradient.h |
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.h b/src/effects/gradients/SkTwoPointConicalGradient.h |
index 041f8b8be44cd74e9c75c3da046e44a419689e7a..5548b179883af9107557ffcb4ab1d5a0383686fa 100644 |
--- a/src/effects/gradients/SkTwoPointConicalGradient.h |
+++ b/src/effects/gradients/SkTwoPointConicalGradient.h |
@@ -23,9 +23,11 @@ struct TwoPtRadial { |
float fA; |
float fRadius2; |
float fRDR; |
+ bool fFlipped; |
void init(const SkPoint& center0, SkScalar rad0, |
- const SkPoint& center1, SkScalar rad1); |
+ const SkPoint& center1, SkScalar rad1, |
+ bool flipped); |
// used by setup and nextT |
float fRelX, fRelY, fIncX, fIncY; |
@@ -47,7 +49,7 @@ class SkTwoPointConicalGradient : public SkGradientShaderBase { |
public: |
SkTwoPointConicalGradient(const SkPoint& start, SkScalar startRadius, |
const SkPoint& end, SkScalar endRadius, |
- const Descriptor&); |
+ bool flippedGrad, const Descriptor&); |
virtual void shadeSpan(int x, int y, SkPMColor* dstCParam, |
int count) SK_OVERRIDE; |
@@ -68,6 +70,7 @@ public: |
const SkPoint& getStartCenter() const { return fCenter1; } |
const SkPoint& getEndCenter() const { return fCenter2; } |
SkScalar getEndRadius() const { return fRadius2; } |
+ bool isFlippedGrad() const { return fFlippedGrad; } |
SK_TO_STRING_OVERRIDE() |
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTwoPointConicalGradient) |
@@ -77,11 +80,13 @@ protected: |
virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; |
private: |
+ SkPoint fCenter1; |
+ SkPoint fCenter2; |
+ SkScalar fRadius1; |
+ SkScalar fRadius2; |
+ bool fFlippedGrad; |
+ |
typedef SkGradientShaderBase INHERITED; |
- const SkPoint fCenter1; |
- const SkPoint fCenter2; |
- const SkScalar fRadius1; |
- const SkScalar fRadius2; |
}; |
#endif |