Merge "Ensured text mesh is centered in text actor." into tizen
[platform/core/uifw/dali-core.git] / dali / internal / common / image-sampler.h
1 #ifndef __DALI_IMAGE_SAMPLER_H__
2 #define __DALI_IMAGE_SAMPLER_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 // INTERNAL INCLUDES
22 #include <dali/public-api/actors/sampling.h>
23
24 namespace Dali
25 {
26
27 namespace Internal
28 {
29
30 /**
31  * ImageSampler represents a set of sampling settings that can be applied to a texture.
32  */
33 namespace ImageSampler
34 {
35
36   /**
37    * Determine if the minify component of the bitfield is assigned.
38    *
39    * @param[in] bitfield The packed sampler bitfield pattern.
40    * @return Return if the minify component is assigned or not.
41    */
42   bool IsMinifyAssigned( unsigned int bitfield );
43
44   /**
45    * Determine if the magnify component of the bitfield is assigned.
46    *
47    * @param[in] bitfield The packed sampler bitfield pattern.
48    * @return Return if the magnify component is assigned or not.
49    */
50   bool IsMagnifyAssigned( unsigned int bitfield );
51
52   /**
53    * @brief Return a sampler bitfield with default settings.
54    *
55    * @return Return the default sampler bit pattern.
56    */
57   unsigned int DefaultOptions();
58
59   /**
60    * @brief Pack the filter mode into a bitfield.
61    *
62    * @param[in] minify The minification filter.
63    * @param[in] magnify The magnification filter.
64    * @return Return the packed bitfield.
65    */
66    unsigned int PackBitfield( FilterMode::Type minify, FilterMode::Type magnify );
67
68    /**
69    * @brief Return the minification filter from a packed bitfield.
70    *
71    * @return Return the minification filter.
72    */
73    FilterMode::Type GetMinifyFilterMode( unsigned int bitfield );
74
75    /**
76    * @brief Return the magnification filter from a packed bitfield.
77    *
78    * @return Return the magnification filter.
79    */
80    FilterMode::Type GetMagnifyFilterMode( unsigned int bitfield );
81
82 } // namespace ImageSampler
83
84 } // namespace Internal
85
86 } // namespace Dali
87
88
89 #endif // __DALI_INTERNAL_IMAGE_SAMPLER_H__
90
91
92