本文整理汇总了C++中SkApply::getScope方法的典型用法代码示例。如果您正苦于以下问题:C++ SkApply::getScope方法的具体用法?C++ SkApply::getScope怎么用?C++ SkApply::getScope使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkApply
的用法示例。
在下文中一共展示了SkApply::getScope方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: next
virtual SkScalar next(SkPath* dst, SkScalar distance, SkPathMeasure& )
{
fMaker->setExtraPropertyCallBack(fDraw->fType, GetDistance, &distance);
SkDrawPath* drawPath = NULL;
if (fDraw->addPath->isPath()) {
drawPath = (SkDrawPath*) fDraw->addPath;
} else {
SkApply* apply = (SkApply*) fDraw->addPath;
apply->refresh(*fMaker);
apply->activate(*fMaker);
apply->interpolate(*fMaker, SkScalarMulRound(distance, 1000));
drawPath = (SkDrawPath*) apply->getScope();
}
SkMatrix m;
m.reset();
if (fDraw->addMatrix) {
SkDrawMatrix* matrix;
if (fDraw->addMatrix->getType() == SkType_Matrix)
matrix = (SkDrawMatrix*) fDraw->addMatrix;
else {
SkApply* apply = (SkApply*) fDraw->addMatrix;
apply->refresh(*fMaker);
apply->activate(*fMaker);
apply->interpolate(*fMaker, SkScalarMulRound(distance, 1000));
matrix = (SkDrawMatrix*) apply->getScope();
}
}
SkScalar result = 0;
SkAnimatorScript::EvaluateFloat(*fMaker, NULL, fDraw->spacing.c_str(), &result);
if (drawPath)
dst->addPath(drawPath->getPath(), m);
fMaker->clearExtraPropertyCallBack(fDraw->fType);
return result;
}
示例2: reset
void SkGroup::reset() {
if (fOriginal) // has been copied
return;
int index = 0;
int max = fCopies.count() << 5;
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
if (index >= max || copySet(index) == false)
continue;
SkApply* apply = (SkApply*) *ptr;
SkASSERT(apply->isApply());
SkASSERT(apply->getScope());
*ptr = apply->getScope();
markCopyClear(index);
index++;
}
}
示例3: next
virtual void next(const SkPoint& loc, int u, int v, SkPath* dst)
{
fLoc = loc;
fU = u;
fV = v;
SkDrawPath* drawPath;
fMaker->setExtraPropertyCallBack(fDraw->fType, Get2D, this);
if (fDraw->addPath->isPath()) {
drawPath = (SkDrawPath*) fDraw->addPath;
} else {
SkApply* apply = (SkApply*) fDraw->addPath;
apply->refresh(*fMaker);
apply->activate(*fMaker);
apply->interpolate(*fMaker, v);
drawPath = (SkDrawPath*) apply->getScope();
}
if (drawPath == NULL)
goto clearCallBack;
if (fDraw->matrix) {
SkDrawMatrix* matrix;
if (fDraw->matrix->getType() == SkType_Matrix)
matrix = (SkDrawMatrix*) fDraw->matrix;
else {
SkApply* apply = (SkApply*) fDraw->matrix;
apply->activate(*fMaker);
apply->interpolate(*fMaker, v);
matrix = (SkDrawMatrix*) apply->getScope();
}
if (matrix) {
dst->addPath(drawPath->getPath(), matrix->getMatrix());
goto clearCallBack;
}
}
dst->addPath(drawPath->getPath());
clearCallBack:
fMaker->clearExtraPropertyCallBack(fDraw->fType);
}