// EXTERNAL INCLUDES
#include <dali/public-api/actors/image-actor.h>
-#include <dali/public-api/actors/text-actor.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control.h>
Image image = imageActor.GetImage();
size = Vector3( static_cast<float>( image.GetWidth() ), static_cast<float>( image.GetHeight() ), depth );
}
- else
- {
- // Get natural size for TextActor.
- TextActor textActor = TextActor::DownCast( actor );
- if( textActor )
- {
- Font font = textActor.GetFont();
- if( !font )
- {
- font = Font::New();
- }
- size = font.MeasureText( textActor.GetText() );
- size.depth = depth;
- }
- }
}
return size;
}
else
{
- TextActor textActor = TextActor::DownCast( actor );
- if( textActor )
- {
- Font font = textActor.GetFont();
- if( !font )
- {
- font = Font::New();
- }
- size = font.MeasureText( textActor.GetText() );
-
- constrainSize = true;
- }
- else
- {
- size = actor.GetCurrentSize();
- }
+ size = actor.GetCurrentSize();
}
// Scale the actor