diff options
Diffstat (limited to 'thirdparty/thorvg/src/renderer/tvgFrameModule.h')
-rw-r--r-- | thirdparty/thorvg/src/renderer/tvgFrameModule.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/thirdparty/thorvg/src/renderer/tvgFrameModule.h b/thirdparty/thorvg/src/renderer/tvgFrameModule.h index df97ccb894..37d01e050d 100644 --- a/thirdparty/thorvg/src/renderer/tvgFrameModule.h +++ b/thirdparty/thorvg/src/renderer/tvgFrameModule.h @@ -31,6 +31,9 @@ namespace tvg class FrameModule: public ImageLoader { public: + float segmentBegin = 0.0f; + float segmentEnd = 1.0f; + FrameModule(FileType type) : ImageLoader(type) {} virtual ~FrameModule() {} @@ -39,6 +42,18 @@ public: virtual float curFrame() = 0; //return the current frame number virtual float duration() = 0; //return the animation duration in seconds + void segment(float* begin, float* end) + { + if (begin) *begin = segmentBegin; + if (end) *end = segmentEnd; + } + + void segment(float begin, float end) + { + segmentBegin = begin; + segmentEnd = end; + } + virtual bool animatable() override { return true; } }; |