#include <SkOpAngle.h>
Definition at line 32 of file SkOpAngle.h.
◆ IncludeType
Enumerator |
---|
kUnaryWinding | |
kUnaryXor | |
kBinarySingle | |
kBinaryOpp | |
Definition at line 34 of file SkOpAngle.h.
◆ debugAngle()
Definition at line 524 of file PathOpsDebug.cpp.
524 {
526}
SkOpSegment * segment() const
const SkOpAngle * debugAngle(int id) const
◆ debugCoincidence()
Definition at line 528 of file PathOpsDebug.cpp.
528 {
530}
const SkOpCoincidence * debugCoincidence() const
◆ debugContour()
Definition at line 532 of file PathOpsDebug.cpp.
532 {
534}
SkOpContour * debugContour(int id) const
◆ debugID()
int SkOpAngle::debugID |
( |
| ) |
const |
|
inline |
Definition at line 45 of file SkOpAngle.h.
45 {
47 }
#define SkDEBUGRELEASE(a, b)
◆ debugPtT()
const SkOpPtT * SkOpAngle::debugPtT |
( |
int |
id | ) |
const |
Definition at line 536 of file PathOpsDebug.cpp.
536 {
538}
const SkOpPtT * debugPtT(int id) const
◆ debugSegment()
Definition at line 540 of file PathOpsDebug.cpp.
540 {
542}
const SkOpSegment * debugSegment(int id) const
◆ debugSign()
int SkOpAngle::debugSign |
( |
| ) |
const |
◆ debugSpan()
Definition at line 549 of file PathOpsDebug.cpp.
549 {
551}
const SkOpSpanBase * debugSpan(int id) const
◆ debugValidate()
void SkOpAngle::debugValidate |
( |
| ) |
const |
Definition at line 1323 of file SkPathOpsDebug.cpp.
1323 {
1324#if DEBUG_COINCIDENCE
1325 if (this->globalState()->debugCheckHealth()) {
1326 return;
1327 }
1328#endif
1329#if DEBUG_VALIDATE
1332 int wind = 0;
1333 int opp = 0;
1334 int lastXor = -1;
1335 int lastOppXor = -1;
1336 do {
1338 return;
1339 }
1342 return;
1343 }
1350 bool useXor = op ? oppXor : isXor;
1351 SkASSERT(lastXor == -1 || lastXor == (
int) useXor);
1352 lastXor = (
int) useXor;
1354 if (useXor) {
1355 wind &= 1;
1356 }
1357 useXor = op ? isXor : oppXor;
1358 SkASSERT(lastOppXor == -1 || lastOppXor == (
int) useXor);
1359 lastOppXor = (
int) useXor;
1361 if (useXor) {
1362 opp &= 1;
1363 }
1368#endif
1369}
static constexpr int32_t SK_MinS32
#define DEBUG_LIMIT_WIND_SUM
bool between(double a, double b, double c)
SkOpSpanBase * end() const
SkOpSpanBase * start() const
const SkOpSpan * starter(const SkOpSpanBase *end) const
◆ debugValidateNext()
void SkOpAngle::debugValidateNext |
( |
| ) |
const |
Definition at line 1371 of file SkPathOpsDebug.cpp.
1371 {
1372#if !FORCE_RELEASE
1376 do {
1377
1380 if (
next == first) {
1381 break;
1382 }
1385 return;
1386 }
1387 } while (true);
1388#endif
1389}
#define SkASSERT_RELEASE(cond)
void push_back(const T &v)
◆ distEndRatio()
double SkOpAngle::distEndRatio |
( |
double |
dist | ) |
const |
Definition at line 499 of file SkOpAngle.cpp.
499 {
500 double longest = 0;
504 for (int idx1 = 0; idx1 <= ptCount - 1; ++idx1) {
505 for (int idx2 = idx1 + 1; idx2 <= ptCount; ++idx2) {
506 if (idx1 == idx2) {
507 continue;
508 }
510 v.
set(pts[idx2] - pts[idx1]);
513 }
514 }
515 return sqrt(longest) / dist;
516}
int SkPathOpsVerbToPoints(SkPath::Verb verb)
SkPath::Verb verb() const
const SkPoint * pts() const
static float max(float r, float g, float b)
SIN Vec< N, float > sqrt(const Vec< N, float > &x)
SkDVector & set(const SkVector &pt)
double lengthSquared() const
◆ dump()
void SkOpAngle::dump |
( |
| ) |
const |
Definition at line 553 of file PathOpsDebug.cpp.
553 {
556}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
void dumpOne(bool functionHeader) const
◆ dumpCurves()
void SkOpAngle::dumpCurves |
( |
| ) |
const |
◆ dumpLoop()
void SkOpAngle::dumpLoop |
( |
| ) |
const |
◆ dumpOne()
void SkOpAngle::dumpOne |
( |
bool |
functionHeader | ) |
const |
Definition at line 558 of file PathOpsDebug.cpp.
558 {
559
562 if (functionHeader) {
564 }
568 if (fNext) {
571 } else {
573 }
574 SkDebugf(
" sect=%d/%d ", fSectorStart, fSectorEnd);
578
585 }
588 }
591 }
594 }
595}
SkOpSegment * segment() const
static void WindingPrintf(int winding)
◆ dumpTest()
void SkOpAngle::dumpTest |
( |
| ) |
const |
Definition at line 637 of file PathOpsDebug.cpp.
637 {
640 do {
648}
void dumpPts(const char *prefix="seg") const
◆ dumpTo()
Definition at line 597 of file PathOpsDebug.cpp.
597 {
600 const char* indent = "";
601 do {
605 if (this == fNext) {
607 }
608 if (to == fNext) {
610 }
611 }
613 indent = " ";
616}
◆ end()
Definition at line 73 of file SkOpAngle.h.
73 {
74 return fEnd;
75 }
◆ insert()
Definition at line 749 of file SkOpAngle.cpp.
749 {
750 if (angle->fNext) {
752 if (!merge(angle)) {
753 return true;
754 }
755 } else if (fNext) {
756 if (!angle->merge(this)) {
757 return true;
758 }
759 } else {
761 }
762 return true;
763 }
764 bool singleton = nullptr == fNext;
765 if (singleton) {
766 fNext = this;
767 }
769 if (
next->fNext ==
this) {
770 if (singleton || angle->after(this)) {
771 this->fNext = angle;
773 } else {
775 angle->fNext = this;
776 }
778 return true;
779 }
781 bool flipAmbiguity = false;
782 do {
785 last->fNext = angle;
788 break;
789 }
791 if (last == this) {
793
794 flipAmbiguity = true;
795 }
797 } while (true);
798 return true;
799}
void debugValidateNext() const
bool tangentsAmbiguous() const
◆ lastMarked()
Definition at line 801 of file SkOpAngle.cpp.
801 {
802 if (fLastMarked) {
803 if (fLastMarked->
chased()) {
804 return nullptr;
805 }
807 }
808 return fLastMarked;
809}
void setChased(bool chased)
◆ loopContains()
bool SkOpAngle::loopContains |
( |
const SkOpAngle * |
angle | ) |
const |
Definition at line 811 of file SkOpAngle.cpp.
811 {
812 if (!fNext) {
813 return false;
814 }
818 double tStart = angle->fStart->
t();
819 double tEnd = angle->fEnd->
t();
820 do {
822 if (lSegment != tSegment) {
823 continue;
824 }
825 double lStart = loop->fStart->
t();
826 if (lStart != tEnd) {
827 continue;
828 }
829 double lEnd = loop->fEnd->
t();
830 if (lEnd == tStart) {
831 return true;
832 }
833 } while ((loop = loop->fNext) != first);
834 return false;
835}
◆ loopCount()
int SkOpAngle::loopCount |
( |
| ) |
const |
◆ next()
Definition at line 82 of file SkOpAngle.h.
82 {
83 return fNext;
84 }
◆ previous()
Definition at line 958 of file SkOpAngle.cpp.
958 {
960 do {
963 return last;
964 }
966 } while (true);
967}
◆ segment()
◆ set()
Definition at line 973 of file SkOpAngle.cpp.
973 {
975 fComputedEnd = fEnd =
end;
977 fNext = nullptr;
978 fComputeSector = fComputedSector = fCheckCoincidence = fTangentsAmbiguous = false;
979 setSpans();
980 setSector();
982}
SkOpGlobalState * globalState() const
◆ setLastMarked()
Definition at line 90 of file SkOpAngle.h.
90 {
91 fLastMarked = marked;
92 }
◆ start()
Definition at line 94 of file SkOpAngle.h.
94 {
95 return fStart;
96 }
◆ starter()
◆ tangentsAmbiguous()
bool SkOpAngle::tangentsAmbiguous |
( |
| ) |
const |
|
inline |
Definition at line 100 of file SkOpAngle.h.
100 {
101 return fTangentsAmbiguous;
102 }
◆ unorderable()
bool SkOpAngle::unorderable |
( |
| ) |
const |
|
inline |
Definition at line 104 of file SkOpAngle.h.
104 {
105 return fUnorderable;
106 }
The documentation for this class was generated from the following files: