+
+ Property::Value* borderValue = propertyMap.Find( Toolkit::ImageVisual::Property::BORDER, BORDER );
+ if( borderValue && ! borderValue->Get( mBorder ) ) // If value exists and is rect, just set mBorder
+ {
+ // Not a rect so try vector4
+ Vector4 border;
+ if( borderValue->Get( border ) )
+ {
+ mBorder.left = static_cast< int >( border.x );
+ mBorder.right = static_cast< int >( border.y );
+ mBorder.bottom = static_cast< int >( border.z );
+ mBorder.top = static_cast< int >( border.w );
+ }
+ }
+
+ Property::Value* auxImage = propertyMap.Find( Toolkit::DevelImageVisual::Property::AUXILIARY_IMAGE, AUXILIARY_IMAGE_NAME );
+ if( auxImage )
+ {
+ std::string url;
+ if( auxImage->Get( url ) )
+ {
+ mAuxiliaryUrl = url;
+ }
+ }
+
+ Property::Value* auxImageAlpha = propertyMap.Find( Toolkit::DevelImageVisual::Property::AUXILIARY_IMAGE_ALPHA, AUXILIARY_IMAGE_ALPHA_NAME );
+ if( auxImageAlpha )
+ {
+ auxImageAlpha->Get( mAuxiliaryImageAlpha );
+ }
+}
+
+void NPatchVisual::DoSetOnStage( Actor& actor )
+{
+ // load when first go on stage
+ LoadImages();
+
+ Geometry geometry = CreateGeometry();
+ Shader shader = CreateShader();
+ mImpl->mRenderer = Renderer::New( geometry, shader );
+
+ ApplyTextureAndUniforms();
+
+ actor.AddRenderer( mImpl->mRenderer );
+
+ // npatch loaded and ready to display
+ ResourceReady( Toolkit::Visual::ResourceStatus::READY );