Dali 3D User Interface Engine
pixel-data.h
Go to the documentation of this file.
1 #ifndef __DALI_PIXEL_DATA_H__
2 #define __DALI_PIXEL_DATA_H__
3 
4 /*
5  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20 
23 
24 namespace Dali
25 {
26 
27 class PixelData;
29 
37 {
38 public:
39 
41  {
42  FREE,
44  };
45 
55  static PixelDataPtr New( unsigned char* buffer,
56  unsigned int width,
57  unsigned int height,
58  Pixel::Format pixelFormat,
59  ReleaseFunction releaseFunction);
60 
65  unsigned int GetWidth() const;
66 
71  unsigned int GetHeight() const;
72 
77  Pixel::Format GetPixelFormat() const;
78 
83  unsigned char* GetBuffer() const;
84 
85 public:
86 
96  PixelData( unsigned char* buffer,
97  unsigned int width,
98  unsigned int height,
99  Pixel::Format pixelFormat,
100  ReleaseFunction releaseFunction );
101 
107  ~PixelData();
108 
109 
110 private:
111 
112  /*
113  * Undefined copy constructor.
114  */
115  PixelData(const PixelData& other);
116 
117  /*
118  * Undefined assignment operator.
119  */
120  PixelData& operator = (const PixelData& other);
121 
122 private:
123 
124  unsigned char* mBuffer;
125  unsigned int mWidth;
126  unsigned int mHeight;
129 };
130 
131 
132 } //namespace Dali
133 
134 #endif // __DALI_PIXEL_DATA_H__
Dali Docs Home
Read more about Dali