OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #ifndef SkIntersections_DEFINE | 7 #ifndef SkIntersections_DEFINE |
8 #define SkIntersections_DEFINE | 8 #define SkIntersections_DEFINE |
9 | 9 |
10 #include "SkPathOpsCubic.h" | 10 #include "SkPathOpsCubic.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 quad.set(a); | 157 quad.set(a); |
158 fMax = 2; | 158 fMax = 2; |
159 return vertical(quad, top, bottom, x, flipped); | 159 return vertical(quad, top, bottom, x, flipped); |
160 } | 160 } |
161 | 161 |
162 int quadLine(const SkPoint a[3], const SkPoint b[2]) { | 162 int quadLine(const SkPoint a[3], const SkPoint b[2]) { |
163 SkDQuad quad; | 163 SkDQuad quad; |
164 quad.set(a); | 164 quad.set(a); |
165 SkDLine line; | 165 SkDLine line; |
166 line.set(b); | 166 line.set(b); |
167 fMax = 2; | 167 fMax = 3; // 2; permit small coincident segment + non-coincident inters
ection |
168 return intersect(quad, line); | 168 return intersect(quad, line); |
169 } | 169 } |
170 | 170 |
171 int quadQuad(const SkPoint a[3], const SkPoint b[3]) { | 171 int quadQuad(const SkPoint a[3], const SkPoint b[3]) { |
172 SkDQuad aQuad; | 172 SkDQuad aQuad; |
173 aQuad.set(a); | 173 aQuad.set(a); |
174 SkDQuad bQuad; | 174 SkDQuad bQuad; |
175 bQuad.set(b); | 175 bQuad.set(b); |
176 fMax = 4; | 176 fMax = 4; |
177 return intersect(aQuad, bQuad); | 177 return intersect(aQuad, bQuad); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 #ifdef SK_DEBUG | 276 #ifdef SK_DEBUG |
277 int fDepth; | 277 int fDepth; |
278 #endif | 278 #endif |
279 }; | 279 }; |
280 | 280 |
281 extern int (SkIntersections::*CurveRay[])(const SkPoint[], const SkDLine& ); | 281 extern int (SkIntersections::*CurveRay[])(const SkPoint[], const SkDLine& ); |
282 extern int (SkIntersections::*CurveVertical[])(const SkPoint[], SkScalar top, Sk
Scalar bottom, | 282 extern int (SkIntersections::*CurveVertical[])(const SkPoint[], SkScalar top, Sk
Scalar bottom, |
283 SkScalar x, bool flipped); | 283 SkScalar x, bool flipped); |
284 | 284 |
285 #endif | 285 #endif |
OLD | NEW |