Welcome to mirror list, hosted at ThFree Co, Russian Federation.

LCDAnimatedBitmap.h « LCDUI « ui « src - github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ee0386aafe5f4cad92fef922a637b2415fddaaa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//************************************************************************
//
// LCDAnimatedBitmap.h
//
// The CLCDAnimatedBitmap class draws animated bitmaps onto the LCD.
// An animated bitmap consists of a tiled bitmap representing the
// animation. The tile size is set with the SetSubpicWidth.
//
// Logitech LCD SDK
//
// Copyright 2005 Logitech Inc.
//************************************************************************

#ifndef _LCDANIMATEDBITMAP_H_INCLUDED_
#define _LCDANIMATEDBITMAP_H_INCLUDED_

#include "LCDBase.h"
#include "LCDBitmap.h"

class CLCDAnimatedBitmap : public CLCDBitmap
{
public:
    CLCDAnimatedBitmap();
    virtual ~CLCDAnimatedBitmap();

    virtual HRESULT Initialize(void);
    virtual void ResetUpdate(void);

    void SetSubpicWidth(DWORD dwWidth);
    void SetAnimationRate(DWORD dwRate);    // milliseconds/subpicture

protected:
    virtual void OnUpdate(DWORD dwTimestamp);
    virtual void OnDraw(CLCDGfx &rGfx);

private:
    DWORD m_dwElapsedTime;  // elapsed time in state
    DWORD m_dwRate;         // milliseconds per subpicture
    DWORD m_dwLastUpdate;   // milliseconds

    DWORD m_dwSubpicWidth;
    DWORD m_dwCurrSubpic;
    DWORD m_dwTotalSubpics;
};


#endif // !_LCDANIMATEDBITMAP_H_INCLUDED_ 

//** end of LCDBitmap.h **************************************************