DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ImageView, Toolkit::Control, Create );
DALI_PROPERTY_REGISTRATION( Toolkit, ImageView, "resourceUrl", STRING, RESOURCE_URL )
DALI_PROPERTY_REGISTRATION( Toolkit, ImageView, "image", MAP, IMAGE )
+
+DALI_ANIMATABLE_PROPERTY_REGISTRATION_WITH_DEFAULT( Toolkit, ImageView, "pixelArea", Vector4(0.f, 0.f, 1.f, 1.f), PIXEL_AREA )
DALI_TYPE_REGISTRATION_END()
} // anonymous namespace
void ImageView::SetDepthIndex( int depthIndex )
{
- mRenderer.SetDepthIndex( depthIndex );
+ if( mRenderer )
+ {
+ mRenderer.SetDepthIndex( depthIndex );
+ }
}
Vector3 ImageView::GetNaturalSize()
size.x = mImageSize.GetWidth();
size.y = mImageSize.GetHeight();
- size.z = std::min(size.x, size.y);
if( size.x > 0 && size.y > 0 )
{
+ size.z = std::min(size.x, size.y);
return size;
}
else
}
}
+
///////////////////////////////////////////////////////////
//
// Private methods
Control::OnStageDisconnection();
}
-
///////////////////////////////////////////////////////////
//
// Properties
if ( imageview )
{
+ ImageView& impl = GetImpl( imageview );
switch ( propertyIndex )
{
case Toolkit::ImageView::Property::RESOURCE_URL:
{
- ImageView& impl = GetImpl( imageview );
if ( !impl.mUrl.empty() )
{
value = impl.mUrl;
case Toolkit::ImageView::Property::IMAGE:
{
- ImageView& impl = GetImpl( imageview );
if ( !impl.mUrl.empty() )
{
value = impl.mUrl;