X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fanimated-image%2Fanimated-image-visual.h;h=4e11ccea8abbc8535fa3256f57547fbce3d1c257;hb=ddef399f249128bef52cbb79eb321b0bfdaa0ced;hp=15dff43372a4448a3b0cefcc1ef5da6024ac6b95;hpb=80ab4492a0df45c146d9ad97daef3c522bb02e2c;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/animated-image/animated-image-visual.h b/dali-toolkit/internal/visuals/animated-image/animated-image-visual.h index 15dff43..4e11cce 100644 --- a/dali-toolkit/internal/visuals/animated-image/animated-image-visual.h +++ b/dali-toolkit/internal/visuals/animated-image/animated-image-visual.h @@ -26,6 +26,7 @@ // INTERNAL INCLUDES #include +#include namespace Dali { @@ -44,10 +45,24 @@ typedef IntrusivePtr< AnimatedImageVisual > AnimatedImageVisualPtr; * * The following property is essential * - * | %Property Name | Type | - * |--------------------------|------------------| - * | url | STRING | + * | %Property Name | Type | + * |------------------- |-------------------| + * | url | STRING | + * | pixelArea | VECTOR4 | + * | wrapModeU | INTEGER OR STRING | + * | wrapModeV | INTEGER OR STRING | * + * where pixelArea is a rectangular area. + * In its Vector4 value, the first two elements indicate the top-left position of the area, + * and the last two elements are the area width and height respectively. + * If not specified, the default value is [0.0, 0.0, 1.0, 1.0], i.e. the entire area of the image. + * + * where wrapModeU and wrapModeV separately decide how the texture should be sampled when the u and v coordinate exceeds the range of 0.0 to 1.0. + * Its value should be one of the following wrap mode: + * "DEFAULT" + * "CLAMP_TO_EDGE" + * "REPEAT" + * "MIRRORED_REPEAT" */ class AnimatedImageVisual : public Visual::Base, public ConnectionTracker @@ -63,7 +78,7 @@ public: * @param[in] properties A Property::Map containing settings for this visual * @return A smart-pointer to the newly allocated visual. */ - static AnimatedImageVisualPtr New( VisualFactoryCache& factoryCache, const std::string& imageUrl, const Property::Map& properties ); + static AnimatedImageVisualPtr New( VisualFactoryCache& factoryCache, const VisualUrl& imageUrl, const Property::Map& properties ); /** * @brief Create the animated image visual using the image URL. @@ -71,7 +86,7 @@ public: * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object * @param[in] imageUrl The URL to animated image resource to use */ - static AnimatedImageVisualPtr New( VisualFactoryCache& factoryCache, const std::string& imageUrl ); + static AnimatedImageVisualPtr New( VisualFactoryCache& factoryCache, const VisualUrl& imageUrl ); public: // from Visual @@ -85,6 +100,11 @@ public: // from Visual */ virtual void DoCreatePropertyMap( Property::Map& map ) const; + /** + * @copydoc Visual::Base::CreateInstancePropertyMap + */ + virtual void DoCreateInstancePropertyMap( Property::Map& map ) const; + protected: /** @@ -143,9 +163,13 @@ private: Timer mFrameDelayTimer; Dali::Vector mTextureRectContainer; Dali::Vector mFrameDelayContainer; - std::string mImageUrl; + Vector4 mPixelArea; + VisualUrl mImageUrl; + ImageDimensions mImageSize; uint32_t mCurrentFrameIndex; + Dali::WrapMode::Type mWrapModeU:3; + Dali::WrapMode::Type mWrapModeV:3; }; } // namespace Internal