{
Property::Value* imageURLValue = propertyMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME );
std::string imageUrl;
- if( imageURLValue && imageURLValue->Get( imageUrl ) )
+ if( imageURLValue )
{
- VisualUrl visualUrl( imageUrl );
-
- switch( visualUrl.GetType() )
+ if( imageURLValue->Get( imageUrl ) )
{
- case VisualUrl::N_PATCH:
- {
- visualPtr = NPatchVisual::New( *( mFactoryCache.Get() ), visualUrl, propertyMap );
- break;
- }
- case VisualUrl::SVG:
- {
- visualPtr = SvgVisual::New( *( mFactoryCache.Get() ), visualUrl, propertyMap );
- break;
- }
- case VisualUrl::GIF:
+ VisualUrl visualUrl( imageUrl );
+
+ switch( visualUrl.GetType() )
{
- visualPtr = AnimatedImageVisual::New( *( mFactoryCache.Get() ), visualUrl, propertyMap );
- break;
+ case VisualUrl::N_PATCH:
+ {
+ visualPtr = NPatchVisual::New( *( mFactoryCache.Get() ), visualUrl, propertyMap );
+ break;
+ }
+ case VisualUrl::SVG:
+ {
+ visualPtr = SvgVisual::New( *( mFactoryCache.Get() ), visualUrl, propertyMap );
+ break;
+ }
+ case VisualUrl::GIF:
+ {
+ visualPtr = AnimatedImageVisual::New( *( mFactoryCache.Get() ), visualUrl, propertyMap );
+ break;
+ }
+ case VisualUrl::REGULAR_IMAGE:
+ {
+ visualPtr = ImageVisual::New( *( mFactoryCache.Get() ), visualUrl, propertyMap );
+ break;
+ }
}
- case VisualUrl::REGULAR_IMAGE:
+ }
+ else
+ {
+ Property::Array* array = imageURLValue->GetArray();
+ if( array )
{
- visualPtr = ImageVisual::New( *( mFactoryCache.Get() ), visualUrl, propertyMap );
- break;
+ visualPtr = AnimatedImageVisual::New( *( mFactoryCache.Get() ), *array, propertyMap );
}
}
}
{
Property::Value* imageURLValue = propertyMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME );
std::string imageUrl;
- if( imageURLValue && imageURLValue->Get( imageUrl ) )
+ if( imageURLValue )
{
- visualPtr = AnimatedImageVisual::New( *( mFactoryCache.Get() ), imageUrl, propertyMap );
+ if( imageURLValue->Get( imageUrl ) )
+ {
+ visualPtr = AnimatedImageVisual::New( *( mFactoryCache.Get() ), imageUrl, propertyMap );
+ }
+ else
+ {
+ Property::Array* array = imageURLValue->GetArray();
+ if( array )
+ {
+ visualPtr = AnimatedImageVisual::New( *( mFactoryCache.Get() ), *array, propertyMap );
+ }
+ }
}
break;
}