/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/anidecod.h
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/anidecod.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (9 years, 5 months ago) by william
File MIME type: text/plain
File size: 2500 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/anidecod.h
3 // Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation
4 // Author: Francesco Montorsi
5 // CVS-ID: $Id: anidecod.h 45563 2007-04-21 18:17:50Z VZ $
6 // Copyright: (c) 2006 Francesco Montorsi
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_ANIDECOD_H
11 #define _WX_ANIDECOD_H
12
13 #include "wx/defs.h"
14
15 #if wxUSE_STREAMS && wxUSE_ICO_CUR
16
17 #include "wx/stream.h"
18 #include "wx/image.h"
19 #include "wx/animdecod.h"
20 #include "wx/dynarray.h"
21
22
23 class /*WXDLLEXPORT*/ wxANIFrameInfo;
24
25 WX_DECLARE_EXPORTED_OBJARRAY(wxANIFrameInfo, wxANIFrameInfoArray);
26 WX_DECLARE_EXPORTED_OBJARRAY(wxImage, wxImageArray);
27
28 // --------------------------------------------------------------------------
29 // wxANIDecoder class
30 // --------------------------------------------------------------------------
31
32 class WXDLLEXPORT wxANIDecoder : public wxAnimationDecoder
33 {
34 public:
35 // constructor, destructor, etc.
36 wxANIDecoder();
37 ~wxANIDecoder();
38
39
40 virtual wxSize GetFrameSize(unsigned int frame) const;
41 virtual wxPoint GetFramePosition(unsigned int frame) const;
42 virtual wxAnimationDisposal GetDisposalMethod(unsigned int frame) const;
43 virtual long GetDelay(unsigned int frame) const;
44 virtual wxColour GetTransparentColour(unsigned int frame) const;
45
46 // implementation of wxAnimationDecoder's pure virtuals
47 virtual bool CanRead( wxInputStream& stream ) const;
48 virtual bool Load( wxInputStream& stream );
49
50 bool ConvertToImage(unsigned int frame, wxImage *image) const;
51
52 wxAnimationDecoder *Clone() const
53 { return new wxANIDecoder; }
54 wxAnimationType GetType() const
55 { return wxANIMATION_TYPE_ANI; }
56
57 private:
58 // frames stored as wxImage(s): ANI files are meant to be used mostly for animated
59 // cursors and thus they do not use any optimization to encode differences between
60 // two frames: they are just a list of images to display sequentially.
61 wxImageArray m_images;
62
63 // the info about each image stored in m_images.
64 // NB: m_info.GetCount() may differ from m_images.GetCount()!
65 wxANIFrameInfoArray m_info;
66
67 // this is the wxCURHandler used to load the ICON chunk of the ANI files
68 static wxCURHandler sm_handler;
69
70
71 DECLARE_NO_COPY_CLASS(wxANIDecoder)
72 };
73
74
75 #endif // wxUSE_STREAM && wxUSE_ICO_CUR
76
77 #endif // _WX_ANIDECOD_H

  ViewVC Help
Powered by ViewVC 1.1.22