Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: src/effects/gradients/SkTwoPointConicalGradient.h

Issue 197763008: Allow toString capability to be toggled independent of developer mode (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: remove gyp changes Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 SkMatrix* matrix, 59 SkMatrix* matrix,
60 TileMode* xy) const; 60 TileMode* xy) const;
61 virtual SkShader::GradientType asAGradient(GradientInfo* info) const SK_OVE RRIDE; 61 virtual SkShader::GradientType asAGradient(GradientInfo* info) const SK_OVE RRIDE;
62 virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint& paint) c onst SK_OVERRIDE; 62 virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint& paint) c onst SK_OVERRIDE;
63 virtual bool isOpaque() const SK_OVERRIDE; 63 virtual bool isOpaque() const SK_OVERRIDE;
64 64
65 SkScalar getCenterX1() const { return SkPoint::Distance(fCenter1, fCenter2); } 65 SkScalar getCenterX1() const { return SkPoint::Distance(fCenter1, fCenter2); }
66 SkScalar getStartRadius() const { return fRadius1; } 66 SkScalar getStartRadius() const { return fRadius1; }
67 SkScalar getDiffRadius() const { return fRadius2 - fRadius1; } 67 SkScalar getDiffRadius() const { return fRadius2 - fRadius1; }
68 68
69 SK_DEVELOPER_TO_STRING() 69 SK_TO_STRING_OVERRIDE()
70 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTwoPointConicalGradien t) 70 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTwoPointConicalGradien t)
71 71
72 protected: 72 protected:
73 SkTwoPointConicalGradient(SkReadBuffer& buffer); 73 SkTwoPointConicalGradient(SkReadBuffer& buffer);
74 virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE; 74 virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE;
75 75
76 private: 76 private:
77 typedef SkGradientShaderBase INHERITED; 77 typedef SkGradientShaderBase INHERITED;
78 const SkPoint fCenter1; 78 const SkPoint fCenter1;
79 const SkPoint fCenter2; 79 const SkPoint fCenter2;
80 const SkScalar fRadius1; 80 const SkScalar fRadius1;
81 const SkScalar fRadius2; 81 const SkScalar fRadius2;
82 }; 82 };
83 83
84 #endif 84 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkSweepGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698