aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkDLineIntersection.cpp
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-01 17:36:03 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-11-01 17:36:03 +0000
commita2bbc6e19d5332e81784e582c290cc060f40c4c7 (patch)
tree507a82e41b5a59f261295718091f0f1491b3d894 /src/pathops/SkDLineIntersection.cpp
parent045c3d330c6c14f090c2222ece08d82cb84fb3ea (diff)
pathops work in progress
BUG= Review URL: https://codereview.chromium.org/52653002 git-svn-id: http://skia.googlecode.com/svn/trunk@12089 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/pathops/SkDLineIntersection.cpp')
-rw-r--r--src/pathops/SkDLineIntersection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pathops/SkDLineIntersection.cpp b/src/pathops/SkDLineIntersection.cpp
index fca0a04d1f..33c8480cd5 100644
--- a/src/pathops/SkDLineIntersection.cpp
+++ b/src/pathops/SkDLineIntersection.cpp
@@ -181,7 +181,7 @@ static int horizontal_coincident(const SkDLine& line, double y) {
}
static double horizontal_intercept(const SkDLine& line, double y) {
- return (y - line[0].fY) / (line[1].fY - line[0].fY);
+ return SkPinT((y - line[0].fY) / (line[1].fY - line[0].fY));
}
int SkIntersections::horizontal(const SkDLine& line, double y) {
@@ -267,7 +267,7 @@ static int vertical_coincident(const SkDLine& line, double x) {
}
static double vertical_intercept(const SkDLine& line, double x) {
- return (x - line[0].fX) / (line[1].fX - line[0].fX);
+ return SkPinT((x - line[0].fX) / (line[1].fX - line[0].fX));
}
int SkIntersections::vertical(const SkDLine& line, double x) {