#include "ShapeItem.hpp" #include "Ellipse.hpp" #include "Fill.hpp" #include "GradientFill.hpp" #include "Group.hpp" #include "GradientStroke.hpp" #include "Merge.hpp" #include "Rectangle.hpp" #include "RoundedRectangle.hpp" #include "Repeater.hpp" #include "Shape.hpp" #include "Star.hpp" #include "Stroke.hpp" #include "Trim.hpp" #include "ShapeTransform.hpp" namespace lottie { std::shared_ptr parseShapeItem(json11::Json::object const &json) noexcept(false) { auto typeRawValue = getString(json, "ty"); if (typeRawValue == "el") { return std::make_shared(json); } else if (typeRawValue == "fl") { return std::make_shared(json); } else if (typeRawValue == "gf") { return std::make_shared(json); } else if (typeRawValue == "gr") { return std::make_shared(json); } else if (typeRawValue == "gs") { return std::make_shared(json); } else if (typeRawValue == "mm") { return std::make_shared(json); } else if (typeRawValue == "rc") { return std::make_shared(json); } else if (typeRawValue == "rp") { return std::make_shared(json); } else if (typeRawValue == "sh") { return std::make_shared(json); } else if (typeRawValue == "sr") { return std::make_shared(json); } else if (typeRawValue == "st") { return std::make_shared(json); } else if (typeRawValue == "tm") { return std::make_shared(json); } else if (typeRawValue == "tr") { return std::make_shared(json); } else if (typeRawValue == "rd") { return std::make_shared(json); } else { throw LottieParsingException(); } } }