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

Function GetTextAnimators

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

Source from the content-addressed store, hash-verified

447}
448
449static std::vector<pag::TextAnimator*> GetTextAnimators(const AEGP_StreamRefH& streamHandle) {
450 const auto& Suites = GetSuites();
451 std::vector<pag::TextAnimator*> animators = {};
452
453 A_long numStreams = 0;
454 Suites->DynamicStreamSuite4()->AEGP_GetNumStreamsInGroup(streamHandle, &numStreams);
455 for (A_long index = 0; index < numStreams; index++) {
456 AEGP_StreamRefH childStreamHandle = nullptr;
457 Suites->DynamicStreamSuite4()->AEGP_GetNewStreamRefByIndex(GetPluginID(), streamHandle, index,
458 &childStreamHandle);
459 if (childStreamHandle == nullptr) {
460 continue;
461 }
462 if (!IsStreamHidden(childStreamHandle) && IsStreamActive(childStreamHandle)) {
463 auto type = GetTextAnimatorsType(childStreamHandle);
464 if (type == TextAnimatorsType::Animator) {
465 auto animator = GetTextAnimator(childStreamHandle);
466 if (animator != nullptr) {
467 animators.push_back(animator);
468 }
469 }
470 }
471 Suites->StreamSuite4()->AEGP_DisposeStream(childStreamHandle);
472 }
473
474 return animators;
475}
476
477static pag::TextPathOptions* GetTextPathOptions(const AEGP_StreamRefH& streamHandle) {
478 auto pathOptions = new pag::TextPathOptions();

Callers 1

GetTextPropertiesFunction · 0.85

Calls 7

GetSuitesFunction · 0.85
GetPluginIDFunction · 0.85
IsStreamHiddenFunction · 0.85
IsStreamActiveFunction · 0.85
GetTextAnimatorsTypeFunction · 0.85
GetTextAnimatorFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected