当前位置: 首页>>代码示例>>C++>>正文


C++ SkOpContour类代码示例

本文整理汇总了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();
    }
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:8,代码来源:SkPathOpsCommon.cpp

示例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();
    }
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:7,代码来源:SkPathOpsCommon.cpp

示例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();
    }
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:7,代码来源:SkPathOpsCommon.cpp

示例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;
}
开发者ID:03050903,项目名称:skia,代码行数:32,代码来源:SkPathOpsTightBounds.cpp

示例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();
    }
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:7,代码来源:SkPathOpsCommon.cpp

示例6: missingCoincidence

static bool missingCoincidence(SkOpContourHead* contourList) {
    SkOpContour* contour = contourList;
    bool result = false;
    do {
        result |= contour->missingCoincidence();
    } while ((contour = contour->next()));
    return result;
}
开发者ID:sylvestre,项目名称:skia,代码行数:8,代码来源:SkPathOpsCommon.cpp

示例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();
    }
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:9,代码来源:SkPathOpsCommon.cpp

示例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;
}
开发者ID:Just-D,项目名称:skia,代码行数:9,代码来源:SkPathOpsCommon.cpp

示例9: moveMultiples

static bool moveMultiples(SkOpContourHead* contourList) {
    SkOpContour* contour = contourList;
    do {
        if (!contour->moveMultiples()) {
            return false;
        }
    } while ((contour = contour->next()));
    return true;
}
开发者ID:sylvestre,项目名称:skia,代码行数:9,代码来源:SkPathOpsCommon.cpp

示例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);
        }
    }
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:10,代码来源:SkPathOpsCommon.cpp

示例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;
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:10,代码来源:SkPathOpsCommon.cpp

示例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;
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:10,代码来源:SkPathOpsCommon.cpp

示例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]);
        }
    }    
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:11,代码来源:SkPathOpsCommon.cpp

示例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;
}
开发者ID:Just-D,项目名称:skia,代码行数:12,代码来源:SkPathOpsCommon.cpp

示例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;
}
开发者ID:molikto,项目名称:Skia,代码行数:12,代码来源:SkOpEdgeBuilder.cpp


注:本文中的SkOpContour类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。