X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fshader-effects%2Fimage-region-effect.h;h=65504c1264438793d6b4729e9ca61d708d1e9fa0;hb=542e587d36cb500e0c3b36635cf22b81b6608697;hp=a74f5b8e1e7414a35ff21f2d10f6d777451f010a;hpb=820c66e71516e7a25600b8b5de2e84b5d44d8ff3;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/shader-effects/image-region-effect.h b/dali-toolkit/devel-api/shader-effects/image-region-effect.h index a74f5b8..65504c1 100644 --- a/dali-toolkit/devel-api/shader-effects/image-region-effect.h +++ b/dali-toolkit/devel-api/shader-effects/image-region-effect.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_IMAGE_REGION_EFFECT_H__ -#define __DALI_TOOLKIT_IMAGE_REGION_EFFECT_H__ +#ifndef DALI_TOOLKIT_IMAGE_REGION_EFFECT_H +#define DALI_TOOLKIT_IMAGE_REGION_EFFECT_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,79 +19,32 @@ */ // EXTERNAL INCLUDES -#include +#include + +// INTERNAL INCLUDES +#include namespace Dali { - namespace Toolkit { - /** - * @brief ImageRegionEffect is a custom shader effect to show only a region of an Image actor. + * @brief Creates a new ImageRegionEffect + * + * ImageRegionEffect is a custom shader effect to show only a region of an Image actor. + * + * Animatable/Constrainable uniforms: + * "uTopLeft" - The top-left corner of the image region. The coordinates are in percentage, + * (0,0) being the top-left and (1,1) the bottom right of the original image + * "uBottomRight" - The bottom-right corner of the image region. The coordinates are in percentage, + * (0,0) being the top-left and (1,1) the bottom right of the original image + * + * @return A property map of the required shader */ -class DALI_IMPORT_API ImageRegionEffect : public ShaderEffect -{ -public: - - /** - * @brief Create an uninitialized ImageRegionEffect; this can be initialized with ImageRegionEffect::New(). - * - * Calling member functions with an uninitialized Dali::Object is not allowed. - */ - ImageRegionEffect(); - - /** - * @brief Destructor - * - * This is non-virtual since derived Handle types must not contain data or virtual methods. - */ - ~ImageRegionEffect(); - - /** - * @brief Create an initialized ImageRegionEffect. - * - * @return A handle to a newly allocated Dali resource. - */ - static ImageRegionEffect New(); - - /** - * @brief Set the top-left corner of the image region. - * - * The coordinates are in percentage, (0,0) being the top-left and (1,1) the bottom right of the original image. - * @param [in] point The top-left corner of the region. - */ - void SetTopLeft(const Vector2& point); - - /** - * @brief Set the bottom-right corner of the image region. - * - * The coordinates are in percentage, (0,0) being the top-left and (1,1) the bottom right of the original image. - * @param [in] point The bottom-right corner of the region. - */ - void SetBottomRight(const Vector2& point); - - /** - * @brief Get the name for the top-left point property. - * - * which can be used in Animation API's - * @return A std::string containing the property name - */ - const std::string& GetTopLeftPropertyName() const; - - /** - * @brief Get the name for the bottom-right point property which can be used in Animation APIs. - * - * @return A std::string containing the property name - */ - const std::string& GetBottomRightPropertyName() const; - -private: // Not intended for application developers - DALI_INTERNAL ImageRegionEffect(ShaderEffect handle); -}; +DALI_TOOLKIT_API Property::Map CreateImageRegionEffect(); } // namespace Toolkit } // namespace Dali -#endif // __DALI_TOOLKIT_IMAGE_REGION_EFFECT_H__ +#endif // DALI_TOOLKIT_IMAGE_REGION_EFFECT_H