22#include <kiwano/2d/Actor.h>
23#include <kiwano/core/Resource.h>
24#include <kiwano/render/GifImage.h>
25#include <kiwano/render/RenderContext.h>
84 void SetLoopCount(
int loops);
100 void RestartAnimation();
121 bool IsLastFrame()
const;
125 bool EndOfAnimation()
const;
129 void ComposeNextFrame();
133 void DisposeCurrentFrame();
137 void OverlayNextFrame();
141 void SaveComposedFrame();
145 void RestoreSavedFrame();
149 void ClearCurrentFrameArea();
153 int total_loop_count_;
170 total_loop_count_ = loops;
198inline bool GifSprite::IsLastFrame()
const
200 return (next_index_ == 0);
203inline bool GifSprite::EndOfAnimation()
const
205 return IsLastFrame() && loop_count_ == total_loop_count_ + 1;
GIF 精灵
Definition: GifSprite.h:40
RefPtr< GifImage > GetGifImage() const
获取 GIF 图片
Definition: GifSprite.h:193
DoneCallback GetDoneCallback() const
获取 GIF 动画播放结束回调
Definition: GifSprite.h:188
void SetLoopCount(int loops)
设置 GIF 动画循环次数
Definition: GifSprite.h:168
void SetDoneCallback(const DoneCallback &cb)
设置 GIF 动画结束回调函数
Definition: GifSprite.h:178
LoopDoneCallback GetLoopDoneCallback() const
获取 GIF 动画循环结束回调
Definition: GifSprite.h:183
void SetLoopDoneCallback(const LoopDoneCallback &cb)
设置 GIF 动画每次循环结束回调函数
Definition: GifSprite.h:173
引用计数智能指针
Definition: RefBasePtr.hpp:35
渲染上下文
Definition: RenderContext.h:62
资源
Definition: Resource.h:41
时间段
Definition: Duration.h:48
GIF帧
Definition: GifImage.h:88