Image.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Core
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeCore/RefCountedObject.h"
16 
17 namespace cee {
18 
19 
20 //==================================================================================================
21 //
22 //
23 //
24 //==================================================================================================
25 class CEE_CORE_EXPORT Image : public RefCountedObject
26 {
27 public:
28  Image();
29  Image(const Image& other);
30  virtual ~Image();
31 
32  Image& operator=(const Image& other);
33 
34  unsigned int width() const;
35  unsigned int height() const;
36  unsigned int byteCount() const;
37  bool hasTransparentPixels() const;
38 
39  void getAsRgb(unsigned char rgbDataBuffer[], size_t bufferSizeInBytes) const;
40  void setFromRgb(const unsigned char rgbData[], unsigned int width, unsigned int height);
41 
42  void getAsRgba(unsigned char rgbaDataBuffer[], size_t bufferSizeInBytes) const;
43  void setFromRgba(const unsigned char rgbaData[], unsigned int width, unsigned int height);
44 
45  void clear();
46 
47  unsigned int version() const;
48  const unsigned char* rawPointer() const;
49 
50 private:
51  CEE_PRIVATE_IMPL(Image);
52 };
53 
54 }
Stores an RGBA image with 8 bits per pixel.
Definition: Image.h:25
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Base class for all reference counted objects with built-in support for intrusive reference counting...
Definition: RefCountedObject.h:34