Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Unified Diff: src/pathops/SkIntersections.h

Issue 19183003: path ops near exact (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove unused static function Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pathops/SkDQuadLineIntersection.cpp ('k') | src/pathops/SkIntersections.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkIntersections.h
diff --git a/src/pathops/SkIntersections.h b/src/pathops/SkIntersections.h
index c0bb61fef0f09c335f2744edc51eb35ad0826d54..de3d44cd7035d0e2778b060cfd722e1e68ef1107 100644
--- a/src/pathops/SkIntersections.h
+++ b/src/pathops/SkIntersections.h
@@ -45,6 +45,10 @@ public:
SkDEBUGCODE(fDepth = i.fDepth);
}
+ void allowNear(bool nearAllowed) {
+ fAllowNear = nearAllowed;
+ }
+
int cubic(const SkPoint a[4]) {
SkDCubic cubic;
cubic.set(a);
@@ -88,6 +92,11 @@ public:
return intersect(cubic, quad);
}
+ bool hasT(double t) const {
+ SkASSERT(t == 0 || t == 1);
+ return fUsed > 0 && (t == 0 ? fT[0][0] == 0 : fT[0][fUsed - 1] == 1);
+ }
+
int insertSwap(double one, double two, const SkDPoint& pt) {
if (fSwap) {
return insert(two, one, pt);
@@ -96,14 +105,6 @@ public:
}
}
- int insertSwap(double one, double two, double x, double y) {
- if (fSwap) {
- return insert(two, one, x, y);
- } else {
- return insert(one, two, x, y);
- }
- }
-
bool isCoincident(int index) {
return (fIsCoincident[0] & 1 << index) != 0;
}
@@ -166,6 +167,7 @@ public:
// leaves flip, swap alone
void reset() {
+ fAllowNear = true;
fUsed = 0;
}
@@ -204,7 +206,6 @@ public:
int horizontal(const SkDCubic&, double left, double right, double y, double tRange[3]);
// FIXME : does not respect swap
int insert(double one, double two, const SkDPoint& pt);
- int insert(double one, double two, double x, double y);
// start if index == 0 : end if index == 1
void insertCoincident(double one, double two, const SkDPoint& pt);
void insertCoincidentPair(double s1, double e1, double s2, double e2,
@@ -248,6 +249,7 @@ private:
double fT[2][9];
uint16_t fIsCoincident[2]; // bit arrays, one bit set for each coincident T
unsigned char fUsed;
+ bool fAllowNear;
bool fSwap;
#ifdef SK_DEBUG
int fDepth;
« no previous file with comments | « src/pathops/SkDQuadLineIntersection.cpp ('k') | src/pathops/SkIntersections.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698