+
+ map.Insert( Toolkit::ImageVisual::Property::ATLASING, mAttemptAtlasing );
+
+ if( mMaskingData != NULL )
+ {
+ map.Insert( Toolkit::ImageVisual::Property::ALPHA_MASK_URL, mMaskingData->mAlphaMaskUrl.GetUrl() );
+ map.Insert( Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE, mMaskingData->mContentScaleFactor );
+ map.Insert( Toolkit::ImageVisual::Property::CROP_TO_MASK, mMaskingData->mCropToMask );
+ }
+
+ map.Insert( Toolkit::ImageVisual::Property::LOAD_POLICY, mLoadPolicy );
+ map.Insert( Toolkit::ImageVisual::Property::RELEASE_POLICY, mReleasePolicy );
+ map.Insert( Toolkit::ImageVisual::Property::ORIENTATION_CORRECTION, mOrientationCorrection );
+}
+
+void ImageVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
+{
+ map.Clear();
+ map.Insert( Toolkit::Visual::Property::TYPE, Toolkit::Visual::IMAGE );
+ if( mImageUrl.IsValid() )
+ {
+ map.Insert( Toolkit::ImageVisual::Property::DESIRED_WIDTH, mDesiredSize.GetWidth() );
+ map.Insert( Toolkit::ImageVisual::Property::DESIRED_HEIGHT, mDesiredSize.GetHeight() );
+ }
+ else if( mImage )
+ {
+ map.Insert( Toolkit::ImageVisual::Property::DESIRED_WIDTH, static_cast<int>(mImage.GetWidth()) );
+ map.Insert( Toolkit::ImageVisual::Property::DESIRED_HEIGHT, static_cast<int>(mImage.GetHeight()) );
+ }
+}
+
+void ImageVisual::OnDoAction( const Dali::Property::Index actionName, const Dali::Property::Value& attributes )
+{
+ // Check if action is valid for this visual type and perform action if possible
+
+ switch ( actionName )
+ {
+ case DevelImageVisual::Action::RELOAD:
+ {
+ auto attemptAtlasing = AttemptAtlasing();
+ LoadTexture( attemptAtlasing, mAtlasRect, mTextures, mOrientationCorrection,
+ TextureManager::ReloadPolicy::FORCED );
+ break;
+ }
+ }