wxArt2D
imagergba.h
Go to the documentation of this file.
1 /*! \file wx/genart/imagergba.h
2  \brief Contains image with RGBA per pixel
3 
4  \author Klaas Holwerda
5 
6  Copyright: 2000-2004 (c) Klaas Holwerda
7 
8  Licence: wxWidgets Licence
9 
10  RCS-ID: $Id: imagergba.h,v 1.2 2009/09/02 20:01:23 titato Exp $
11 */
12 
13 #ifndef __WXIMAGERGBA_H__
14 #define __WXIMAGERGBA_H__
15 
16 #ifndef WX_PRECOMP
17 #include "wx/wx.h"
18 #endif
19 
20 
21 #include "wx/image.h"
22 #include "wx/prntbase.h"
23 
25 {
26 public:
27  a2dImageRGBA( int width = 0, int height = 0 );
28 
29  a2dImageRGBA( const wxImage& image, unsigned char alpha = 255 );
30 
31  ~a2dImageRGBA();
32 
33  a2dImageRGBA& operator=( const a2dImageRGBA& other );
34 
35  wxImage GetImage() const;
36 
37  a2dImageRGBA* GetSubImage( const wxRect& rect ) const;
38 
39  wxBitmap CreateBitmap();
40 
41  int GetWidth() const { return m_width; }
42  int GetHeight() const { return m_height; }
43 
44  void SetAlpha( unsigned char alpha );
45 
46  void SetAlpha( unsigned char* alphadata );
47 
48  unsigned char* GetData() const { return m_glimage; }
49 
50  bool GetOrder() { return m_rgbOrder; }
51 
52  void SetOrder( bool orderRgba ) { m_rgbOrder = orderRgba; }
53 
54 private:
55 
56  unsigned char* m_glimage;
57 
58  int m_height;
59  int m_width;
60 
61  bool m_rgbOrder;
62 };
63 
64 #endif /* __WXIMAGERGBA_H__ */
65 
imagergba.h Source File -- Sun Oct 12 2014 17:04:21 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation