HiEasyX
Ver 0.3.0
EasyX 全面扩展库
|
#include <HiGif.h>
Public 成员函数 | |
Gif (const WCHAR *gifFileName=nullptr, HDC hdc=GetImageHDC()) | |
Gif (const Gif &gif) | |
virtual | ~Gif () |
Gif & | operator= (const Gif &gif) |
void | load (const WCHAR *gifFileName) |
加载图像 更多... | |
void | bind (HDC hdc) |
绑定设备 更多... | |
void | clear () |
清空图像 更多... | |
void | setPos (int x, int y) |
void | setSize (int width, int height) |
int | getX () const |
int | getY () const |
int | getWidth () const |
int | getHeight () const |
int | getOrginWidth () const |
int | getOrginHeight () const |
int | getFrameCount () const |
int | getCurFrame () const |
int | getDelayTime (int frame) const |
void | setDelayTime (int frame, long time_ms) |
void | setAllDelayTime (long time_ms) |
void | updateTime () |
void | draw () |
void | draw (int x, int y) |
void | drawFrame (int frame) |
void | drawFrame (int frame, int x, int y) |
void | getimage (IMAGE *pimg, int frame) |
获取图像 更多... | |
void | play () |
void | pause () |
void | toggle () |
bool | IsPlaying () const |
void | setVisible (bool enable) |
bool | IsVisible () const |
bool | IsAnimation () const |
void | resetPlayState () |
重置播放状态 更多... | |
void | info () const |
Gif 动图
使用方法: 1. load 加载图像 2. bind 绑定输出 HDC 3. (可选)setPos 设置位置 4. (可选)setSize 设置缩放大小(为 0 表示原图大小) 5. play 开始播放 6. draw 绘制到 HDC
1. 释放时可能崩溃 2. 对绑定的 HDC 调整大小可能导致崩溃
HiEasyX::Gif::Gif | ( | const WCHAR * | gifFileName = nullptr , |
HDC | hdc = GetImageHDC() |
||
) |
|
virtual |
void HiEasyX::Gif::bind | ( | HDC | hdc | ) |
void HiEasyX::Gif::clear | ( | ) |
void HiEasyX::Gif::draw | ( | int | x, |
int | y | ||
) |
void HiEasyX::Gif::drawFrame | ( | int | frame | ) |
void HiEasyX::Gif::drawFrame | ( | int | frame, |
int | x, | ||
int | y | ||
) |
int HiEasyX::Gif::getDelayTime | ( | int | frame | ) | const |
void HiEasyX::Gif::getimage | ( | IMAGE * | pimg, |
int | frame | ||
) |
int HiEasyX::Gif::getOrginHeight | ( | ) | const |
int HiEasyX::Gif::getOrginWidth | ( | ) | const |
void HiEasyX::Gif::info | ( | ) | const |
|
inline |
void HiEasyX::Gif::load | ( | const WCHAR * | gifFileName | ) |
void HiEasyX::Gif::pause | ( | ) |
void HiEasyX::Gif::play | ( | ) |
void HiEasyX::Gif::resetPlayState | ( | ) |
void HiEasyX::Gif::setAllDelayTime | ( | long | time_ms | ) |
void HiEasyX::Gif::setDelayTime | ( | int | frame, |
long | time_ms | ||
) |
void HiEasyX::Gif::setPos | ( | int | x, |
int | y | ||
) |
void HiEasyX::Gif::setSize | ( | int | width, |
int | height | ||
) |
|
inline |
void HiEasyX::Gif::updateTime | ( | ) |