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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 bool hullIntersects(const SkDConic& conic, bool* isLinear) const { | 65 bool hullIntersects(const SkDConic& conic, bool* isLinear) const { |
66 return fPts.hullIntersects(conic.fPts, isLinear); | 66 return fPts.hullIntersects(conic.fPts, isLinear); |
67 } | 67 } |
68 | 68 |
69 bool hullIntersects(const SkDCubic& cubic, bool* isLinear) const; | 69 bool hullIntersects(const SkDCubic& cubic, bool* isLinear) const; |
70 | 70 |
71 bool isLinear(int startIndex, int endIndex) const { | 71 bool isLinear(int startIndex, int endIndex) const { |
72 return fPts.isLinear(startIndex, endIndex); | 72 return fPts.isLinear(startIndex, endIndex); |
73 } | 73 } |
74 | 74 |
| 75 bool monotonicInX() const { |
| 76 return fPts.monotonicInX(); |
| 77 } |
| 78 |
75 bool monotonicInY() const { | 79 bool monotonicInY() const { |
76 return fPts.monotonicInY(); | 80 return fPts.monotonicInY(); |
77 } | 81 } |
78 | 82 |
79 void otherPts(int oddMan, const SkDPoint* endPt[2]) const { | 83 void otherPts(int oddMan, const SkDPoint* endPt[2]) const { |
80 fPts.otherPts(oddMan, endPt); | 84 fPts.otherPts(oddMan, endPt); |
81 } | 85 } |
82 | 86 |
83 SkDPoint ptAtT(double t) const; | 87 SkDPoint ptAtT(double t) const; |
84 | 88 |
(...skipping 17 matching lines...) Expand all Loading... |
102 SkScalar* weight) const; | 106 SkScalar* weight) const; |
103 | 107 |
104 static SkDPoint SubDivide(const SkPoint pts[kPointCount], SkScalar weight, | 108 static SkDPoint SubDivide(const SkPoint pts[kPointCount], SkScalar weight, |
105 const SkDPoint& a, const SkDPoint& c, | 109 const SkDPoint& a, const SkDPoint& c, |
106 double t1, double t2, SkScalar* newWeight) { | 110 double t1, double t2, SkScalar* newWeight) { |
107 SkDConic conic; | 111 SkDConic conic; |
108 conic.set(pts, weight); | 112 conic.set(pts, weight); |
109 return conic.subDivide(a, c, t1, t2, newWeight); | 113 return conic.subDivide(a, c, t1, t2, newWeight); |
110 } | 114 } |
111 | 115 |
112 SkDPoint top(double startT, double endT, double* topT) const; | |
113 | |
114 // 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 |
115 void dump() const; | 117 void dump() const; |
116 void dumpID(int id) const; | 118 void dumpID(int id) const; |
117 void dumpInner() const; | 119 void dumpInner() const; |
118 }; | 120 }; |
119 | 121 |
120 | 122 |
121 #endif | 123 #endif |
OLD | NEW |