return mImpl->mSize;
}
+float Visual::Base::GetHeightForWidth( float width ) const
+{
+ return 0.f;
+}
+
void Visual::Base::GetNaturalSize( Vector2& naturalSize ) const
{
naturalSize = Vector2::ZERO;
}
}
+void Visual::Base::CreatePropertyMap( Property::Map& map ) const
+{
+ DoCreatePropertyMap( map );
+
+ if( mImpl->mCustomShader )
+ {
+ mImpl->mCustomShader->CreatePropertyMap( map );
+ }
+}
+
void Visual::Base::EnablePreMultipliedAlpha( bool preMultipled )
{
if(preMultipled)
mImpl->mRenderer.Reset();
}
-void Visual::Base::CreatePropertyMap( Property::Map& map ) const
-{
- DoCreatePropertyMap( map );
-
- if( mImpl->mCustomShader )
- {
- mImpl->mCustomShader->CreatePropertyMap( map );
- }
-}
-
bool Visual::Base::GetIsOnStage() const
{
return mImpl->mFlags & Impl::IS_ON_STAGE;
return mImpl->mFlags & Impl::IS_FROM_CACHE;
}
+void Visual::Base::SetProperty( Dali::Property::Index index, const Dali::Property::Value& propertyValue )
+{
+ DALI_ASSERT_ALWAYS( ( index > Property::INVALID_INDEX ) &&
+ ( index > VISUAL_PROPERTY_BASE_START_INDEX ) && // Change the type of visual is not allowed.
+ "Property index is out of bounds" );
+
+ if( index < VISUAL_PROPERTY_START_INDEX )
+ {
+ // TODO set the properties of the visual base.
+ }
+ else
+ {
+ DoSetProperty( index, propertyValue );
+ }
+}
+
+Dali::Property::Value Visual::Base::GetProperty( Dali::Property::Index index )
+{
+ DALI_ASSERT_ALWAYS( ( index > Property::INVALID_INDEX ) &&
+ ( index >= VISUAL_PROPERTY_BASE_START_INDEX ) &&
+ "Property index is out of bounds" );
+
+ Dali::Property::Value value;
+
+ if( index < VISUAL_PROPERTY_START_INDEX )
+ {
+ // TODO retrieve the properties of the visual base.
+ }
+ else
+ {
+ value = DoGetProperty( index );
+ }
+
+ return value;
+}
+
} // namespace Internal
} // namespace Toolkit