Dali 3D User Interface Engine
image-attributes.h
Go to the documentation of this file.
1 #ifndef __DALI_INTERNAL_IMAGE_ATTRIBUTES_H__
2 #define __DALI_INTERNAL_IMAGE_ATTRIBUTES_H__
3 
4 /*
5  * Copyright (c) 2014 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 
21 // EXTERNAL INCLUDES
22 #include <stdint.h>
23 
24 // INTERNAL INCLUDES
29 
30 namespace Dali
31 {
32 namespace Internal
33 {
34 
71 {
72 public:
73 
82 
95 
97 
101  ImageAttributes();
102 
108  ImageAttributes(const ImageAttributes& rhs);
109 
117 
122 
128  static ImageAttributes New();
129 
137  static ImageAttributes New(unsigned int width, unsigned int height);
138 
149  void SetSize(unsigned int width, unsigned int height);
150 
160  void SetSize( const Size& size );
161 
168  void SetScalingMode( ScalingMode scalingMode );
169 
175  void SetFilterMode( FilterMode filterMode );
176 
194  void SetOrientationCorrection(bool enabled);
195 
203  void Reset( ImageDimensions dimensions = ImageDimensions(0, 0), ScalingMode scaling = ScalingMode(), FilterMode sampling = FilterMode(), bool orientationCorrection = true );
204 
205 
211  unsigned int GetWidth() const;
212 
218  unsigned int GetHeight() const;
219 
225  Size GetSize() const;
226 
232  ScalingMode GetScalingMode() const;
233 
240  FilterMode GetFilterMode() const;
241 
248  bool GetOrientationCorrection() const;
249 
257  friend bool operator<(const ImageAttributes& a, const ImageAttributes& b);
258 
266  friend bool operator==(const ImageAttributes& a, const ImageAttributes& b);
267 
275  friend bool operator!=(const ImageAttributes& a, const ImageAttributes& b);
276 
277 private:
278  struct ImageAttributesImpl;
279  ImageAttributesImpl* impl;
280 };
281 
289 bool operator<(const ImageAttributes& a, const ImageAttributes& b);
290 
298 bool operator==(const ImageAttributes& a, const ImageAttributes& b);
299 
307 bool operator!=(const ImageAttributes& a, const ImageAttributes& b);
308 
309 } // namespace Internal
310 } // namespace Dali
311 
312 #endif // __DALI_INTERNAL_IMAGE_ATTRIBUTES_H__
Dali Docs Home
Read more about Dali