MCPcopy Create free account
hub / github.com/Samsung/rlottie / parseFillObject

Method parseFillObject

src/lottie/lottieparser.cpp:1575–1602  ·  view source on GitHub ↗

* https://github.com/airbnb/lottie-web/blob/master/docs/json/shapes/fill.json */

Source from the content-addressed store, hash-verified

1573 * https://github.com/airbnb/lottie-web/blob/master/docs/json/shapes/fill.json
1574 */
1575model::Fill *LottieParserImpl::parseFillObject()
1576{
1577 auto obj = allocator().make<model::Fill>();
1578
1579 while (const char *key = NextObjectKey()) {
1580 if (0 == strcmp(key, "nm")) {
1581 obj->setName(GetString());
1582 } else if (0 == strcmp(key, "c")) {
1583 parseProperty(obj->mColor);
1584 } else if (0 == strcmp(key, "o")) {
1585 parseProperty(obj->mOpacity);
1586 } else if (0 == strcmp(key, "fillEnabled")) {
1587 obj->mEnabled = GetBool();
1588 } else if (0 == strcmp(key, "r")) {
1589 obj->mFillRule = getFillRule();
1590 } else if (0 == strcmp(key, "hd")) {
1591 obj->setHidden(GetBool());
1592 } else {
1593#ifdef DEBUG_PARSER
1594 vWarning << "Fill property skipped = " << key;
1595#endif
1596 Skip(key);
1597 }
1598 }
1599 obj->setStatic(obj->mColor.isStatic() && obj->mOpacity.isStatic());
1600
1601 return obj;
1602}
1603
1604/*
1605 * https://github.com/airbnb/lottie-web/blob/master/docs/json/helpers/lineCap.json

Callers

nothing calls this directly

Calls 6

GetBoolFunction · 0.85
setHiddenMethod · 0.80
GetStringFunction · 0.50
setNameMethod · 0.45
setStaticMethod · 0.45
isStaticMethod · 0.45

Tested by

no test coverage detected