| 499 | |
| 500 | template <typename T> |
| 501 | static 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 | |
| 517 | static void ModififyAnimatorKeyFrames(std::vector<pag::TextAnimator*>* animators) { |
| 518 | if (animators == nullptr) { |
no test coverage detected