aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkOpSegment.h
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2017-04-18 12:08:58 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-18 16:40:48 +0000
commit73e597d0eddeaaa466101d5bb7da537c0066166a (patch)
tree4d6196ac7f074c96ccaee75beaffa196d27fe1fe /src/pathops/SkOpSegment.h
parent4304d11ada22ebfb6b64d87247ad24cde89c3a74 (diff)
keep integral rectangle intersections integral
A pair of coincident lines can generate multiple intersection points. Path ops is more stable when the intersection T value is used to recompute the intersection point, but this has the side-effect of making integral edges intersect at non-integral values. While it's worthwhile to fix this, for the moment it is less disruptive to only worry about keeping intersection values integral if the original intersection point is integral in both axes. Also, fix some debugging code that bit-rotted. R=msarett@google.com Change-Id: Iefd27b25d1d21c22b224c174bd59bc6c105033c4 Reviewed-on: https://skia-review.googlesource.com/13721 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'src/pathops/SkOpSegment.h')
-rw-r--r--src/pathops/SkOpSegment.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pathops/SkOpSegment.h b/src/pathops/SkOpSegment.h
index 20b0956580..4bde8166f7 100644
--- a/src/pathops/SkOpSegment.h
+++ b/src/pathops/SkOpSegment.h
@@ -93,6 +93,7 @@ public:
}
SkOpPtT* addT(double t);
+ SkOpPtT* addT(double t, const SkPoint& pt);
template<typename T> T* allocateArray(int count) {
return SkOpTAllocator<T>::AllocateArray(this->globalState()->allocator(), count);