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 #include "SkAddIntersections.h" | 7 #include "SkAddIntersections.h" |
8 #include "SkPathOpsBounds.h" | 8 #include "SkPathOpsBounds.h" |
9 | 9 |
10 #if DEBUG_ADD_INTERSECTING_TS | 10 #if DEBUG_ADD_INTERSECTING_TS |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 wn.bottom(), wn.x(), wn.yFlipped()); | 300 wn.bottom(), wn.x(), wn.yFlipped()); |
301 debugShowQuadLineIntersection(pts, wt, wn, ts); | 301 debugShowQuadLineIntersection(pts, wt, wn, ts); |
302 break; | 302 break; |
303 case SkIntersectionHelper::kLine_Segment: { | 303 case SkIntersectionHelper::kLine_Segment: { |
304 pts = ts.quadLine(wt.pts(), wn.pts()); | 304 pts = ts.quadLine(wt.pts(), wn.pts()); |
305 debugShowQuadLineIntersection(pts, wt, wn, ts); | 305 debugShowQuadLineIntersection(pts, wt, wn, ts); |
306 break; | 306 break; |
307 } | 307 } |
308 case SkIntersectionHelper::kQuad_Segment: { | 308 case SkIntersectionHelper::kQuad_Segment: { |
309 pts = ts.quadQuad(wt.pts(), wn.pts()); | 309 pts = ts.quadQuad(wt.pts(), wn.pts()); |
310 ts.alignQuadPts(wt.pts(), wn.pts()); | |
311 debugShowQuadIntersection(pts, wt, wn, ts); | 310 debugShowQuadIntersection(pts, wt, wn, ts); |
312 break; | 311 break; |
313 } | 312 } |
314 case SkIntersectionHelper::kCubic_Segment: { | 313 case SkIntersectionHelper::kCubic_Segment: { |
315 swap = true; | 314 swap = true; |
316 pts = ts.cubicQuad(wn.pts(), wt.pts()); | 315 pts = ts.cubicQuad(wn.pts(), wt.pts()); |
317 debugShowCubicQuadIntersection(pts, wn, wt, ts); | 316 debugShowCubicQuadIntersection(pts, wn, wt, ts); |
318 break; | 317 break; |
319 } | 318 } |
320 default: | 319 default: |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 if (!contour->calcCoincidentWinding()) { | 449 if (!contour->calcCoincidentWinding()) { |
451 return false; | 450 return false; |
452 } | 451 } |
453 } | 452 } |
454 for (int cIndex = 0; cIndex < contourCount; ++cIndex) { | 453 for (int cIndex = 0; cIndex < contourCount; ++cIndex) { |
455 SkOpContour* contour = (*contourList)[cIndex]; | 454 SkOpContour* contour = (*contourList)[cIndex]; |
456 contour->calcPartialCoincidentWinding(); | 455 contour->calcPartialCoincidentWinding(); |
457 } | 456 } |
458 return true; | 457 return true; |
459 } | 458 } |
OLD | NEW |