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

Method parseRectObject

src/lottie/lottieparser.cpp:1259–1283  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1257 * https://github.com/airbnb/lottie-web/blob/master/docs/json/shapes/rect.json
1258 */
1259model::Rect *LottieParserImpl::parseRectObject()
1260{
1261 auto obj = allocator().make<model::Rect>();
1262
1263 while (const char *key = NextObjectKey()) {
1264 if (0 == strcmp(key, "nm")) {
1265 obj->setName(GetString());
1266 } else if (0 == strcmp(key, "p")) {
1267 parseProperty(obj->mPos);
1268 } else if (0 == strcmp(key, "s")) {
1269 parseProperty(obj->mSize);
1270 } else if (0 == strcmp(key, "r")) {
1271 parseProperty(obj->mRound);
1272 } else if (0 == strcmp(key, "d")) {
1273 obj->mDirection = GetInt();
1274 } else if (0 == strcmp(key, "hd")) {
1275 obj->setHidden(GetBool());
1276 } else {
1277 Skip(key);
1278 }
1279 }
1280 obj->setStatic(obj->mPos.isStatic() && obj->mSize.isStatic() &&
1281 obj->mRound.isStatic());
1282 return obj;
1283}
1284
1285/*
1286 * https://github.com/airbnb/lottie-web/blob/master/docs/json/shapes/ellipse.json

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected