本文整理汇总了C++中SkOpSegment::markDone方法的典型用法代码示例。如果您正苦于以下问题:C++ SkOpSegment::markDone方法的具体用法?C++ SkOpSegment::markDone怎么用?C++ SkOpSegment::markDone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkOpSegment
的用法示例。
在下文中一共展示了SkOpSegment::markDone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: bridgeXor
// returns true if all edges were processed
static bool bridgeXor(SkTDArray<SkOpContour*>& contourList, SkPathWriter* simple) {
SkOpSegment* current;
int start, end;
bool unsortable = false;
bool closable = true;
while ((current = FindUndone(contourList, &start, &end))) {
do {
#if DEBUG_ACTIVE_SPANS
if (!unsortable && current->done()) {
DebugShowActiveSpans(contourList);
}
#endif
SkASSERT(unsortable || !current->done());
int nextStart = start;
int nextEnd = end;
SkOpSegment* next = current->findNextXor(&nextStart, &nextEnd, &unsortable);
if (!next) {
if (!unsortable && simple->hasMove()
&& current->verb() != SkPath::kLine_Verb
&& !simple->isClosed()) {
current->addCurveTo(start, end, simple, true);
SkASSERT(simple->isClosed());
}
break;
}
#if DEBUG_FLOW
SkDebugf("%s current id=%d from=(%1.9g,%1.9g) to=(%1.9g,%1.9g)\n", __FUNCTION__,
current->debugID(), current->xyAtT(start).fX, current->xyAtT(start).fY,
current->xyAtT(end).fX, current->xyAtT(end).fY);
#endif
current->addCurveTo(start, end, simple, true);
current = next;
start = nextStart;
end = nextEnd;
} while (!simple->isClosed() && (!unsortable || !current->done(SkMin32(start, end))));
if (!simple->isClosed()) {
SkASSERT(unsortable);
int min = SkMin32(start, end);
if (!current->done(min)) {
current->addCurveTo(start, end, simple, true);
current->markDone(min, 1);
}
closable = false;
}
simple->close();
#if DEBUG_ACTIVE_SPANS
DebugShowActiveSpans(contourList);
#endif
}
return closable;
}