| 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 "SkIntersections.h" | 7 #include "SkIntersections.h" |
| 8 #include "SkPathOpsCurve.h" | 8 #include "SkPathOpsCurve.h" |
| 9 #include "SkPathOpsLine.h" | 9 #include "SkPathOpsLine.h" |
| 10 #include "SkPathOpsQuad.h" | 10 #include "SkPathOpsQuad.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 enum PinTPoint { | 92 enum PinTPoint { |
| 93 kPointUninitialized, | 93 kPointUninitialized, |
| 94 kPointInitialized | 94 kPointInitialized |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 LineQuadraticIntersections(const SkDQuad& q, const SkDLine& l, SkIntersectio
ns* i) | 97 LineQuadraticIntersections(const SkDQuad& q, const SkDLine& l, SkIntersectio
ns* i) |
| 98 : fQuad(q) | 98 : fQuad(q) |
| 99 , fLine(&l) | 99 , fLine(&l) |
| 100 , fIntersections(i) | 100 , fIntersections(i) |
| 101 , fAllowNear(true) { | 101 , fAllowNear(true) { |
| 102 i->setMax(4); // allow short partial coincidence plus discrete intersec
tions | 102 i->setMax(5); // allow short partial coincidence plus discrete intersec
tions |
| 103 } | 103 } |
| 104 | 104 |
| 105 LineQuadraticIntersections(const SkDQuad& q) | 105 LineQuadraticIntersections(const SkDQuad& q) |
| 106 : fQuad(q) | 106 : fQuad(q) |
| 107 SkDEBUGPARAMS(fLine(nullptr)) | 107 SkDEBUGPARAMS(fLine(nullptr)) |
| 108 SkDEBUGPARAMS(fIntersections(nullptr)) | 108 SkDEBUGPARAMS(fIntersections(nullptr)) |
| 109 SkDEBUGPARAMS(fAllowNear(false)) { | 109 SkDEBUGPARAMS(fAllowNear(false)) { |
| 110 } | 110 } |
| 111 | 111 |
| 112 void allowNear(bool allow) { | 112 void allowNear(bool allow) { |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 | 461 |
| 462 // SkDQuad accessors to Intersection utilities | 462 // SkDQuad accessors to Intersection utilities |
| 463 | 463 |
| 464 int SkDQuad::horizontalIntersect(double yIntercept, double roots[2]) const { | 464 int SkDQuad::horizontalIntersect(double yIntercept, double roots[2]) const { |
| 465 return SkIntersections::HorizontalIntercept(*this, yIntercept, roots); | 465 return SkIntersections::HorizontalIntercept(*this, yIntercept, roots); |
| 466 } | 466 } |
| 467 | 467 |
| 468 int SkDQuad::verticalIntersect(double xIntercept, double roots[2]) const { | 468 int SkDQuad::verticalIntersect(double xIntercept, double roots[2]) const { |
| 469 return SkIntersections::VerticalIntercept(*this, xIntercept, roots); | 469 return SkIntersections::VerticalIntercept(*this, xIntercept, roots); |
| 470 } | 470 } |
| OLD | NEW |