void SkGroup::setSteps(int steps) { for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) { SkDrawable* drawable = *ptr; if (drawable->isDrawable() == false) continue; drawable->setSteps(steps); } }
void SkGroup::initialize() { for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) { SkDrawable* drawable = *ptr; if (drawable->isDrawable() == false) continue; drawable->initialize(); } }
bool SkGroup::doEvent(SkDisplayEvent::Kind kind, SkEventState* state) { bool handled = false; for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) { SkDrawable* drawable = *ptr; if (drawable->isDrawable() == false) continue; handled |= drawable->doEvent(kind, state); } return handled; }
bool SkGroup::draw(SkAnimateMaker& maker) { bool conditionTrue = ifCondition(maker, this, condition); bool result = false; for (SkDrawable** ptr = fChildren.begin(); ptr < fChildren.end(); ptr++) { SkDrawable* drawable = *ptr; if (drawable->isDrawable() == false) continue; if (conditionTrue == false) { if (drawable->isApply()) ((SkApply*) drawable)->disable(); continue; } maker.validate(); result |= drawable->draw(maker); maker.validate(); } return result; }
bool SkDisplayList::draw(SkAnimateMaker& maker, SkMSec inTime) { validate(); fInTime = inTime; bool result = false; fInvalBounds.setEmpty(); if (fDrawList.count()) { for (SkActive** activePtr = fActiveList.begin(); activePtr < fActiveList.end(); activePtr++) { SkActive* active = *activePtr; active->reset(); } for (int index = 0; index < fDrawList.count(); index++) { SkDrawable* draw = fDrawList[index]; draw->initialize(); // allow matrices to reset themselves SkASSERT(draw->isDrawable()); validate(); result |= draw->draw(maker); } } validate(); return result; }