9 #include "animation/animation.hpp"
10 #include "animation/linear_animation.hpp"
11 #include "animation/linear_animation_instance.hpp"
12 #include "artboard.hpp"
13 #include "core/binary_reader.hpp"
15 #include "math/aabb.hpp"
16 #include "skia_renderer.hpp"
20 class RiveFrameExtractor
24 RiveFrameExtractor(const char* path,
25 const char* artboard_name,
26 const char* animation_name,
27 const char* watermark_name,
30 int small_extent_target = 0,
36 ~RiveFrameExtractor();
43 const void* getPixelAddresses();
44 sk_sp<SkData> getSkData();
47 int _width, _height, _min_duration, _max_duration;
50 sk_sp<SkImage> getWaterMark(const char* watermark_name);
51 rive::File* getRiveFile(const char* path);
52 rive::Artboard* getArtboard(const char* artboard_name);
53 rive::LinearAnimation* getAnimation(const char* artboard_name);
54 rive::Artboard* artboard;
55 rive::LinearAnimation* animation;
56 rive::LinearAnimationInstance* animation_instance;
57 sk_sp<SkImage> watermarkImage;
58 SkCanvas* rasterCanvas;
59 sk_sp<SkSurface> rasterSurface;
60 sk_sp<SkImage> getSnapshot();
61 void initializeDimensions(int width,
63 int small_extent_target,