[dali_1.0.3] Merge branch '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    * @brief Pack the filter mode into a bitfield.
37    *
38    * @param[in] minify The minification filter.
39    * @param[in] magnify The magnification filter.
40    * @return Return the packed bitfield.
41    */
42    unsigned int PackBitfield( FilterMode::Type minify, FilterMode::Type magnify );
43
44    /**
45    * @brief Return the minification filter from a packed bitfield.
46    *
47    * @return Return the minification filter.
48    */
49    FilterMode::Type GetMinifyFilterMode( unsigned int bitfield );
50
51    /**
52    * @brief Return the magnification filter from a packed bitfield.
53    *
54    * @return Return the magnification filter.
55    */
56    FilterMode::Type GetMagnifyFilterMode( unsigned int bitfield );
57
58 } // namespace ImageSampler
59
60 } // namespace Internal
61
62 } // namespace Dali
63
64
65 #endif // __DALI_INTERNAL_IMAGE_SAMPLER_H__
66
67
68