7#ifndef SkPathOpsTSect_DEFINED
8#define SkPathOpsTSect_DEFINED
96 fPart = curve.
make(heap);
118 fDebugGlobalState =
state;
121 const SkTSpan* debugSpan(
int )
const;
122 const SkTSpan* debugT(
double t)
const;
123 bool debugIsBefore(
const SkTSpan* span)
const;
145 bool hasOppT(
double t)
const {
154 return fBounded !=
nullptr;
170 bool* oppStart,
bool* ptsInCommon);
196 fIsLinear = fIsLine =
false;
201 return splitAt(work, (work->fStartT + work->fEndT) * 0.5, heap);
213 int debugID()
const {
219 int hullCheck(
const SkTSpan* opp,
bool*
start,
bool* oppStart);
220 int linearIntersects(
const SkTCurve& )
const;
223 void validate()
const;
224 void validateBounded()
const;
225 void validatePerpT(
double oppT)
const;
226 void validatePerpPt(
double t,
const SkDPoint& )
const;
257 bool hasBounded(
const SkTSpan* )
const;
264 const SkTSpan* debugSpan(
int id)
const;
265 const SkTSpan* debugT(
double t)
const;
284 void addForPerp(
SkTSpan* span,
double t);
290 result->splitAt(span, t, &fHeap);
291 result->initBounds(fCurve);
296 bool binarySearchCoin(
SkTSect* ,
double tStart,
double tStep,
double* t,
297 double* oppT,
SkTSpan** oppFirst);
299 bool coincidentCheck(
SkTSect* sect2);
300 void coincidentForce(
SkTSect* sect2,
double start1s,
double start1e);
301 bool coincidentHasT(
double t);
302 int collapsed()
const;
305 int countConsecutiveSpans(
SkTSpan* first,
308 int debugID()
const {
312 bool deleteEmptySpans();
313 void dumpCommon(
const SkTSpan* )
const;
314 void dumpCommonCurves(
const SkTSpan* )
const;
321 SkTSpan* oppSpan,
int* oppResult);
322 bool isParallel(
const SkDLine& thisLine,
const SkTSect* opp)
const;
325 bool markSpanGone(
SkTSpan* span);
326 bool matchedDirection(
double t,
const SkTSect* sect2,
double t2)
const;
327 void matchedDirCheck(
double t,
const SkTSect* sect2,
double t2,
328 bool* calcMatched,
bool* oppMatched)
const;
329 void mergeCoincidence(
SkTSect* sect2);
336 bool removeByPerpendicular(
SkTSect* opp);
337 void recoverCollapsed();
338 bool removeCoincident(
SkTSpan* span,
bool isBetween);
341 bool removeSpan(
SkTSpan* span);
344 void removedEndCheck(
SkTSpan* span);
346 void resetRemovedEnds() {
347 fRemovedStartT = fRemovedEndT =
false;
353 bool unlinkSpan(
SkTSpan* span);
356 void validate()
const;
357 void validateBounded()
const;
373 int fDebugAllocatedCount;
#define SkDEBUGPARAMS(...)
#define SkDEBUGRELEASE(a, b)
#define PATH_OPS_DEBUG_T_SECT_PARAMS(...)
#define PATH_OPS_DEBUG_T_SECT_RELEASE(a, b)
#define PATH_OPS_DEBUG_T_SECT_CODE(...)
static bool SkDoubleIsNaN(double x)
static constexpr bool SkToBool(const T &x)
char dumpIsCoincidentStr() const
const SkDPoint & perpPt() const
void setPerp(const SkTCurve &c1, double t, const SkDPoint &cPt, const SkTCurve &)
virtual void debugInit()=0
virtual int pointCount() const =0
virtual SkTCurve * make(SkArenaAlloc &) const =0
virtual int pointLast() const =0
const SkTSect * debugOpp() const
SkTSect(const SkTCurve &c SkDEBUGPARAMS(SkOpGlobalState *) PATH_OPS_DEBUG_T_SECT_PARAMS(int id))
static void BinarySearch(SkTSect *sect1, SkTSect *sect2, SkIntersections *intersections)
SkDEBUGCODE(SkOpGlobalState *globalState() { return fDebugGlobalState;}) bool hasBounded(const SkTSpan *) const
void dumpCoinCurves() const
void dumpBoth(SkTSect *) const
void dumpBounded(int id) const
bool initBounds(const SkTCurve &)
const SkTSect * debugOpp() const
int hullsIntersect(SkTSpan *span, bool *start, bool *oppStart)
bool contains(double t) const
void dumpBounded(int id) const
const SkTSpan * next() const
void addBounded(SkTSpan *, SkArenaAlloc *)
const SkDPoint & pointLast() const
SkDEBUGCODE(SkOpGlobalState *globalState() const { return fDebugGlobalState;}) bool hasOppT(double t) const
const SkDPoint & pointFirst() const
void init(const SkTCurve &)
SkTSpan(const SkTCurve &curve, SkArenaAlloc &heap)
SkTSpan * findOppT(double t) const
const SkTCurve & part() const
bool removeBounded(const SkTSpan *opp)
bool linearsIntersect(SkTSpan *span)
void resetBounds(const SkTCurve &curve)
void debugInit(const SkTCurve &curve, SkArenaAlloc &heap)
bool split(SkTSpan *work, SkArenaAlloc *heap)
bool splitAt(SkTSpan *work, double t, SkArenaAlloc *heap)
double closestBoundedT(const SkDPoint &pt) const
SkTSpan * findOppSpan(const SkTSpan *opp) const
double linearT(const SkDPoint &) const
bool onlyEndPointsInCommon(const SkTSpan *opp, bool *start, bool *oppStart, bool *ptsInCommon)