zoukankan      html  css  js  c++  java
  • LibGif For WinCE release V1.0

     基于LibUnGif。我的目标是剥离出一套最小的,支持背景透明的,能在WinCE(PocketPC/SmartPhone)上运行的动画GIF库。

    做的工作主要是几方面:
    1) 增加了透明支持
    2) 去掉了WinCE上不必要的一切函数
    3) 写了一个Sample Code

    使用方法
    1)初始化Gif动画
    GifWin gif;   gif.Open(gifContentBuffer, gifContentLen, RGB(0xff, 0xff, 0xff));   delay = gif.NextImage();   SetTimer(hWnd, GIF_TIMER_ID, delay, NULL);  
    view plaincopy to clipboardprint?
    GifWin gif; gif.Open(gifContentBuffer, gifContentLen, RGB(0xff, 0xff, 0xff)); delay = gif.NextImage(); SetTimer(hWnd, GIF_TIMER_ID, delay, NULL);   GifWin gif; gif.Open(gifContentBuffer, gifContentLen, RGB(0xff, 0xff, 0xff)); delay = gif.NextImage(); SetTimer(hWnd, GIF_TIMER_ID, delay, NULL);
    2)显示Gif动画
    view plainprint?
    WM_TIMER:        gif.Draw(hdc, left, top, right, bottom);        InvalidateRect(hdc, &rect, FALSE);        delay = gif.NextImage();        if (delay <= 0) {             gif.Reset();             delay = gif.NextImage();        }        SetTimer(hWnd, GIF_TIMER_ID, delay, NULL);   view plaincopy to clipboardprint?
    WM_TIMER:      gif.Draw(hdc, left, top, right, bottom);      InvalidateRect(hdc, &rect, FALSE);      delay = gif.NextImage();      if (delay <= 0) {           gif.Reset();           delay = gif.NextImage();      }      SetTimer(hWnd, GIF_TIMER_ID, delay, NULL);   WM_TIMER:      gif.Draw(hdc, left, top, right, bottom);      InvalidateRect(hdc, &rect, FALSE);      delay = gif.NextImage();      if (delay <= 0) {           gif.Reset();           delay = gif.NextImage();      }      SetTimer(hWnd, GIF_TIMER_ID, delay, NULL);
    3)释放Gif动画
    gif.Close();  
    view plaincopy to clipboardprint?
    gif.Close();   gif.Close();
    严格遵循GPL,完整源代码下载: 点击这里下载文件
  • 相关阅读:
    18-[模块]-shutil
    4-linux基本命令
    代码重构之移除对参数的赋值
    代码重构之分解临时变量
    代码重构之引入解释性变量
    代码重构之以查询取代临时变量
    代码重构之内联临时变量
    代码重构之内联函数
    代码重构之提取方法
    JQuery EasyUI validate 扩展
  • 原文地址:https://www.cnblogs.com/googlegis/p/2979235.html
Copyright © 2011-2022 走看看