X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fimage%2Fimage-visual.h;h=56c45fba1e49ce68c2c2a5d64132c8df14ffac5c;hp=c2eca0e3c8badb2cc4f28a46db87180e786cdc97;hb=675f5551ef3c7ca20ec45c36b865a5092883af43;hpb=f05c437df1fc28be1354e47af9dbf336828956f1 diff --git a/dali-toolkit/internal/visuals/image/image-visual.h b/dali-toolkit/internal/visuals/image/image-visual.h index c2eca0e..56c45fb 100644 --- a/dali-toolkit/internal/visuals/image/image-visual.h +++ b/dali-toolkit/internal/visuals/image/image-visual.h @@ -80,12 +80,24 @@ class ImageVisual: public Visual::Base, public ConnectionTracker, public AtlasUp public: /** - * @brief Create a new image visual. + * @brief Create a new image visual with a URL. * - * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object + * 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] 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 ); + 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. @@ -97,6 +109,7 @@ public: * @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, @@ -117,33 +130,16 @@ 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: /** - * @brief Constructor. - * - * @param[in] factoryCache The VisualFactoryCache object - */ - ImageVisual( VisualFactoryCache& factoryCache ); - - /** * @brief Constructor 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 @@ -188,6 +184,11 @@ protected: */ virtual void DoSetOffStage( Actor& actor ); + /** + * @copydoc Visual::Base::OnSetTransform + */ + virtual void OnSetTransform(); + public: /**