本文整理汇总了C++中SkOpContour类的典型用法代码示例。如果您正苦于以下问题:C++ SkOpContour类的具体用法?C++ SkOpContour怎么用?C++ SkOpContour使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SkOpContour类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkTiny
// A tiny interval may indicate an undiscovered coincidence. Find and fix.
static void checkTiny(SkTArray<SkOpContour*, true>* contourList) {
int contourCount = (*contourList).count();
for (int cTest = 0; cTest < contourCount; ++cTest) {
SkOpContour* contour = (*contourList)[cTest];
contour->checkTiny();
}
}
示例2: joinCoincidence
static void joinCoincidence(SkTArray<SkOpContour*, true>* contourList) {
int contourCount = (*contourList).count();
for (int cTest = 0; cTest < contourCount; ++cTest) {
SkOpContour* contour = (*contourList)[cTest];
contour->joinCoincidence();
}
}
示例3: fixOtherTIndex
static void fixOtherTIndex(SkTArray<SkOpContour*, true>* contourList) {
int contourCount = (*contourList).count();
for (int cTest = 0; cTest < contourCount; ++cTest) {
SkOpContour* contour = (*contourList)[cTest];
contour->fixOtherTIndex();
}
}
示例4: TightBounds
bool TightBounds(const SkPath& path, SkRect* result) {
SkChunkAlloc allocator(4096); // FIXME: constant-ize, tune
SkOpContour contour;
SkOpContourHead* contourList = static_cast<SkOpContourHead*>(&contour);
SkOpGlobalState globalState(contourList, &allocator SkDEBUGPARAMS(false)
SkDEBUGPARAMS(nullptr));
// turn path into list of segments
SkScalar scaleFactor = ScaleFactor(path);
SkPath scaledPath;
const SkPath* workingPath;
if (scaleFactor > SK_Scalar1) {
ScalePath(path, 1.f / scaleFactor, &scaledPath);
workingPath = &scaledPath;
} else {
workingPath = &path;
}
SkOpEdgeBuilder builder(*workingPath, &contour, &globalState);
if (!builder.finish()) {
return false;
}
if (!SortContourList(&contourList, false, false)) {
result->setEmpty();
return true;
}
SkOpContour* current = contourList;
SkPathOpsBounds bounds = current->bounds();
while ((current = current->next())) {
bounds.add(current->bounds());
}
*result = bounds;
return true;
}
示例5: sortSegments
static void sortSegments(SkTArray<SkOpContour*, true>* contourList) {
int contourCount = (*contourList).count();
for (int cTest = 0; cTest < contourCount; ++cTest) {
SkOpContour* contour = (*contourList)[cTest];
contour->sortSegments();
}
}
示例6: missingCoincidence
static bool missingCoincidence(SkOpContourHead* contourList) {
SkOpContour* contour = contourList;
bool result = false;
do {
result |= contour->missingCoincidence();
} while ((contour = contour->next()));
return result;
}
示例7: checkEnds
static void checkEnds(SkTArray<SkOpContour*, true>* contourList) {
// it's hard to determine if the end of a cubic or conic nearly intersects another curve.
// instead, look to see if the connecting curve intersected at that same end.
int contourCount = (*contourList).count();
for (int cTest = 0; cTest < contourCount; ++cTest) {
SkOpContour* contour = (*contourList)[cTest];
contour->checkEnds();
}
}
示例8: missingCoincidence
static bool missingCoincidence(SkOpContourHead* contourList,
SkOpCoincidence* coincidence, SkChunkAlloc* allocator) {
SkOpContour* contour = contourList;
bool result = false;
do {
result |= contour->missingCoincidence(coincidence, allocator);
} while ((contour = contour->next()));
return result;
}
示例9: moveMultiples
static bool moveMultiples(SkOpContourHead* contourList) {
SkOpContour* contour = contourList;
do {
if (!contour->moveMultiples()) {
return false;
}
} while ((contour = contour->next()));
return true;
}
示例10: alignMultiples
static void alignMultiples(SkTArray<SkOpContour*, true>* contourList,
SkTDArray<SkOpSegment::AlignedSpan>* aligned) {
int contourCount = (*contourList).count();
for (int cTest = 0; cTest < contourCount; ++cTest) {
SkOpContour* contour = (*contourList)[cTest];
if (contour->hasMultiples()) {
contour->alignMultiples(aligned);
}
}
}
示例11: calcAngles
static bool calcAngles(SkTArray<SkOpContour*, true>* contourList) {
int contourCount = (*contourList).count();
for (int cTest = 0; cTest < contourCount; ++cTest) {
SkOpContour* contour = (*contourList)[cTest];
if (!contour->calcAngles()) {
return false;
}
}
return true;
}
示例12: checkMultiples
static bool checkMultiples(SkTArray<SkOpContour*, true>* contourList) {
bool hasMultiples = false;
int contourCount = (*contourList).count();
for (int cTest = 0; cTest < contourCount; ++cTest) {
SkOpContour* contour = (*contourList)[cTest];
contour->checkMultiples();
hasMultiples |= contour->hasMultiples();
}
return hasMultiples;
}
示例13: alignCoincidence
static void alignCoincidence(SkTArray<SkOpContour*, true>* contourList,
const SkTDArray<SkOpSegment::AlignedSpan>& aligned) {
int contourCount = (*contourList).count();
for (int cTest = 0; cTest < contourCount; ++cTest) {
SkOpContour* contour = (*contourList)[cTest];
int count = aligned.count();
for (int index = 0; index < count; ++index) {
contour->alignCoincidence(aligned[index]);
}
}
}
示例14: FindUndone
SkOpSegment* FindUndone(SkOpContourHead* contourList, SkOpSpanBase** startPtr,
SkOpSpanBase** endPtr) {
SkOpSegment* result;
SkOpContour* contour = contourList;
do {
result = contour->undoneSegment(startPtr, endPtr);
if (result) {
return result;
}
} while ((contour = contour->next()));
return nullptr;
}
示例15: complete
bool SkOpEdgeBuilder::finish() {
fOperand = false;
if (fUnparseable || !walk()) {
return false;
}
complete();
SkOpContour* contour = fContourBuilder.contour();
if (contour && !contour->count()) {
fContoursHead->remove(contour);
}
return true;
}