void SkActive::initState(SkApply* apply, int offset) { int count = fState.count(); for (int index = offset; index < count; index++) { SkState& state = fState[index]; SkAnimateBase* animate = fAnimators[index]; #if 0 // def SK_DEBUG if (animate->fHasEndEvent) SkDebugf("%8x %8x active initState:\n", this, animate); #endif SkOperand* from = animate->getValues(); state.fStartTime = state.fBegin = apply->begin + animate->begin; state.fMode = apply->mode; state.fTransition = apply->transition; #if 0 state.fPickup = (SkBool8) apply->pickup; #endif state.fRestore = (SkBool8) apply->restore; state.fSave = apply->begin; state.fStarted = false; state.fSteps = apply->steps; state.fTicks = 0; state.fUnpostedEndEvent = (SkBool8) animate->fHasEndEvent; calcDurations(index); setInterpolator(index, from); } if (count == 0 && (apply->mode == SkApply::kMode_immediate || apply->mode == SkApply::kMode_create)) fMaxTime = apply->begin + apply->steps * SK_MSec1; }
void SkActive::resetInterpolators() { int animators = fAnimators.count(); for (int index = 0; index < animators; index++) { SkAnimateBase* animate = fAnimators[index]; SkOperand* values = animate->getValues(); setInterpolator(index, values); } }
void margModule::updateSettings() { if(bAddressSet) { setBlobFinder(*blobMinArea, *blobMaxArea, *blobNConsidered, blobFindThreshMin, blobFindThreshMax); setCameraMatrix(correctFX, correctFY, correctCX, correctCY); setDistCoeffs(correctRdX, correctRdY, correctTgX, correctTgY); setInterpolator(*blobPairMaxDist, *blobPairMaxAreaDiff, *blobPairMaxUnfitness); setTrailMaker(*trailExpConst, *trailFadeConst, *trailBlurLevel); setMode(*modMode, *modDrawBlobs, *modDrawWhichBlobs, *modAdjQuad, *modAdjWhichQuad); } }
void SkActive::fixInterpolator(SkBool save) { int animators = fAnimators.count(); for (int index = 0; index < animators; index++) { SkAnimateBase* animate = fAnimators[index]; if (save) { // saved slots increased animate->refresh(fMaker); SkOperand* values = animate->getValues(); setInterpolator(index, values); saveInterpolatorValues(index); } else restoreInterpolatorValues(index); } }