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

Function GetTextBackground

exporter/src/export/data/Effect.cpp:434–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

432}
433
434static void GetTextBackground(const AEGP_StreamRefH& streamHandle,
435 pag::Property<pag::TextDocumentHandle>* textDocument) {
436 auto backgroundColor =
437 GetValue(streamHandle, "ADBE Text Background-0001", AEStreamParser::ColorParser);
438 auto backgroundAlpha =
439 GetValue(streamHandle, "ADBE Text Background-0002", AEStreamParser::Opacity0_100Parser);
440 if (textDocument->animatable()) {
441 for (auto& keyframe :
442 reinterpret_cast<pag::AnimatableProperty<pag::TextDocumentHandle>*>(textDocument)
443 ->keyframes) {
444 keyframe->startValue->backgroundColor = backgroundColor;
445 keyframe->startValue->backgroundAlpha = backgroundAlpha;
446 keyframe->endValue->backgroundColor = backgroundColor;
447 keyframe->endValue->backgroundAlpha = backgroundAlpha;
448 }
449 } else {
450 auto document = textDocument->getValueAt(0);
451 document->backgroundColor = backgroundColor;
452 document->backgroundAlpha = backgroundAlpha;
453 }
454}
455
456static pag::ImageFillRule* GetImageFillRule(const AEGP_StreamRefH& streamHandle, float frameRate,
457 uint16_t tagLevel, AEEffectType type) {

Callers 1

GetAttachmentFunction · 0.85

Calls 3

GetValueFunction · 0.85
animatableMethod · 0.45
getValueAtMethod · 0.45

Tested by

no test coverage detected