OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkPathOpsConic_DEFINED | 8 #ifndef SkPathOpsConic_DEFINED |
9 #define SkPathOpsConic_DEFINED | 9 #define SkPathOpsConic_DEFINED |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 void debugInit() { | 30 void debugInit() { |
31 fPts.debugInit(); | 31 fPts.debugInit(); |
32 } | 32 } |
33 | 33 |
34 SkDConic flip() const { | 34 SkDConic flip() const { |
35 SkDConic result = {{{fPts[2], fPts[1], fPts[0]}}, fWeight}; | 35 SkDConic result = {{{fPts[2], fPts[1], fPts[0]}}, fWeight}; |
36 return result; | 36 return result; |
37 } | 37 } |
38 | 38 |
39 static bool IsCubic() { return false; } | 39 static bool IsConic() { return true; } |
40 | 40 |
41 const SkDConic& set(const SkPoint pts[kPointCount], SkScalar weight) { | 41 const SkDConic& set(const SkPoint pts[kPointCount], SkScalar weight) { |
42 fPts.set(pts); | 42 fPts.set(pts); |
43 fWeight = weight; | 43 fWeight = weight; |
44 return *this; | 44 return *this; |
45 } | 45 } |
46 | 46 |
47 const SkDPoint& operator[](int n) const { return fPts[n]; } | 47 const SkDPoint& operator[](int n) const { return fPts[n]; } |
48 SkDPoint& operator[](int n) { return fPts[n]; } | 48 SkDPoint& operator[](int n) { return fPts[n]; } |
49 | 49 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 } | 114 } |
115 | 115 |
116 // utilities callable by the user from the debugger when the implementation
code is linked in | 116 // utilities callable by the user from the debugger when the implementation
code is linked in |
117 void dump() const; | 117 void dump() const; |
118 void dumpID(int id) const; | 118 void dumpID(int id) const; |
119 void dumpInner() const; | 119 void dumpInner() const; |
120 }; | 120 }; |
121 | 121 |
122 | 122 |
123 #endif | 123 #endif |
OLD | NEW |