| 86 | } |
| 87 | |
| 88 | void Demo3(EvasApp *app, std::string &filePath) { |
| 89 | /* Stroke Opacity */ |
| 90 | view3.reset(new LottieView(app->evas())); |
| 91 | view3->setFilePath(filePath.c_str()); |
| 92 | if (view3->player()) { |
| 93 | view3->player()->setValue<rlottie::Property::StrokeWidth>("**", |
| 94 | [](const rlottie::FrameInfo& info) { |
| 95 | if (info.curFrame() < 60 ) |
| 96 | return 1.0; |
| 97 | else { |
| 98 | return 5.0; |
| 99 | } |
| 100 | }); |
| 101 | } |
| 102 | view3->setPos(600, 0); |
| 103 | view3->setSize(300, 300); |
| 104 | view3->show(); |
| 105 | view3->play(); |
| 106 | view3->loop(true); |
| 107 | view3->setRepeatMode(LottieView::RepeatMode::Reverse); |
| 108 | } |
| 109 | |
| 110 | void Demo4(EvasApp *app, std::string &filePath) { |
| 111 | /* Transform position */ |