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

Function ModififyAnimatorKeyFrames

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

Source from the content-addressed store, hash-verified

515}
516
517static void ModififyAnimatorKeyFrames(std::vector<pag::TextAnimator*>* animators) {
518 if (animators == nullptr) {
519 return;
520 }
521
522 for (auto& animator : *animators) {
523 if (animator == nullptr) {
524 return;
525 }
526
527 for (auto& selector : animator->selectors) {
528 if (selector == nullptr || selector->type() != pag::TextSelectorType::Range) {
529 continue;
530 }
531
532 auto rangeSelector = static_cast<pag::TextRangeSelector*>(selector);
533 ModifyPropertyKeyframe(rangeSelector->start);
534 ModifyPropertyKeyframe(rangeSelector->end);
535 ModifyPropertyKeyframe(rangeSelector->offset);
536 ModifyPropertyKeyframe(rangeSelector->amount);
537 }
538 }
539}
540
541static void AdjustFirstBaseLine(pag::TextDocumentHandle textDocument, bool hasBias) {
542 if (textDocument->boxTextSize.x <= 0.001f || textDocument->boxTextSize.y <= 0.001f) {

Callers 1

GetFirstBaseLinesByPosFunction · 0.85

Calls 2

ModifyPropertyKeyframeFunction · 0.85
typeMethod · 0.45

Tested by

no test coverage detected