1 #ifndef __DALI_TOOLKIT_SHEAR_EFFECT_H__
2 #define __DALI_TOOLKIT_SHEAR_EFFECT_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.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
11 // http://floralicense.org/license/
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.
21 #include <dali/dali.h>
23 namespace Dali DALI_IMPORT_API
30 * ShearEffect is a custom shader effect to achieve shear effects in Image actors
32 class ShearEffect : public ShaderEffect
37 * Create an uninitialized ShearEffect; this can be initialized with ShearEffect::New()
38 * Calling member functions with an uninitialized Dali::Object is not allowed.
45 virtual ~ShearEffect();
48 * Create an initialized ShearEffect.
49 * @return A handle to a newly allocated Dali resource.
51 static ShearEffect New();
54 * Set the center point of the shear effect in screen coordinates.
55 * @param [in] center The new center point.
57 void SetCenter(const Vector2& center);
60 * Set the angle of the shear effect in the X axis.
61 * @param [in] angle The new angle.
63 void SetAngleXAxis(float angle);
66 * Set the angle of the shear effect in the Y axis.
67 * @param [in] angle The new angle.
69 void SetAngleYAxis(float angle);
72 * Get the name for the center property
73 * @return A std::string containing the property name
75 const std::string& GetCenterPropertyName() const;
78 * Get the name for the X axis property
79 * @return A std::string containing the property name
81 const std::string& GetAngleXAxisPropertyName() const;
84 * Get the name for the Y axis property
85 * @return A std::string containing the property name
87 const std::string& GetAngleYAxisPropertyName() const;
90 private: // Not intended for application developers
91 ShearEffect(ShaderEffect handle);
94 } // namespace Toolkit
98 #endif // __DALI_TOOLKIT_SHEAR_EFFECT_H__