MCPcopy Create free account
hub / github.com/Tencent/libpag / ModifyPropertyKeyframe

Function ModifyPropertyKeyframe

exporter/src/export/data/TextProperty.cpp:501–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499
500template <typename T>
501static void ModifyPropertyKeyframe(pag::Property<T>* property) {
502 if (property == nullptr || !property->animatable()) {
503 return;
504 }
505
506 auto animatableProperty = static_cast<pag::AnimatableProperty<T>*>(property);
507 auto& keyFrames = animatableProperty->keyframes;
508
509 for (auto& keyFrame : keyFrames) {
510 auto newKeyFrame = new pag::SingleEaseKeyframe<T>();
511 *static_cast<pag::Keyframe<T>*>(newKeyFrame) = *keyFrame;
512 newKeyFrame->initialize();
513 keyFrame = newKeyFrame;
514 }
515}
516
517static void ModififyAnimatorKeyFrames(std::vector<pag::TextAnimator*>* animators) {
518 if (animators == nullptr) {

Callers 1

Calls 2

animatableMethod · 0.45
initializeMethod · 0.45

Tested by

no test coverage detected