MCPcopy Create free account
hub / github.com/antvis/F2Native / DoAnimation

Method DoAnimation

core/graphics/animate/GeomAnimate.cpp:376–389  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374}
375
376static void animate::DoAnimation(animate::TimeLine *timeLine_,
377 shape::Element *shape,
378 const AnimateState &startState,
379 const animate::AnimateState &endState,
380 nlohmann::json &cfg,
381 std::function<void()> onEnd) {
382// animate::AnimateState startState;
383// startState.matrix = shape->GetMatrix();
384 // todo 补充 startState 属性
385 // startState.engle = shape-> // read rect startAngle.
386 animate::AnimInfo animInfo = animate::CreateAnimInfo(shape, startState, endState, cfg);
387 animInfo.onEnd = std::move(onEnd);
388 timeLine_->PushAnim(std::move(animInfo));
389}
390
391#pragma GeomAnimate
392std::string animate::GeomAnimate::GetGeomAnimateDefaultCfg(std::string geomType, canvas::coord::AbstractCoord *coord) {

Callers

nothing calls this directly

Calls 2

CreateAnimInfoFunction · 0.85
PushAnimMethod · 0.80

Tested by

no test coverage detected