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

Function GetTextAnimatorColorProperties

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

Source from the content-addressed store, hash-verified

266}
267
268static pag::TextAnimatorColorProperties* GetTextAnimatorColorProperties(
269 const AEGP_StreamRefH& streamHandle) {
270 auto properties = new pag::TextAnimatorColorProperties();
271 const auto& Suites = GetSuites();
272 const auto& PluginID = GetPluginID();
273
274 A_long numStreams = 0;
275 Suites->DynamicStreamSuite4()->AEGP_GetNumStreamsInGroup(streamHandle, &numStreams);
276 for (A_long index = 0; index < numStreams; index++) {
277 AEGP_StreamRefH childStreamHandle = nullptr;
278 Suites->DynamicStreamSuite4()->AEGP_GetNewStreamRefByIndex(PluginID, streamHandle, index,
279 &childStreamHandle);
280 if (childStreamHandle == nullptr) {
281 continue;
282 }
283 if (!IsStreamHidden(childStreamHandle) || IsStreamActive(childStreamHandle)) {
284 auto type = GetTextAnimatorPropertiesType(childStreamHandle);
285 switch (type) {
286 case TextAnimatorPropertiesType::FillColor:
287 properties->fillColor = GetProperty(childStreamHandle, AEStreamParser::ColorParser);
288 break;
289 case TextAnimatorPropertiesType::StrokeColor:
290 properties->strokeColor = GetProperty(childStreamHandle, AEStreamParser::ColorParser);
291 break;
292 default:
293 break;
294 }
295 }
296 Suites->StreamSuite4()->AEGP_DisposeStream(childStreamHandle);
297 }
298 if (!properties->verify()) {
299 delete properties;
300 return nullptr;
301 }
302 return properties;
303}
304
305static pag::Property<float>* GetTextAnimatorTrackingAmount(const AEGP_StreamRefH& streamHandle) {
306 auto trackingAmount = GetProperty(streamHandle, AEStreamParser::FloatParser);

Callers 1

GetTextAnimatorFunction · 0.85

Calls 7

GetSuitesFunction · 0.85
GetPluginIDFunction · 0.85
IsStreamHiddenFunction · 0.85
IsStreamActiveFunction · 0.85
GetPropertyFunction · 0.85
verifyMethod · 0.45

Tested by

no test coverage detected