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


C++ SkAnimateMaker::setErrorNoun方法代码示例

本文整理汇总了C++中SkAnimateMaker::setErrorNoun方法的典型用法代码示例。如果您正苦于以下问题:C++ SkAnimateMaker::setErrorNoun方法的具体用法?C++ SkAnimateMaker::setErrorNoun怎么用?C++ SkAnimateMaker::setErrorNoun使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SkAnimateMaker的用法示例。


在下文中一共展示了SkAnimateMaker::setErrorNoun方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: onEndElement

void SkInclude::onEndElement(SkAnimateMaker& maker) {
    maker.fInInclude = true;
    if (src.size() == 0 || maker.decodeURI(src.c_str()) == false) {
        if (maker.getErrorCode() != SkXMLParserError::kNoError || maker.getNativeCode() != -1) {
            maker.setInnerError(&maker, src);
            maker.setErrorCode(SkDisplayXMLParserError::kInInclude);
        } else {
            maker.setErrorNoun(src);
            maker.setErrorCode(SkDisplayXMLParserError::kIncludeNameUnknownOrMissing);
        }
    }
    maker.fInInclude = false;
}
开发者ID:bluebellzhy,项目名称:chromium,代码行数:13,代码来源:SkDisplayInclude.cpp

示例2: buildMovie

void SkDisplayMovie::buildMovie() {
    if (fMovieBuilt)
        return;
    SkAnimateMaker* movieMaker = fMovie.fMaker;
    SkAnimateMaker* parentMaker = movieMaker->fParentMaker;
    if (src.size() == 0 || parentMaker == NULL)
        return;
    movieMaker->fPrefix.set(parentMaker->fPrefix);
    fDecodedSuccessfully = fMovie.fMaker->decodeURI(src.c_str());
    if (fDecodedSuccessfully == false) {

        if (movieMaker->getErrorCode() != SkXMLParserError::kNoError || movieMaker->getNativeCode() != -1) {
            movieMaker->setInnerError(parentMaker, src);
            parentMaker->setErrorCode(SkDisplayXMLParserError::kInMovie);
        } else {
            parentMaker->setErrorNoun(src);
            parentMaker->setErrorCode(SkDisplayXMLParserError::kMovieNameUnknownOrMissing);
        }
    }
    fMovieBuilt = true;
}
开发者ID:3rdexp,项目名称:soui,代码行数:21,代码来源:SkDisplayMovie.cpp

示例3: onEndElement

void SkAnimate::onEndElement(SkAnimateMaker& maker) {
    bool resolved = resolveCommon(maker);
    if (resolved && fFieldInfo == NULL) {
        maker.setErrorNoun(field);
        maker.setErrorCode(SkDisplayXMLParserError::kFieldNotInTarget);
    }
    if (resolved == false || fFieldInfo == NULL)
        return;
    SkDisplayTypes outType = fFieldInfo->getType();
    if (fHasValues) {
        SkASSERT(to.size() > 0);
        fFieldInfo->setValue(maker, &fValues, 0, 0, NULL, outType, to);
        SkASSERT(0);
        // !!! this needs to set fComponents
        return;
    }
    fComponents = fFieldInfo->getCount();
    if (fFieldInfo->fType == SkType_Array) {
        SkTypedArray* array = (SkTypedArray*) fFieldInfo->memberData(fTarget);
        int count = array->count();
        if (count > 0)
            fComponents = count;
    }
    if (outType == SkType_ARGB) {
        fComponents <<= 2;  // four color components
        outType = SkType_Float;
    }
    fValues.setType(outType);
    if (formula.size() > 0){
        fComponents = 1;
        from.set("0");
        to.set("dur");
        outType = SkType_MSec;
    }
    int max = fComponents * 2;
    fValues.setCount(max);
    memset(fValues.begin(), 0, max * sizeof(fValues.begin()[0]));
    fFieldInfo->setValue(maker, &fValues, fFieldOffset, max, this, outType, from);
    fFieldInfo->setValue(maker, &fValues, fComponents + fFieldOffset, max, this, outType, to);
}
开发者ID:AshishNamdev,项目名称:mozilla-central,代码行数:40,代码来源:SkAnimateField.cpp

示例4: setTarget

void SkAnimateBase::setTarget(SkAnimateMaker& maker) {
    if (target.size()) {
        SkAnimatorScript engine(maker, this, SkType_Displayable);
        const char* script = target.c_str();
        SkScriptValue scriptValue;
        bool success = engine.evaluateScript(&script, &scriptValue);
        if (success && scriptValue.fType == SkType_Displayable)
            fTarget = scriptValue.fOperand.fDrawable;
        else if (maker.find(target.c_str(), (SkDisplayable**) &fTarget) == false) {
            if (fApply->getMode() == SkApply::kMode_create)
                return; // may not be an error
            if (engine.getError() != SkScriptEngine::kNoError)
                maker.setScriptError(engine);
            else {
                maker.setErrorNoun(target);
                maker.setErrorCode(SkDisplayXMLParserError::kTargetIDNotFound);
            }
            return;
        }
        if (fApply && fApply->getMode() != SkApply::kMode_create)
            target.reset();
    }
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:23,代码来源:SkAnimateBase.cpp


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