| 64 | } |
| 65 | |
| 66 | void Demo2(EvasApp *app, std::string &filePath) { |
| 67 | /* Stroke Opacity */ |
| 68 | view2.reset(new LottieView(app->evas())); |
| 69 | view2->setFilePath(filePath.c_str()); |
| 70 | if (view2->player()) { |
| 71 | view2->player()->setValue<rlottie::Property::StrokeOpacity>("Shape Layer 2.Shape 1.Stroke 1", |
| 72 | [](const rlottie::FrameInfo& info) { |
| 73 | if (info.curFrame() < 60 ) |
| 74 | return 20; |
| 75 | else { |
| 76 | return 100; |
| 77 | } |
| 78 | }); |
| 79 | } |
| 80 | view2->setPos(300, 0); |
| 81 | view2->setSize(300, 300); |
| 82 | view2->show(); |
| 83 | view2->play(); |
| 84 | view2->loop(true); |
| 85 | view2->setRepeatMode(LottieView::RepeatMode::Reverse); |
| 86 | } |
| 87 | |
| 88 | void Demo3(EvasApp *app, std::string &filePath) { |
| 89 | /* Stroke Opacity */ |