[dali_1.0.39] Merge branch 'tizen'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / shader-effects / bubble-effect / color-adjuster.h
1 #ifndef __DALI_TOOLKIT_SHADER_COLOR_ADJUSTER_H__
2 #define __DALI_TOOLKIT_SHADER_COLOR_ADJUSTER_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
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/math/vector3.h>
23 #include <dali/public-api/shader-effects/shader-effect.h>
24
25 namespace Dali
26 {
27
28 namespace Toolkit
29 {
30
31 /**
32  * ColorAdjuster is a custom shader effect to adjust the image color in HSV space.
33  */
34 class DALI_IMPORT_API ColorAdjuster : public ShaderEffect
35 {
36 public:
37
38   /**
39    * Create an empty ColorAdjuster handle.
40    */
41   ColorAdjuster();
42
43   /**
44    * @brief Destructor
45    *
46    * This is non-virtual since derived Handle types must not contain data or virtual methods.
47    */
48   ~ColorAdjuster();
49
50   /**
51    * Create an initialized ColorAdjuster.
52    * @param[in] hsvDelta The color difference to apply to the HSV channel.
53    * @param[in] ignoreAlpha If true, the result color will be opaque even though source has alpha value
54    * @return A handle to a newly allocated Dali resource.
55    */
56   static ColorAdjuster New( const Vector3& hsvDelta, bool ignoreAlpha = false );
57
58    /**
59    * Get the name of the uHSVDelta uniform so that it can be animated
60    */
61   std::string GetHsvDeltaPropertyName() const;
62
63 private: // Not intended for application developers
64
65   DALI_INTERNAL ColorAdjuster( ShaderEffect handle );
66 };
67
68 } // namespace Toolkit
69
70 } // namespace Dali
71 #endif /* __DALI_TOOLKIT_COLOR_ADJUSTER_EFFECT_H__ */