本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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();
}
}