int SkIntersections::insertCoincident(double one, double two, const SkDPoint& pt) { int index = insertSwap(one, two, pt); if (index >= 0) {
setCoincident(index);
} return index;
}
void SkIntersections::setCoincident(int index) {
SkASSERT(index >= 0); int bit = 1 << index;
fIsCoincident[0] |= bit;
fIsCoincident[1] |= bit;
}
void SkIntersections::merge(const SkIntersections& a, int aIndex, const SkIntersections& b, int bIndex) {
this->reset();
fT[0][0] = a.fT[0][aIndex];
fT[1][0] = b.fT[0][bIndex];
fPt[0] = a.fPt[aIndex];
fPt2[0] = b.fPt[bIndex];
fUsed = 1;
}
int SkIntersections::mostOutside(double rangeStart, double rangeEnd, const SkDPoint& origin) const { int result = -1; for (int index = 0; index < fUsed; ++index) { if (!between(rangeStart, fT[0][index], rangeEnd)) { continue;
} if (result < 0) {
result = index; continue;
}
SkDVector best = fPt[result] - origin;
SkDVector test = fPt[index] - origin; if (test.crossCheck(best) < 0) {
result = index;
}
} return result;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.