X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fimage%2Fimage-visual.h;h=c2ea067b718403b4414ec1d9fdea5050bd57855d;hb=d6f1c901d74aef4e66ffb6565bb61de952a090a3;hp=7ad511fdc755cf6ec8cc1b04f8d48598b447fb3f;hpb=07b1b771c6a3affaf013f93c1306723eae0621e4;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/image/image-visual.h b/dali-toolkit/internal/visuals/image/image-visual.h index 7ad511f..c2ea067 100644 --- a/dali-toolkit/internal/visuals/image/image-visual.h +++ b/dali-toolkit/internal/visuals/image/image-visual.h @@ -86,9 +86,30 @@ public: * * @param[in] factoryCache The VisualFactoryCache object * @param[in] imageUrl The URL of the image resource to use + * @param[in] properties A Property::Map containing settings for this visual * @param[in] size The width and height to fit the loaded image to. * @param[in] fittingMode The FittingMode of the resource to load * @param[in] samplingMode The SamplingMode of the resource to load + * @return A smart-pointer to the newly allocated visual. + */ + static ImageVisualPtr New( VisualFactoryCache& factoryCache, + const std::string& imageUrl, + const Property::Map& properties, + ImageDimensions size = ImageDimensions(), + FittingMode::Type fittingMode = FittingMode::DEFAULT, + Dali::SamplingMode::Type samplingMode = SamplingMode::BOX_THEN_LINEAR ); + + /** + * @brief Create a new image visual with a URL. + * + * The visual will load the Image asynchronously when the associated actor is put on stage, and destroy the image when it is off stage + * + * @param[in] factoryCache The VisualFactoryCache object + * @param[in] imageUrl The URL of the image resource to use + * @param[in] size The width and height to fit the loaded image to. + * @param[in] fittingMode The FittingMode of the resource to load + * @param[in] samplingMode The SamplingMode of the resource to load + * @return A smart-pointer to the newly allocated visual. */ static ImageVisualPtr New( VisualFactoryCache& factoryCache, const std::string& imageUrl, @@ -109,23 +130,13 @@ public: // from Visual /** * @copydoc Visual::Base::GetNaturalSize */ - virtual void GetNaturalSize( Vector2& naturalSize ) const; + virtual void GetNaturalSize( Vector2& naturalSize ); /** * @copydoc Visual::Base::CreatePropertyMap */ virtual void DoCreatePropertyMap( Property::Map& map ) const; - /** - * @copydoc Visual::Base::DoSetProperty - */ - virtual void DoSetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue ); - - /** - * @copydoc Visual::Base::DoGetProperty - */ - virtual Dali::Property::Value DoGetProperty( Dali::Property::Index index ); - protected: /** @@ -269,6 +280,13 @@ private: */ void CleanCache(const std::string& url); + /** + * Helper method to set individual values by index key. + * @param[in] index The index key of the value + * @param[in] value The value + */ + void DoSetProperty( Property::Index index, const Property::Value& value ); + private: Image mImage;