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 "SkPathOpsLine.h" | 8 #include "SkPathOpsLine.h" |
9 #include "SkPathOpsQuad.h" | 9 #include "SkPathOpsQuad.h" |
10 | 10 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 | 435 |
436 int SkIntersections::HorizontalIntercept(const SkDQuad& quad, SkScalar y, double
* roots) { | 436 int SkIntersections::HorizontalIntercept(const SkDQuad& quad, SkScalar y, double
* roots) { |
437 LineQuadraticIntersections q(quad); | 437 LineQuadraticIntersections q(quad); |
438 return q.horizontalIntersect(y, roots); | 438 return q.horizontalIntersect(y, roots); |
439 } | 439 } |
440 | 440 |
441 int SkIntersections::VerticalIntercept(const SkDQuad& quad, SkScalar x, double*
roots) { | 441 int SkIntersections::VerticalIntercept(const SkDQuad& quad, SkScalar x, double*
roots) { |
442 LineQuadraticIntersections q(quad); | 442 LineQuadraticIntersections q(quad); |
443 return q.verticalIntersect(x, roots); | 443 return q.verticalIntersect(x, roots); |
444 } | 444 } |
| 445 |
| 446 // SkDQuad accessors to Intersection utilities |
| 447 |
| 448 int SkDQuad::horizontalIntersect(double yIntercept, double roots[2]) const { |
| 449 return SkIntersections::HorizontalIntercept(*this, yIntercept, roots); |
| 450 } |
| 451 |
| 452 int SkDQuad::verticalIntersect(double xIntercept, double roots[2]) const { |
| 453 return SkIntersections::VerticalIntercept(*this, xIntercept, roots); |
| 454 } |
OLD | NEW |