| 182 | view7->setRepeatMode(LottieView::RepeatMode::Reverse); |
| 183 | } |
| 184 | void Demo8(EvasApp *app, std::string &filePath) { |
| 185 | /* Transform + color */ |
| 186 | view8.reset(new LottieView(app->evas())); |
| 187 | view8->setFilePath(filePath.c_str()); |
| 188 | if (view8->player()) { |
| 189 | view8->player()->setValue<rlottie::Property::TrRotation>("Shape Layer 1.Ellipse 1", |
| 190 | [](const rlottie::FrameInfo& info) { |
| 191 | return info.curFrame() * 20; |
| 192 | }); |
| 193 | view8->player()->setValue<rlottie::Property::TrScale>("Shape Layer 1.Ellipse 1", |
| 194 | [](const rlottie::FrameInfo& info) { |
| 195 | return rlottie::Size(50, 100 - info.curFrame()); |
| 196 | }); |
| 197 | view8->player()->setValue<rlottie::Property::TrPosition>("Shape Layer 1.Ellipse 1", |
| 198 | [](const rlottie::FrameInfo& info) { |
| 199 | return rlottie::Point(-20 + (double)info.curFrame()/2.0, |
| 200 | -20 + (double)info.curFrame()/2.0); |
| 201 | }); |
| 202 | view8->player()->setValue<rlottie::Property::FillColor>("Shape Layer 1.Ellipse 1.Fill 1", |
| 203 | [](const rlottie::FrameInfo& info) { |
| 204 | if (info.curFrame() < 60 ) |
| 205 | return rlottie::Color(0, 0, 1); |
| 206 | else { |
| 207 | return rlottie::Color(1, 0, 0); |
| 208 | } |
| 209 | }); |
| 210 | } |
| 211 | view8->setPos(2100, 0); |
| 212 | view8->setSize(300, 300); |
| 213 | view8->show(); |
| 214 | view8->play(); |
| 215 | view8->loop(true); |
| 216 | view8->setRepeatMode(LottieView::RepeatMode::Reverse); |
| 217 | } |
| 218 | private: |
| 219 | std::unique_ptr<LottieView> view1; |
| 220 | std::unique_ptr<LottieView> view2; |
nothing calls this directly
no test coverage detected