/* * Copyright 2014 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "SkPathOpsTSect.h" template void SkTSect::dump() const { SkDebugf("id=%d", debugID()); const SkTSpan* test = fHead; if (!test) { SkDebugf(" (empty)"); return; } do { SkDebugf(" "); test->dump(this); } while ((test = test->next())); } template void SkTSect::dumpBoth(const SkTSect& opp) const { dump(); SkDebugf(" "); opp.dump(); SkDebugf("\n"); } template void SkTSect::dumpBoth(const SkTSect* opp) const { dumpBoth(*opp); } template void SkTSect::dumpCurves() const { const SkTSpan* test = fHead; do { test->fPart.dump(); } while ((test = test->next())); } #if !DEBUG_T_SECT template int SkTSpan::debugID(const SkTSect* sect) const { if (!sect) { return -1; } int id = 1; const SkTSpan* test = sect->fHead; while (test && test != this) { ++id; test = test->fNext; } return id; } #endif template void SkTSpan::dumpID(const SkTSect* sect) const { if (fCoinStart.isCoincident()) { SkDebugf("%c", '*'); } SkDebugf("%d", debugID(sect)); if (fCoinEnd.isCoincident()) { SkDebugf("%c", '*'); } } template void SkTSpan::dump(const SkTSect* sect) const { dumpID(sect); SkDebugf("=(%g,%g) [", fStartT, fEndT); for (int index = 0; index < fBounded.count(); ++index) { SkTSpan* span = fBounded[index]; span->dumpID(sect); if (index < fBounded.count() - 1) { SkDebugf(","); } } SkDebugf("]"); }