- Constraint constraint = Constraint::New<float>( mPropertyDetail,
- LocalSource( Actor::WORLD_POSITION ),
- Source( camera, Actor::WORLD_POSITION ),
- CameraDetailConstraint(detailFactor));
- Self().RemoveConstraints();
- Self().ApplyConstraint(constraint);
+ Toolkit::ImageView imageView = Toolkit::ImageView::DownCast( Dali::BaseHandle( object ) );
+
+ if ( imageView )
+ {
+ switch ( index )
+ {
+ case Toolkit::ImageView::Property::RESOURCE_URL:
+ {
+ std::string imageUrl;
+ if( value.Get( imageUrl ) )
+ {
+ GetImpl( imageView ).SetImage( imageUrl, ImageDimensions() );
+ }
+ break;
+ }
+
+ case Toolkit::ImageView::Property::IMAGE:
+ {
+ std::string imageUrl;
+ if( value.Get( imageUrl ) )
+ {
+ ImageView& impl = GetImpl( imageView );
+ impl.SetImage( imageUrl, ImageDimensions() );
+ }
+
+ // if its not a string then get a Property::Map from the property if possible.
+ Property::Map map;
+ if( value.Get( map ) )
+ {
+ ImageView& impl = GetImpl( imageView );
+ impl.SetImage( map );
+ }
+
+ break;
+ }
+
+ case Toolkit::ImageView::Property::PRE_MULTIPLIED_ALPHA:
+ {
+ bool IsPre;
+ if( value.Get( IsPre ) )
+ {
+ GetImpl(imageView).EnablePreMultipliedAlpha( IsPre );
+ }
+ break;
+ }
+ }
+ }