本文整理汇总了C++中SkDrawable::isGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ SkDrawable::isGroup方法的具体用法?C++ SkDrawable::isGroup怎么用?C++ SkDrawable::isGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SkDrawable
的用法示例。
在下文中一共展示了SkDrawable::isGroup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SearchForMatch
int SkDisplayList::SearchForMatch(SkDrawable* match, SkTDDrawableArray** list,
SkGroup** parent, SkGroup** found, SkTDDrawableArray**grandList) {
*found = NULL;
for (int index = 0; index < (*list)->count(); index++) {
SkDrawable* draw = (**list)[index];
if (draw == match)
return index;
if (draw->isApply()) {
SkApply* apply = (SkApply*) draw;
if (apply->scope == match)
return index;
if (apply->scope->isGroup() && SearchGroupForMatch(apply->scope, match, list, parent, found, grandList, index))
return index;
if (apply->mode == SkApply::kMode_create) {
for (SkDrawable** ptr = apply->fScopes.begin(); ptr < apply->fScopes.end(); ptr++) {
SkDrawable* scope = *ptr;
if (scope == match)
return index;
//perhaps should call SearchGroupForMatch here as well (on scope)
}
}
}
if (draw->isGroup() && SearchGroupForMatch(draw, match, list, parent, found, grandList, index))
return index;
}
return -1;
}
示例2: findGroup
int SkGroup::findGroup(SkDrawable* match, SkTDDrawableArray** list,
SkGroup** parent, SkGroup** found, SkTDDrawableArray** grandList) {
*list = &fChildren;
for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) {
SkDrawable* drawable = *ptr;
if (drawable->isGroup()) {
SkGroup* childGroup = (SkGroup*) drawable;
if (childGroup->fOriginal == match)
goto foundMatch;
}
if (drawable == match) {
foundMatch:
*parent = this;
return (int) (ptr - fChildren.begin());
}
}
*grandList = &fChildren;
return SkDisplayList::SearchForMatch(match, list, parent, found, grandList);
}