Actor meshActor = Actor::New();
meshActor.AddRenderer( renderer );
meshActor.SetSize( Vector3( 400.0f, 400.0f, 0.1f ) );
- meshActor.SetParentOrigin( parentOrigin );
- meshActor.SetAnchorPoint( anchorPoint );
+ meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, parentOrigin );
+ meshActor.SetProperty( Actor::Property::ANCHOR_POINT, anchorPoint );
Stage::GetCurrent().Add( meshActor );
application.SendNotification();
nearPlane = cameraActor.GetNearClippingPlane();
farPlane = cameraActor.GetFarClippingPlane();
- cameraDepth = cameraActor.GetCurrentPosition().z;
+ cameraDepth = cameraActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z;
}
return !!cameraActor;
float radius = meshActor.GetTargetSize().Length() * 0.5f;
Vector2 stageSize = Stage::GetCurrent().GetSize();
- meshActor.SetParentOrigin( Vector3( -radius / stageSize.width + offset, 0.5f, 0.5f ) );
- meshActor.SetAnchorPoint( AnchorPoint::CENTER );
+ meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( -radius / stageSize.width + offset, 0.5f, 0.5f ) );
+ meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
drawTrace.Reset();
application.SendNotification();
float radius = meshActor.GetTargetSize().Length() * 0.5f;
Vector2 stageSize = Stage::GetCurrent().GetSize();
- meshActor.SetParentOrigin( Vector3( radius / stageSize.width + offset, 0.5f, 0.5f ) );
- meshActor.SetAnchorPoint( AnchorPoint::CENTER );
+ meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( radius / stageSize.width + offset, 0.5f, 0.5f ) );
+ meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
drawTrace.Reset();
application.SendNotification();
float radius = meshActor.GetTargetSize().Length() * 0.5f;
Vector2 stageSize = Stage::GetCurrent().GetSize();
- meshActor.SetParentOrigin( Vector3( 0.5f, -radius / stageSize.width + offset, 0.5f ) );
- meshActor.SetAnchorPoint( AnchorPoint::CENTER );
+ meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, -radius / stageSize.width + offset, 0.5f ) );
+ meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
drawTrace.Reset();
application.SendNotification();
float radius = meshActor.GetTargetSize().Length() * 0.5f;
Vector2 stageSize = Stage::GetCurrent().GetSize();
- meshActor.SetParentOrigin( Vector3( 0.5f, radius / stageSize.width + offset, 0.5f ) );
- meshActor.SetAnchorPoint( AnchorPoint::CENTER );
+ meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, radius / stageSize.width + offset, 0.5f ) );
+ meshActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
drawTrace.Reset();
application.SendNotification();
DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) );
Actor meshActor = CreateMeshActorToStage( application );
- Vector3 meshPosition = meshActor.GetCurrentPosition();
+ Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
float radius = meshActor.GetTargetSize().Length() * 0.5f;
float offset = radius + 0.1f;
DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) );
Actor meshActor = CreateMeshActorToStage( application );
- Vector3 meshPosition = meshActor.GetCurrentPosition();
+ Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
float offset = meshActor.GetTargetSize().z - 0.1f;
meshPosition.z = cameraDepth - nearPlane + offset;
DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) );
Actor meshActor = CreateMeshActorToStage( application );
- Vector3 meshPosition = meshActor.GetCurrentPosition();
+ Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
float radius = meshActor.GetTargetSize().Length() * 0.5f;
float offset = radius + 0.1f;
DALI_TEST_CHECK( GetCameraDepths( application, nearPlane, farPlane, cameraDepth ) );
Actor meshActor = CreateMeshActorToStage( application );
- Vector3 meshPosition = meshActor.GetCurrentPosition();
+ Vector3 meshPosition = meshActor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
float offset = meshActor.GetTargetSize().z - 0.1f;
meshPosition.z = cameraDepth - farPlane - offset;
{
Impl::TestCustomActor* impl = new Impl::TestCustomActor( true );
TestCustomActor custom( *impl ); // takes ownership
- custom.SetName( "SizeNegotiationActor" );
+ custom.SetProperty( Dali::Actor::Property::NAME, "SizeNegotiationActor" );
impl->Initialize();
mMethodsCalled.push_back( method );
// Combine Actor name with method string
- std::string nameAndMethod( Self().GetName() );
+ std::string nameAndMethod( Self().GetProperty< std::string >( Dali::Actor::Property::NAME ) );
if ( 0 == nameAndMethod.size() )
{
nameAndMethod = "Unknown: ";
virtual void OnInitialize( const char* name )
{
// We need to do this early, before the OnChildAdd is recorded
- Self().SetName( name );
+ Self().SetProperty( Dali::Actor::Property::NAME, name );
mContainer = Dali::Actor::New();
- mContainer.SetName( "Container" );
+ mContainer.SetProperty( Dali::Actor::Property::NAME, "Container" );
Self().Add( mContainer );
}
*
*/
+// Enable debug log for test coverage
+#define DEBUG_ENABLED 1
+
#include "assert.h"
#include <dali/public-api/dali-core.h>
#include <string>
#include <dali/devel-api/actors/actor-devel.h>
#include <dali/integration-api/events/touch-event-integ.h>
#include <dali/integration-api/events/hover-event-integ.h>
+#include <dali/integration-api/debug.h>
#include <dali-test-suite-utils.h>
#include <mesh-builder.h>
void OnStageCallback( Actor actor )
{
++gOnStageCallBackCalled;
- gActorNamesOnOffStage.push_back( actor.GetName() );
+ gActorNamesOnOffStage.push_back( actor.GetProperty< std::string >( Actor::Property::NAME ) );
DALI_TEST_CHECK( actor.OnStage() == true );
}
static int gOffStageCallBackCalled;
void OffStageCallback( Actor actor )
{
++gOffStageCallBackCalled;
- gActorNamesOnOffStage.push_back( actor.GetName() );
+ gActorNamesOnOffStage.push_back( actor.GetProperty< std::string >( Actor::Property::NAME ) );
DALI_TEST_CHECK( actor.OnStage() == false );
}
void OnRelayoutCallback( Actor actor )
{
gOnRelayoutCallBackCalled = true;
- gActorNamesRelayout.push_back( actor.GetName() );
+ gActorNamesRelayout.push_back( actor.GetProperty< std::string >( Actor::Property::NAME ) );
}
struct VisibilityChangedFunctorData
Actor actor = Actor::New();
- DALI_TEST_CHECK(actor.GetName().empty());
+ DALI_TEST_CHECK(actor.GetProperty< std::string >( Actor::Property::NAME ).empty());
END_TEST;
}
string str("ActorName");
Actor actor = Actor::New();
- actor.SetName(str);
- DALI_TEST_CHECK(actor.GetName() == str);
+ actor.SetProperty( Actor::Property::NAME,str);
+ DALI_TEST_CHECK(actor.GetProperty< std::string >( Actor::Property::NAME ) == str);
END_TEST;
}
Actor actor = Actor::New();
Vector3 vector(0.7f, 0.8f, 0.9f);
- DALI_TEST_CHECK(vector != actor.GetCurrentParentOrigin());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ));
- actor.SetParentOrigin(vector);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, vector );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector == actor.GetCurrentParentOrigin());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ));
Stage::GetCurrent().Add( actor );
- actor.SetParentOrigin( Vector3( 0.1f, 0.2f, 0.3f ) );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.1f, 0.2f, 0.3f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentParentOrigin(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), TEST_LOCATION );
Stage::GetCurrent().Remove( actor );
END_TEST;
Actor actor = Actor::New();
Vector3 vector(0.7f, 0.8f, 0.9f);
- DALI_TEST_CHECK(vector != actor.GetCurrentParentOrigin());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ));
actor.SetProperty( Actor::Property::PARENT_ORIGIN_X, vector.x );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.x, actor.GetCurrentParentOrigin().x, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).x, TEST_LOCATION );
actor.SetProperty( Actor::Property::PARENT_ORIGIN_Y, vector.y );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.y, actor.GetCurrentParentOrigin().y, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).y, TEST_LOCATION );
actor.SetProperty( Actor::Property::PARENT_ORIGIN_Z, vector.z );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.z, actor.GetCurrentParentOrigin().z, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).z, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Vector3 vector(0.7f, 0.8f, 0.9f);
- DALI_TEST_CHECK(vector != actor.GetCurrentParentOrigin());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ));
- actor.SetParentOrigin(vector);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, vector );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector == actor.GetCurrentParentOrigin());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ));
END_TEST;
}
Actor actor = Actor::New();
Vector3 vector(0.7f, 0.8f, 0.9f);
- DALI_TEST_CHECK(vector != actor.GetCurrentAnchorPoint());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ));
- actor.SetAnchorPoint(vector);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, vector );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector == actor.GetCurrentAnchorPoint());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ));
Stage::GetCurrent().Add( actor );
- actor.SetAnchorPoint( Vector3( 0.1f, 0.2f, 0.3f ) );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, Vector3( 0.1f, 0.2f, 0.3f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentAnchorPoint(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), TEST_LOCATION );
Stage::GetCurrent().Remove( actor );
END_TEST;
Actor actor = Actor::New();
Vector3 vector(0.7f, 0.8f, 0.9f);
- DALI_TEST_CHECK(vector != actor.GetCurrentAnchorPoint());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ));
actor.SetProperty( Actor::Property::ANCHOR_POINT_X, vector.x );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.x, actor.GetCurrentAnchorPoint().x, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).x, TEST_LOCATION );
actor.SetProperty( Actor::Property::ANCHOR_POINT_Y, vector.y );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.y, actor.GetCurrentAnchorPoint().y, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).y, TEST_LOCATION );
actor.SetProperty( Actor::Property::ANCHOR_POINT_Z, vector.z );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.z, actor.GetCurrentAnchorPoint().z, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).z, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Vector3 vector(0.7f, 0.8f, 0.9f);
- DALI_TEST_CHECK(vector != actor.GetCurrentAnchorPoint());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ));
- actor.SetAnchorPoint(vector);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, vector);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector == actor.GetCurrentAnchorPoint());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ));
END_TEST;
}
Actor actor = Actor::New();
Vector3 vector(100.0f, 100.0f, 0.0f);
- DALI_TEST_CHECK(vector != actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
actor.SetSize(vector.x, vector.y);
application.Render();
// Check the size in the new frame
- DALI_TEST_CHECK(vector == actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_EQUALS( currentSize, vector, Math::MACHINE_EPSILON_0, TEST_LOCATION );
Actor actor = Actor::New();
Vector3 vector(100.0f, 100.0f, 100.0f);
- DALI_TEST_CHECK(vector != actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
actor.SetSize(vector.x, vector.y, vector.z);
application.Render();
// Check the size in the new frame
- DALI_TEST_CHECK(vector == actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_EQUALS( currentSize, vector, Math::MACHINE_EPSILON_0, TEST_LOCATION );
Actor actor = Actor::New();
Vector3 vector(100.0f, 100.0f, 0.0f);
- DALI_TEST_CHECK(vector != actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
actor.SetSize(Vector2(vector.x, vector.y));
application.Render();
// Check the size in the new frame
- DALI_TEST_CHECK(vector == actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_EQUALS( currentSize, vector, Math::MACHINE_EPSILON_0, TEST_LOCATION );
Actor actor = Actor::New();
Vector3 vector(100.0f, 100.0f, 100.0f);
- DALI_TEST_CHECK(vector != actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
actor.SetSize(vector);
application.Render();
// Check the size in the new frame
- DALI_TEST_CHECK(vector == actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
Stage::GetCurrent().Add( actor );
actor.SetSize( Vector3( 0.1f, 0.2f, 0.3f ) );
application.Render();
// Check the size in the new frame
- DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentSize(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), TEST_LOCATION );
currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_EQUALS( currentSize, Vector3( 0.1f, 0.2f, 0.3f ), Math::MACHINE_EPSILON_0, TEST_LOCATION );
Actor actor = Actor::New();
Vector3 vector(0.7f, 0.8f, 0.9f);
- DALI_TEST_CHECK(vector != actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
actor.SetProperty( Actor::Property::SIZE_WIDTH, vector.width );
application.Render();
// Check the width in the new frame
- DALI_TEST_EQUALS( vector.width, actor.GetCurrentSize().width, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.width, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, TEST_LOCATION );
sizeWidth = actor.GetProperty( Actor::Property::SIZE_WIDTH ).Get< float >();
DALI_TEST_EQUALS( sizeWidth, vector.width, Math::MACHINE_EPSILON_0, TEST_LOCATION );
application.Render();
// Check the height in the new frame
- DALI_TEST_EQUALS( vector.height, actor.GetCurrentSize().height, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.height, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, TEST_LOCATION );
sizeHeight = actor.GetProperty( Actor::Property::SIZE_HEIGHT ).Get< float >();
DALI_TEST_EQUALS( sizeHeight, vector.height, Math::MACHINE_EPSILON_0, TEST_LOCATION );
application.Render();
// Check the depth in the new frame
- DALI_TEST_EQUALS( vector.depth, actor.GetCurrentSize().depth, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.depth, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).depth, TEST_LOCATION );
sizeDepth = actor.GetProperty( Actor::Property::SIZE_DEPTH ).Get< float >();
DALI_TEST_EQUALS( sizeDepth, vector.depth, Math::MACHINE_EPSILON_0, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
Vector3 vector( 100.0f, 200.0f, 400.0f );
- DALI_TEST_CHECK( vector != actor.GetCurrentSize() );
+ DALI_TEST_CHECK( vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) );
actor.SetProperty( Actor::Property::SIZE_WIDTH, vector.width );
DALI_TEST_EQUALS( actor.GetProperty( Actor::Property::SIZE_WIDTH ).Get< float >(), vector.width, Math::MACHINE_EPSILON_0, TEST_LOCATION );
application.Render();
// Check the width in the new frame
- DALI_TEST_EQUALS( vector.width, actor.GetCurrentSize().width, TEST_LOCATION );
- DALI_TEST_EQUALS( vector.height, actor.GetCurrentSize().height, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.width, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.height, actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Vector3 vector(100.0f, 100.0f, 20.0f);
- DALI_TEST_CHECK(vector != actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
actor.SetSize(vector);
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector == actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
END_TEST;
}
Vector3 vector(100.0f, 100.0f, 20.0f);
DALI_TEST_CHECK(vector != actor.GetTargetSize());
- DALI_TEST_CHECK(vector != actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
actor.SetSize(vector);
DALI_TEST_CHECK(vector == actor.GetTargetSize());
- DALI_TEST_CHECK(vector != actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
// flush the queue and render once
application.SendNotification();
application.Render();
DALI_TEST_CHECK(vector == actor.GetTargetSize());
- DALI_TEST_CHECK(vector == actor.GetCurrentSize());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
// Animation
// Build the animation
Vector3 vector(100.0f, 100.0f, 0.0f);
- DALI_TEST_CHECK(vector != actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
actor.SetPosition(vector.x, vector.y);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector == actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
Stage::GetCurrent().Add( actor );
actor.SetPosition( Vector3( 0.1f, 0.2f, 0.3f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3( 0.1f, 0.2f, 0.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
actor.SetX( 1.0f );
actor.SetY( 1.1f );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( Vector3( 1.0f, 1.1f, 1.2f ), actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3( 1.0f, 1.1f, 1.2f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
actor.TranslateBy( Vector3( 0.1f, 0.1f, 0.1f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( Vector3( 1.1f, 1.2f, 1.3f ), actor.GetCurrentPosition(), Math::MACHINE_EPSILON_10000, TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3( 1.1f, 1.2f, 1.3f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Math::MACHINE_EPSILON_10000, TEST_LOCATION );
Stage::GetCurrent().Remove( actor );
END_TEST;
Vector3 vector(100.0f, 100.0f, 100.0f);
- DALI_TEST_CHECK(vector != actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
actor.SetPosition(vector.x, vector.y, vector.z);
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector == actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
END_TEST;
}
Vector3 vector(100.0f, 100.0f, 100.0f);
- DALI_TEST_CHECK(vector != actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
actor.SetPosition(vector);
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector == actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
END_TEST;
}
Vector3 vector(100.0f, 0.0f, 0.0f);
- DALI_TEST_CHECK(vector != actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
actor.SetX(100.0f);
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector == actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
END_TEST;
}
Vector3 vector(0.0f, 100.0f, 0.0f);
- DALI_TEST_CHECK(vector != actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
actor.SetY(100.0f);
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector == actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
END_TEST;
}
Vector3 vector(0.0f, 0.0f, 100.0f);
- DALI_TEST_CHECK(vector != actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
actor.SetZ(100.0f);
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector == actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
END_TEST;
}
Actor actor = Actor::New();
Vector3 vector(0.7f, 0.8f, 0.9f);
- DALI_TEST_CHECK(vector != actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
actor.SetProperty( Actor::Property::POSITION_X, vector.x );
DALI_TEST_EQUALS( vector.x, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).x, TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.x, actor.GetCurrentPosition().x, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, TEST_LOCATION );
DALI_TEST_EQUALS( vector.x, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).x, TEST_LOCATION );
DALI_TEST_EQUALS( vector.x, actor.GetProperty< float >( Actor::Property::POSITION_X ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.y, actor.GetCurrentPosition().y, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, TEST_LOCATION );
DALI_TEST_EQUALS( vector.y, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).y, TEST_LOCATION );
DALI_TEST_EQUALS( vector.y, actor.GetProperty< float >( Actor::Property::POSITION_Y ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.z, actor.GetCurrentPosition().z, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, TEST_LOCATION );
DALI_TEST_EQUALS( vector.z, actor.GetProperty< Vector3 >( Actor::Property::POSITION ).z, TEST_LOCATION );
DALI_TEST_EQUALS( vector.z, actor.GetProperty< float >( Actor::Property::POSITION_Z ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, TEST_LOCATION );
Actor actor = Actor::New();
Vector3 vector(100.0f, 100.0f, 100.0f);
- DALI_TEST_CHECK(vector != actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
actor.SetPosition(vector);
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector == actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
actor.TranslateBy(vector);
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector*2.0f == actor.GetCurrentPosition());
+ DALI_TEST_CHECK(vector*2.0f == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
END_TEST;
}
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(actor.GetCurrentPosition() == setVector);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) == setVector);
END_TEST;
}
Actor parent = Actor::New();
Vector3 parentPosition( 1.0f, 2.0f, 3.0f );
parent.SetPosition( parentPosition );
- parent.SetParentOrigin( ParentOrigin::CENTER );
- parent.SetAnchorPoint( AnchorPoint::CENTER );
+ parent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ parent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
- child.SetParentOrigin( ParentOrigin::CENTER );
- child.SetAnchorPoint( AnchorPoint::CENTER );
+ child.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ child.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Vector3 childPosition( 6.0f, 6.0f, 6.0f );
child.SetPosition( childPosition );
parent.Add( child );
// The actors should not have a world position yet
- DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3::ZERO, TEST_LOCATION );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentPosition(), childPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parentPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), childPosition, TEST_LOCATION );
// The actors should have a world position now
- DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), parentPosition + childPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition + childPosition, TEST_LOCATION );
END_TEST;
}
Actor parent = Actor::New();
Vector3 parentPosition( 1.0f, 2.0f, 3.0f );
parent.SetPosition( parentPosition );
- parent.SetParentOrigin( ParentOrigin::CENTER );
- parent.SetAnchorPoint( AnchorPoint::CENTER );
+ parent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ parent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
- child.SetParentOrigin( ParentOrigin::CENTER );
- child.SetAnchorPoint( AnchorPoint::CENTER );
+ child.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ child.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Vector3 childPosition( 10.0f, 11.0f, 12.0f );
child.SetPosition( childPosition );
parent.Add( child );
// The actors should not have a world position yet
- DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3::ZERO, TEST_LOCATION );
// first test default, which is to inherit position
- DALI_TEST_EQUALS( child.IsPositionInherited(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_POSITION ), true, TEST_LOCATION );
application.SendNotification();
application.Render(0); // should only really call Update as Render is not required to update scene
- DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentPosition(), childPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), parentPosition + childPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parentPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), childPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition + childPosition, TEST_LOCATION );
//Change child position
Vector3 childOffset( -1.0f, 1.0f, 0.0f );
child.SetPosition( childOffset );
// Use local position as world postion
- child.SetInheritPosition( false );
- DALI_TEST_EQUALS( child.IsPositionInherited(), false, TEST_LOCATION );
+ child.SetProperty( Actor::Property::INHERIT_POSITION, false );
+ DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_POSITION ), false, TEST_LOCATION );
application.SendNotification();
application.Render(0); // should only really call Update as Render is not required to update scene
- DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentPosition(), childOffset, TEST_LOCATION );
- DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), childOffset, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parentPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), childOffset, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), childOffset, TEST_LOCATION );
//Change back to inherit position from parent
- child.SetInheritPosition( true );
- DALI_TEST_EQUALS( child.IsPositionInherited(), true, TEST_LOCATION );
+ child.SetProperty( Actor::Property::INHERIT_POSITION, true );
+ DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_POSITION ), true, TEST_LOCATION );
application.SendNotification();
application.Render(0); // should only really call Update as Render is not required to update scene
- DALI_TEST_EQUALS( parent.GetCurrentPosition(), parentPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentPosition(), childOffset, TEST_LOCATION );
- DALI_TEST_EQUALS( parent.GetCurrentWorldPosition(), parentPosition, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldPosition(), parentPosition + childOffset, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parentPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), childOffset, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), parentPosition + childOffset, TEST_LOCATION );
END_TEST;
}
application.SendNotification();
application.Render();
- parent.SetOpacity( 0.1f );
+ parent.SetProperty( DevelActor::Property::OPACITY, 0.1f );
DALI_TEST_EQUALS( parent.GetProperty( Actor::Property::COLOR_ALPHA ).Get<float>(), 0.1f, 0.0001f, TEST_LOCATION );
DALI_TEST_EQUALS( child.GetProperty( Actor::Property::COLOR_ALPHA ).Get<float>(), 1.0f, 0.0001f, TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
END_TEST;
}
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
Stage::GetCurrent().Add( actor );
actor.RotateBy( Degree( 360 ), axis);
- DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
actor.SetOrientation( Degree( 0 ), Vector3( 1.0f, 0.0f, 0.0f ) );
Quaternion result( Radian( 0 ), Vector3( 1.0f, 0.0f, 0.0f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( result, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS( result, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
actor.SetOrientation( angle, axis);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
Stage::GetCurrent().Remove( actor );
END_TEST;
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
DALI_TEST_EQUALS(rotation, actor.GetProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
END_TEST;
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(Quaternion( angle, Vector3::ZAXIS), actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(Quaternion( angle, Vector3::ZAXIS), actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
Stage::GetCurrent().Add( actor );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
Stage::GetCurrent().Remove( actor );
END_TEST;
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
actor.RotateBy(rotation);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(Quaternion(angle * 2.0f, Vector3::ZAXIS), actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
END_TEST;
}
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(rotation, actor.GetCurrentOrientation(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS(rotation, actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION);
END_TEST;
}
parent.Add( child );
// The actors should not have a world rotation yet
- DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion(Radian(0.0f), Vector3::YAXIS), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), Quaternion(Radian(0.0f), Vector3::YAXIS), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion(Radian(0.0f), Vector3::YAXIS), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion(Radian(0.0f), Vector3::YAXIS), 0.001, TEST_LOCATION );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( parent.GetCurrentOrientation(), rotation, 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentOrientation(), rotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, 0.001, TEST_LOCATION );
// The actors should have a world rotation now
- DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), Quaternion( rotationAngle * 2.0f, Vector3::YAXIS ), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion( rotationAngle * 2.0f, Vector3::YAXIS ), 0.001, TEST_LOCATION );
// turn off child rotation inheritance
- child.SetInheritOrientation( false );
- DALI_TEST_EQUALS( child.IsOrientationInherited(), false, TEST_LOCATION );
+ child.SetProperty( Actor::Property::INHERIT_ORIENTATION, false );
+ DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_ORIENTATION ), false, TEST_LOCATION );
application.SendNotification();
application.Render(0);
// The actors should have a world rotation now
- DALI_TEST_EQUALS( parent.GetCurrentWorldOrientation(), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldOrientation(), rotation, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion( rotationAngle, Vector3::YAXIS ), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), rotation, 0.001, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
- // Set to random value first - GetCurrentScale() asserts if called before SetScale()
+ // Set to random value first -.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) asserts if called before SetScale()
actor.SetScale(0.25f);
Vector3 scale(10.0f, 10.0f, 10.0f);
- DALI_TEST_CHECK(actor.GetCurrentScale() != scale);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) != scale);
actor.SetScale(scale.x);
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(actor.GetCurrentScale() == scale);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale);
END_TEST;
}
Actor actor = Actor::New();
- // Set to random value first - GetCurrentScale() asserts if called before SetScale()
+ // Set to random value first -.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) asserts if called before SetScale()
actor.SetScale(Vector3(12.0f, 1.0f, 2.0f));
- DALI_TEST_CHECK(actor.GetCurrentScale() != scale);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) != scale);
actor.SetScale(scale.x, scale.y, scale.z);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(actor.GetCurrentScale() == scale);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale);
// add to stage and test
Stage::GetCurrent().Add( actor );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( Vector3( 2.0f, 2.0f, 2.0f ), actor.GetCurrentScale(), 0.001, TEST_LOCATION);
+ DALI_TEST_EQUALS( Vector3( 2.0f, 2.0f, 2.0f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), 0.001, TEST_LOCATION);
Stage::GetCurrent().Remove( actor );
Actor actor = Actor::New();
- // Set to random value first - GetCurrentScale() asserts if called before SetScale()
+ // Set to random value first -.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) asserts if called before SetScale()
actor.SetScale(Vector3(12.0f, 1.0f, 2.0f));
- DALI_TEST_CHECK(actor.GetCurrentScale() != scale);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) != scale);
actor.SetScale(scale);
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(actor.GetCurrentScale() == scale);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale);
END_TEST;
}
Actor actor = Actor::New();
Vector3 vector(0.7f, 0.8f, 0.9f);
- DALI_TEST_CHECK(vector != actor.GetCurrentScale());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ));
actor.SetProperty( Actor::Property::SCALE_X, vector.x );
DALI_TEST_EQUALS( vector.x, actor.GetProperty< float >( Actor::Property::SCALE_X ), TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.x, actor.GetCurrentScale().x, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x, TEST_LOCATION );
DALI_TEST_EQUALS( vector.x, actor.GetProperty< float >( Actor::Property::SCALE_X ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.x, actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.y, actor.GetCurrentScale().y, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).y, TEST_LOCATION );
DALI_TEST_EQUALS( vector.y, actor.GetProperty< float >( Actor::Property::SCALE_Y ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.y, actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.z, actor.GetCurrentScale().z, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).z, TEST_LOCATION );
DALI_TEST_EQUALS( vector.z, actor.GetProperty< float >( Actor::Property::SCALE_Z ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.z, actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), TEST_LOCATION );
Actor actor = Actor::New();
Vector3 vector(100.0f, 100.0f, 100.0f);
- DALI_TEST_CHECK(vector != actor.GetCurrentScale());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ));
actor.SetScale(vector);
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector == actor.GetCurrentScale());
+ DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ));
actor.ScaleBy(vector);
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(vector*100.0f == actor.GetCurrentScale());
+ DALI_TEST_CHECK(vector*100.0f == actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ));
END_TEST;
}
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(actor.GetCurrentScale() == scale);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) == scale);
END_TEST;
}
parent.Add( child );
// The actors should not have a scale yet
- DALI_TEST_EQUALS( parent.GetCurrentScale(), Vector3::ONE, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentScale(), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
// The actors should not have a world scale yet
- DALI_TEST_EQUALS( parent.GetCurrentWorldScale(), Vector3::ONE, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldScale(), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), Vector3::ONE, TEST_LOCATION );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( parent.GetCurrentScale(), parentScale, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentScale(), childScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), parentScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), childScale, TEST_LOCATION );
// The actors should have a world scale now
- DALI_TEST_EQUALS( parent.GetCurrentWorldScale(), parentScale, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldScale(), parentScale * childScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), parentScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), parentScale * childScale, TEST_LOCATION );
END_TEST;
}
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( child.IsScaleInherited(), true, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldScale(), parentScale * childScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_SCALE ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), parentScale * childScale, TEST_LOCATION );
- child.SetInheritScale( false );
- DALI_TEST_EQUALS( child.IsScaleInherited(), false, TEST_LOCATION );
+ child.SetProperty( Actor::Property::INHERIT_SCALE, false );
+ DALI_TEST_EQUALS( child.GetProperty< bool >( Actor::Property::INHERIT_SCALE ), false, TEST_LOCATION );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( child.GetCurrentWorldScale(), childScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_SCALE ), childScale, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- actor.SetVisible(false);
+ actor.SetProperty( Actor::Property::VISIBLE,false);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(actor.IsVisible() == false);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == false);
- actor.SetVisible(true);
+ actor.SetProperty( Actor::Property::VISIBLE,true);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(actor.IsVisible() == true);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true);
// put actor on stage
Stage::GetCurrent().Add( actor );
- actor.SetVisible(false);
+ actor.SetProperty( Actor::Property::VISIBLE,false);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(actor.IsVisible() == false);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == false);
END_TEST;
}
Actor actor = Actor::New();
- DALI_TEST_CHECK(actor.IsVisible() == true);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true);
END_TEST;
}
Actor actor = Actor::New();
// initial opacity is 1
- DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 1.0f, TEST_LOCATION );
- actor.SetOpacity( 0.4f);
+ actor.SetProperty( DevelActor::Property::OPACITY, 0.4f);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.4f, TEST_LOCATION );
+ DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.4f, TEST_LOCATION );
// change opacity, actor is on stage to change is not immediate
- actor.SetOpacity( actor.GetCurrentOpacity() + 0.1f );
+ actor.SetProperty( DevelActor::Property::OPACITY, actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) + 0.1f );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.5f, TEST_LOCATION );
+ DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.5f, TEST_LOCATION );
// put actor on stage
Stage::GetCurrent().Add( actor );
// change opacity, actor is on stage to change is not immediate
- actor.SetOpacity( 0.9f );
- DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.5f, TEST_LOCATION );
+ actor.SetProperty( DevelActor::Property::OPACITY, 0.9f );
+ DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.5f, TEST_LOCATION );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.9f, TEST_LOCATION );
+ DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.9f, TEST_LOCATION );
// change opacity, actor is on stage to change is not immediate
- actor.SetOpacity( actor.GetCurrentOpacity() - 0.9f );
+ actor.SetProperty( DevelActor::Property::OPACITY, actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) - 0.9f );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS(actor.GetCurrentOpacity(), 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.0f, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- DALI_TEST_CHECK(actor.GetCurrentOpacity() != 0.5f);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) != 0.5f);
- actor.SetOpacity(0.5f);
+ actor.SetProperty( DevelActor::Property::OPACITY,0.5f);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(actor.GetCurrentOpacity() == 0.5f);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< float >( DevelActor::Property::OPACITY ) == 0.5f);
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- bool sensitive = !actor.IsSensitive();
+ bool sensitive = !actor.GetProperty< bool >( Actor::Property::SENSITIVE );
- actor.SetSensitive(sensitive);
+ actor.SetProperty( Actor::Property::SENSITIVE,sensitive);
- DALI_TEST_CHECK(sensitive == actor.IsSensitive());
+ DALI_TEST_CHECK(sensitive == actor.GetProperty< bool >( Actor::Property::SENSITIVE ));
END_TEST;
}
{
TestApplication application;
Actor actor = Actor::New();
- actor.SetSensitive(false);
+ actor.SetProperty( Actor::Property::SENSITIVE,false);
- DALI_TEST_CHECK(false == actor.IsSensitive());
+ DALI_TEST_CHECK(false == actor.GetProperty< bool >( Actor::Property::SENSITIVE ));
END_TEST;
}
Actor actor = Actor::New();
Vector4 color(1.0f, 1.0f, 1.0f, 0.5f);
- DALI_TEST_CHECK(color != actor.GetCurrentColor());
+ DALI_TEST_CHECK(color != actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ));
- actor.SetColor(color);
+ actor.SetProperty( Actor::Property::COLOR,color);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(color == actor.GetCurrentColor());
+ DALI_TEST_CHECK(color == actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ));
- actor.SetColor( actor.GetCurrentColor() + Vector4( -0.4f, -0.5f, -0.6f, -0.4f ) );
+ actor.SetProperty( Actor::Property::COLOR, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ) + Vector4( -0.4f, -0.5f, -0.6f, -0.4f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( Vector4( 0.6f, 0.5f, 0.4f, 0.1f ), actor.GetCurrentColor(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector4( 0.6f, 0.5f, 0.4f, 0.1f ), actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION );
Stage::GetCurrent().Add( actor );
- actor.SetColor( color );
+ actor.SetProperty( Actor::Property::COLOR, color );
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( color, actor.GetCurrentColor(), TEST_LOCATION );
+ DALI_TEST_EQUALS( color, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION );
- actor.SetColor( actor.GetCurrentColor() + Vector4( 1.1f, 1.1f, 1.1f, 1.1f ) );
+ actor.SetProperty( Actor::Property::COLOR, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ) + Vector4( 1.1f, 1.1f, 1.1f, 1.1f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
// Actor color is not clamped
- DALI_TEST_EQUALS( Vector4( 2.1f, 2.1f, 2.1f, 1.6f ), actor.GetCurrentColor(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector4( 2.1f, 2.1f, 2.1f, 1.6f ), actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION );
// world color is clamped
- DALI_TEST_EQUALS( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ), actor.GetCurrentWorldColor(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ), actor.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), TEST_LOCATION );
actor.SetProperty( Actor::Property::COLOR, color );
DALI_TEST_EQUALS( color, actor.GetProperty< Vector4 >( Actor::Property::COLOR ), TEST_LOCATION );
Actor actor = Actor::New();
Vector4 vector(0.7f, 0.8f, 0.9f, 0.6f);
- DALI_TEST_CHECK(vector != actor.GetCurrentColor());
+ DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ));
actor.SetProperty( Actor::Property::COLOR_RED, vector.r );
DALI_TEST_EQUALS( vector.r, actor.GetProperty< float >( Actor::Property::COLOR_RED ), TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.r, actor.GetCurrentColor().r, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.r, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).r, TEST_LOCATION );
DALI_TEST_EQUALS( vector.r, actor.GetProperty< float >( Actor::Property::COLOR_RED ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.r, actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.g, actor.GetCurrentColor().g, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.g, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).g, TEST_LOCATION );
DALI_TEST_EQUALS( vector.g, actor.GetProperty< float >( Actor::Property::COLOR_GREEN ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.g, actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.b, actor.GetCurrentColor().b, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.b, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).b, TEST_LOCATION );
DALI_TEST_EQUALS( vector.b, actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.b, actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( vector.a, actor.GetCurrentColor().a, TEST_LOCATION );
+ DALI_TEST_EQUALS( vector.a, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, TEST_LOCATION );
DALI_TEST_EQUALS( vector.a, actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), TEST_LOCATION );
DALI_TEST_EQUALS( vector.a, actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( 0.2f, actor.GetCurrentColor().a, TEST_LOCATION );
+ DALI_TEST_EQUALS( 0.2f, actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Vector4 color(1.0f, 1.0f, 1.0f, 0.5f);
- actor.SetColor(color);
+ actor.SetProperty( Actor::Property::COLOR,color);
// flush the queue and render once
application.SendNotification();
application.Render();
- DALI_TEST_CHECK(color == actor.GetCurrentColor());
+ DALI_TEST_CHECK(color == actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ));
END_TEST;
}
Actor parent = Actor::New();
Vector4 parentColor( 1.0f, 0.5f, 0.0f, 0.8f );
- parent.SetColor( parentColor );
+ parent.SetProperty( Actor::Property::COLOR, parentColor );
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
Vector4 childColor( 0.5f, 0.6f, 0.5f, 1.0f );
- child.SetColor( childColor );
+ child.SetProperty( Actor::Property::COLOR, childColor );
parent.Add( child );
- DALI_TEST_EQUALS( parent.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
// verify the default color mode
DALI_TEST_EQUALS( USE_OWN_MULTIPLY_PARENT_ALPHA, child.GetColorMode(), TEST_LOCATION );
// The actors should not have a world color yet
- DALI_TEST_EQUALS( parent.GetCurrentWorldColor(), Color::WHITE, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldColor(), Color::WHITE, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), Color::WHITE, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), Color::WHITE, TEST_LOCATION );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( parent.GetCurrentColor(), parentColor, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentColor(), childColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), parentColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), childColor, TEST_LOCATION );
// The actors should have a world color now
- DALI_TEST_EQUALS( parent.GetCurrentWorldColor(), parentColor, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldColor(), Vector4( childColor.r, childColor.g, childColor.b, childColor.a * parentColor.a), TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), parentColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), Vector4( childColor.r, childColor.g, childColor.b, childColor.a * parentColor.a), TEST_LOCATION );
// use own color
child.SetColorMode( USE_OWN_COLOR );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( child.GetCurrentWorldColor(), childColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), childColor, TEST_LOCATION );
// use parent color
child.SetColorMode( USE_PARENT_COLOR );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( child.GetCurrentColor(), childColor, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldColor(), parentColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), childColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), parentColor, TEST_LOCATION );
// use parent alpha
child.SetColorMode( USE_OWN_MULTIPLY_PARENT_ALPHA );
application.Render(0);
Vector4 expectedColor( childColor );
expectedColor.a *= parentColor.a;
- DALI_TEST_EQUALS( child.GetCurrentColor(), childColor, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldColor(), expectedColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), childColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ), expectedColor, TEST_LOCATION );
END_TEST;
}
{
TestApplication application;
Actor actor = Actor::New();
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor.SetSize(100.0f, 100.0f);
actor.SetPosition(10.0f, 10.0f);
Stage::GetCurrent().Add(actor);
Actor actor = Actor::New();
- actor.SetLeaveRequired(false);
- DALI_TEST_CHECK(actor.GetLeaveRequired() == false);
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED,false);
+ DALI_TEST_CHECK(actor.GetProperty< bool >( Actor::Property::LEAVE_REQUIRED ) == false);
- actor.SetLeaveRequired(true);
- DALI_TEST_CHECK(actor.GetLeaveRequired() == true);
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED,true);
+ DALI_TEST_CHECK(actor.GetProperty< bool >( Actor::Property::LEAVE_REQUIRED ) == true);
END_TEST;
}
Actor actor = Actor::New();
- DALI_TEST_CHECK(actor.GetLeaveRequired() == false);
+ DALI_TEST_CHECK(actor.GetProperty< bool >( Actor::Property::LEAVE_REQUIRED ) == false);
END_TEST;
}
result2 = 0;
actor.RemoveConstraints(constraint1Tag);
// make color property dirty, which will trigger constraints to be reapplied.
- actor.SetColor( Color::WHITE );
+ actor.SetProperty( Actor::Property::COLOR, Color::WHITE );
// flush the queue and render once
application.SendNotification();
application.Render();
result2 = 0;
constraint1.Apply();
// make color property dirty, which will trigger constraints to be reapplied.
- actor.SetColor( Color::WHITE );
+ actor.SetProperty( Actor::Property::COLOR, Color::WHITE );
// flush the queue and render once
application.SendNotification();
application.Render();
result2 = 0;
actor.RemoveConstraints(constraint2Tag);
// make color property dirty, which will trigger constraints to be reapplied.
- actor.SetColor( Color::WHITE );
+ actor.SetProperty( Actor::Property::COLOR, Color::WHITE );
// flush the queue and render once
application.SendNotification();
application.Render();
result2 = 0;
actor.RemoveConstraints(constraint1Tag);
// make color property dirty, which will trigger constraints to be reapplied.
- actor.SetColor( Color::WHITE );
+ actor.SetProperty( Actor::Property::COLOR, Color::WHITE );
// flush the queue and render once
application.SendNotification();
application.Render();
gActorNamesOnOffStage.clear();
Actor parent = Actor::New();
- parent.SetName( "parent" );
+ parent.SetProperty( Actor::Property::NAME, "parent" );
parent.OnStageSignal().Connect( OnStageCallback );
parent.OffStageSignal().Connect( OffStageCallback );
// sanity check
gActorNamesOnOffStage.clear();
Actor child = Actor::New();
- child.SetName( "child" );
+ child.SetProperty( Actor::Property::NAME, "child" );
child.OnStageSignal().Connect( OnStageCallback );
child.OffStageSignal().Connect( OffStageCallback );
parent.Add( child ); // add child
TestApplication application;
Actor parent = Actor::New();
- parent.SetName( "parent" );
+ parent.SetProperty( Actor::Property::NAME, "parent" );
Actor first = Actor::New();
- first .SetName( "first" );
+ first .SetProperty( Actor::Property::NAME, "first" );
Actor second = Actor::New();
- second.SetName( "second" );
+ second.SetProperty( Actor::Property::NAME, "second" );
parent.Add(first);
first.Add(second);
// get the root layer
Actor actor = Actor::New();
- actor.SetAnchorPoint( AnchorPoint::CENTER );
- actor.SetParentOrigin( ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( actor );
tet_infoline(" UtcDaliActorGetCurrentWorldMatrix");
Actor parent = Actor::New();
- parent.SetParentOrigin(ParentOrigin::CENTER);
- parent.SetAnchorPoint(AnchorPoint::CENTER);
+ parent.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
Vector3 parentPosition( 10.0f, 20.0f, 30.0f);
Radian rotationAngle(Degree(85.0f));
Quaternion parentRotation(rotationAngle, Vector3::ZAXIS);
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
- child.SetParentOrigin(ParentOrigin::CENTER);
+ child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Vector3 childPosition( 0.0f, 0.0f, 100.0f );
Radian childRotationAngle(Degree(23.0f));
Quaternion childRotation( childRotationAngle, Vector3::YAXIS );
Matrix childWorldMatrix(false);
Matrix::Multiply( childWorldMatrix, childMatrix, parentMatrix);
- DALI_TEST_EQUALS( parent.GetCurrentWorldMatrix(), parentMatrix, 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentWorldMatrix(), childWorldMatrix, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX ), parentMatrix, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX ), childWorldMatrix, 0.001, TEST_LOCATION );
END_TEST;
}
tet_infoline(" UtcDaliActorConstrainedToWorldMatrix");
Actor parent = Actor::New();
- parent.SetParentOrigin(ParentOrigin::CENTER);
- parent.SetAnchorPoint(AnchorPoint::CENTER);
+ parent.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
Vector3 parentPosition( 10.0f, 20.0f, 30.0f);
Radian rotationAngle(Degree(85.0f));
Quaternion parentRotation(rotationAngle, Vector3::ZAXIS);
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
- child.SetParentOrigin(ParentOrigin::CENTER);
+ child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Constraint posConstraint = Constraint::New<Vector3>( child, Actor::Property::POSITION, PositionComponentConstraint() );
posConstraint.AddSource( Source( parent, Actor::Property::WORLD_MATRIX ) );
posConstraint.Apply();
Matrix parentMatrix(false);
parentMatrix.SetTransformComponents(parentScale, parentRotation, parentPosition);
- DALI_TEST_EQUALS( parent.GetCurrentWorldMatrix(), parentMatrix, 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( child.GetCurrentPosition(), parent.GetCurrentPosition(), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( parent.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX ), parentMatrix, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), parent.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), 0.001, TEST_LOCATION );
END_TEST;
}
tet_infoline(" UtcDaliActorConstrainedToOrientation");
Actor parent = Actor::New();
- parent.SetParentOrigin(ParentOrigin::CENTER);
- parent.SetAnchorPoint(AnchorPoint::CENTER);
+ parent.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
Vector3 parentPosition( 10.0f, 20.0f, 30.0f);
Radian rotationAngle(Degree(85.0f));
Quaternion parentRotation(rotationAngle, Vector3::ZAXIS);
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
- child.SetParentOrigin(ParentOrigin::CENTER);
+ child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Constraint posConstraint = Constraint::New<Quaternion>( child, Actor::Property::ORIENTATION, OrientationComponentConstraint() );
posConstraint.AddSource( Source( parent, Actor::Property::ORIENTATION ) );
posConstraint.Apply();
app.Render();
app.SendNotification();
- DALI_TEST_EQUALS( child.GetCurrentOrientation(), parent.GetCurrentOrientation(), 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), parent.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), 0.001, TEST_LOCATION );
END_TEST;
}
tet_infoline(" UtcDaliActorConstrainedToOpacity");
Actor parent = Actor::New();
- parent.SetOpacity( 0.7f );
+ parent.SetProperty( DevelActor::Property::OPACITY, 0.7f );
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
app.Render();
app.SendNotification();
- DALI_TEST_EQUALS( child.GetCurrentOpacity(), parent.GetCurrentOpacity(), 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), parent.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.001f, TEST_LOCATION );
- parent.SetOpacity( 0.3f );
+ parent.SetProperty( DevelActor::Property::OPACITY, 0.3f );
app.SendNotification();
app.Render(0);
app.Render();
app.SendNotification();
- DALI_TEST_EQUALS( child.GetCurrentOpacity(), parent.GetCurrentOpacity(), 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( child.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), parent.GetCurrentProperty< float >( DevelActor::Property::OPACITY ), 0.001f, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
- Vector2 size = actor.GetMinimumSize();
+ Vector2 size = actor.GetProperty< Vector2 >( Actor::Property::MINIMUM_SIZE );
DALI_TEST_EQUALS( size.width, 0.0f, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, 0.0f, TEST_LOCATION );
Vector2 size2( 1.0f, 2.0f );
- actor.SetMinimumSize( size2 );
+ actor.SetProperty( Actor::Property::MINIMUM_SIZE, size2 );
- size = actor.GetMinimumSize();
+ size = actor.GetProperty< Vector2 >( Actor::Property::MINIMUM_SIZE );
DALI_TEST_EQUALS( size.width, size2.width, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, size2.height, TEST_LOCATION );
Actor actor = Actor::New();
- Vector2 size = actor.GetMaximumSize();
+ Vector2 size = actor.GetProperty< Vector2 >( Actor::Property::MAXIMUM_SIZE );
DALI_TEST_EQUALS( size.width, FLT_MAX, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, FLT_MAX, TEST_LOCATION );
Vector2 size2( 1.0f, 2.0f );
- actor.SetMaximumSize( size2 );
+ actor.SetProperty( Actor::Property::MAXIMUM_SIZE, size2 );
- size = actor.GetMaximumSize();
+ size = actor.GetProperty< Vector2 >( Actor::Property::MAXIMUM_SIZE );
DALI_TEST_EQUALS( size.width, size2.width, TEST_LOCATION );
DALI_TEST_EQUALS( size.height, size2.height, TEST_LOCATION );
gActorNamesRelayout.clear();
Actor actor = Actor::New();
- actor.SetName( "actor" );
+ actor.SetProperty( Actor::Property::NAME, "actor" );
actor.OnRelayoutSignal().Connect( OnRelayoutCallback );
// Sanity check
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::ANCHOR_POINT, "TOP_LEFT" );
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::TOP_LEFT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::TOP_LEFT, TEST_LOCATION );
actor.SetProperty( Actor::Property::ANCHOR_POINT, "TOP_CENTER" );
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::TOP_CENTER, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::TOP_CENTER, TEST_LOCATION );
actor.SetProperty( Actor::Property::ANCHOR_POINT, "TOP_RIGHT" );
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::TOP_RIGHT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::TOP_RIGHT, TEST_LOCATION );
actor.SetProperty( Actor::Property::ANCHOR_POINT, "CENTER_LEFT" );
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::CENTER_LEFT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::CENTER_LEFT, TEST_LOCATION );
actor.SetProperty( Actor::Property::ANCHOR_POINT, "CENTER" );
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::CENTER, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::CENTER, TEST_LOCATION );
actor.SetProperty( Actor::Property::ANCHOR_POINT, "CENTER_RIGHT" );
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::CENTER_RIGHT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::CENTER_RIGHT, TEST_LOCATION );
actor.SetProperty( Actor::Property::ANCHOR_POINT, "BOTTOM_LEFT" );
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::BOTTOM_LEFT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::BOTTOM_LEFT, TEST_LOCATION );
actor.SetProperty( Actor::Property::ANCHOR_POINT, "BOTTOM_CENTER" );
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::BOTTOM_CENTER, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::BOTTOM_CENTER, TEST_LOCATION );
actor.SetProperty( Actor::Property::ANCHOR_POINT, "BOTTOM_RIGHT" );
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION );
// Invalid should not change anything
actor.SetProperty( Actor::Property::ANCHOR_POINT, "INVALID_ARG" );
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::PARENT_ORIGIN, "TOP_LEFT" );
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::TOP_LEFT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_LEFT, TEST_LOCATION );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, "TOP_CENTER" );
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::TOP_CENTER, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_CENTER, TEST_LOCATION );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, "TOP_RIGHT" );
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::TOP_RIGHT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_RIGHT, TEST_LOCATION );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, "CENTER_LEFT" );
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::CENTER_LEFT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::CENTER_LEFT, TEST_LOCATION );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, "CENTER" );
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::CENTER, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::CENTER, TEST_LOCATION );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, "CENTER_RIGHT" );
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::CENTER_RIGHT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::CENTER_RIGHT, TEST_LOCATION );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, "BOTTOM_LEFT" );
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::BOTTOM_LEFT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::BOTTOM_LEFT, TEST_LOCATION );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, "BOTTOM_CENTER" );
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::BOTTOM_CENTER, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::BOTTOM_CENTER, TEST_LOCATION );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, "BOTTOM_RIGHT" );
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION );
// Invalid should not change anything
actor.SetProperty( Actor::Property::PARENT_ORIGIN, "INVALID_ARG" );
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::BOTTOM_RIGHT, TEST_LOCATION );
END_TEST;
}
// Setup dimensions and position so actor is not skipped by culling.
actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
actor.SetSize( width, height );
- actor.SetParentOrigin( ParentOrigin::CENTER );
- actor.SetAnchorPoint( AnchorPoint::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
return actor;
}
if( i == 0 )
{
- actor.SetParentOrigin( ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
}
else
{
float b = i > 2 ? 1.0f : -1.0f;
- actor.SetParentOrigin( Vector3( 0.5 + ( 0.2f * b ), 0.8f, 0.8f ) );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5 + ( 0.2f * b ), 0.8f, 0.8f ) );
}
actors[i] = actor;
Actor clippingActorA = CreateActorWithContent16x16();
// Note: Scissor coords are have flipped Y values compared with DALi's coordinate system.
// We choose BOTTOM_LEFT to give us x=0, y=0 starting coordinates for the first test.
- clippingActorA.SetParentOrigin( ParentOrigin::BOTTOM_LEFT );
- clippingActorA.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT );
+ clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT );
+ clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT );
clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX );
Stage::GetCurrent().Add( clippingActorA );
compareParametersString << "0, 0, " << imageSize.x << ", " << imageSize.y;
DALI_TEST_CHECK( scissorTrace.FindMethodAndParams( "Scissor", compareParametersString.str() ) ); // Compare with 0, 0, 16, 16
- clippingActorA.SetParentOrigin( ParentOrigin::TOP_RIGHT );
- clippingActorA.SetAnchorPoint( AnchorPoint::TOP_RIGHT );
+ clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT );
+ clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT );
// Gather the call trace.
GenerateTrace( application, enabledDisableTrace, scissorTrace );
Actor clippingActorA = CreateActorWithContent( sizeA.width, sizeA.height );
Actor clippingActorB = CreateActorWithContent( sizeB.width, sizeB.height );
- clippingActorA.SetParentOrigin( ParentOrigin::CENTER_LEFT );
- clippingActorA.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
+ clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX );
- clippingActorB.SetParentOrigin( ParentOrigin::CENTER_LEFT );
- clippingActorB.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ clippingActorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
+ clippingActorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
clippingActorB.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX );
clippingActorA.SetPosition( 0.0f, -200.0f, 0.0f );
Actor clippingActorA = CreateActorWithContent16x16();
// Note: Scissor coords are have flipped Y values compared with DALi's coordinate system.
// We choose BOTTOM_LEFT to give us x=0, y=0 starting coordinates for the first test.
- clippingActorA.SetParentOrigin( ParentOrigin::CENTER );
- clippingActorA.SetAnchorPoint( AnchorPoint::CENTER );
+ clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX );
Stage::GetCurrent().Add( clippingActorA );
// Create a child clipping actor.
Actor clippingActorB = CreateActorWithContent16x16();
- clippingActorB.SetParentOrigin( ParentOrigin::CENTER );
- clippingActorB.SetAnchorPoint( AnchorPoint::CENTER );
+ clippingActorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ clippingActorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
clippingActorB.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX );
clippingActorA.Add( clippingActorB );
Actor clippingActorD = CreateActorWithContent( sizeD.width, sizeD.height );
Actor clippingActorE = CreateActorWithContent( sizeE.width, sizeE.height );
- clippingActorA.SetParentOrigin( ParentOrigin::CENTER_LEFT );
- clippingActorA.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ clippingActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
+ clippingActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
clippingActorA.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX );
- clippingActorB.SetParentOrigin( ParentOrigin::CENTER_LEFT );
- clippingActorB.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ clippingActorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
+ clippingActorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
clippingActorB.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX );
- clippingActorC.SetParentOrigin( ParentOrigin::CENTER_LEFT );
- clippingActorC.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ clippingActorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
+ clippingActorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
clippingActorC.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX );
- clippingActorD.SetParentOrigin( ParentOrigin::CENTER_LEFT );
- clippingActorD.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ clippingActorD.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
+ clippingActorD.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
clippingActorD.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_TO_BOUNDING_BOX );
- clippingActorE.SetParentOrigin( ParentOrigin::CENTER_LEFT );
- clippingActorE.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ clippingActorE.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
+ clippingActorE.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
clippingActorA.SetPosition( 0.0f, -200.0f, 0.0f );
clippingActorB.SetPosition( 0.0f, 0.0f, 0.0f );
TestApplication application;
+ Debug::Filter::SetGlobalLogLevel( Debug::Verbose );
+
Stage stage( Stage::GetCurrent() );
Actor actorA = Actor::New();
Actor actorB = Actor::New();
Actor actorC = Actor::New();
- actorA.SetAnchorPoint( AnchorPoint::CENTER );
- actorA.SetParentOrigin( ParentOrigin::CENTER );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorB.SetAnchorPoint( AnchorPoint::CENTER );
- actorB.SetParentOrigin( ParentOrigin::CENTER );
+ actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorC.SetAnchorPoint( AnchorPoint::CENTER );
- actorC.SetParentOrigin( ParentOrigin::CENTER );
+ actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" );
actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" );
ResetTouchCallbacks();
+ Debug::Filter::SetGlobalLogLevel( Debug::NoLogging );
+
END_TEST;
}
Renderer rendererC = Renderer::New(geometry, shaderC);
actorC.AddRenderer(rendererC);
- actorA.SetAnchorPoint( AnchorPoint::CENTER );
- actorA.SetParentOrigin( ParentOrigin::CENTER );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorB.SetAnchorPoint( AnchorPoint::CENTER );
- actorB.SetParentOrigin( ParentOrigin::CENTER );
+ actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorC.SetAnchorPoint( AnchorPoint::CENTER );
- actorC.SetParentOrigin( ParentOrigin::CENTER );
+ actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" );
actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" );
Actor actorB = Actor::New();
Actor actorC = Actor::New();
- actorA.SetAnchorPoint( AnchorPoint::CENTER );
- actorA.SetParentOrigin( ParentOrigin::CENTER );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorB.SetAnchorPoint( AnchorPoint::CENTER );
- actorB.SetParentOrigin( ParentOrigin::CENTER );
+ actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorC.SetAnchorPoint( AnchorPoint::CENTER );
- actorC.SetParentOrigin( ParentOrigin::CENTER );
+ actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" );
actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" );
Renderer rendererC = Renderer::New(geometry, shaderC);
actorC.AddRenderer(rendererC);
- actorA.SetAnchorPoint( AnchorPoint::CENTER );
- actorA.SetParentOrigin( ParentOrigin::CENTER );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorB.SetAnchorPoint( AnchorPoint::CENTER );
- actorB.SetParentOrigin( ParentOrigin::CENTER );
+ actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorC.SetAnchorPoint( AnchorPoint::CENTER );
- actorC.SetParentOrigin( ParentOrigin::CENTER );
+ actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" );
actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" );
actorC.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" );
Actor container = Actor::New();
- container.SetParentOrigin( ParentOrigin::CENTER );
+ container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
container.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
stage.Add( container );
parentB.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" );
parentB.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" );
- parentA.SetAnchorPoint( AnchorPoint::CENTER );
- parentA.SetParentOrigin( ParentOrigin::CENTER );
+ parentA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ parentA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- parentB.SetAnchorPoint( AnchorPoint::CENTER );
- parentB.SetParentOrigin( ParentOrigin::CENTER );
+ parentB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ parentB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
stage.Add( parentA );
stage.Add( parentB );
tet_printf( "Actor C added to different parent from A and B \n" );
parentB.Add( actorC );
- actorA.SetAnchorPoint( AnchorPoint::CENTER );
- actorA.SetParentOrigin( ParentOrigin::CENTER );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorB.SetAnchorPoint( AnchorPoint::CENTER );
- actorB.SetParentOrigin( ParentOrigin::CENTER );
+ actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorC.SetAnchorPoint( AnchorPoint::CENTER );
- actorC.SetParentOrigin( ParentOrigin::CENTER );
+ actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" );
actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" );
Actor actorB = Actor::New();
Actor actorC = Actor::New();
- actorA.SetAnchorPoint( AnchorPoint::CENTER );
- actorA.SetParentOrigin( ParentOrigin::CENTER );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorB.SetAnchorPoint( AnchorPoint::CENTER );
- actorB.SetParentOrigin( ParentOrigin::CENTER );
+ actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorC.SetAnchorPoint( AnchorPoint::CENTER );
- actorC.SetParentOrigin( ParentOrigin::CENTER );
+ actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" );
actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" );
Actor actorB = Actor::New();
Actor actorC = Actor::New();
- actorA.SetAnchorPoint( AnchorPoint::CENTER );
- actorA.SetParentOrigin( ParentOrigin::CENTER );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorB.SetAnchorPoint( AnchorPoint::CENTER );
- actorB.SetParentOrigin( ParentOrigin::CENTER );
+ actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorC.SetAnchorPoint( AnchorPoint::CENTER );
- actorC.SetParentOrigin( ParentOrigin::CENTER );
+ actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" );
actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" );
Actor actorB = Actor::New();
Actor actorC = Actor::New();
- actorA.SetAnchorPoint( AnchorPoint::CENTER );
- actorA.SetParentOrigin( ParentOrigin::CENTER );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorB.SetAnchorPoint( AnchorPoint::CENTER );
- actorB.SetParentOrigin( ParentOrigin::CENTER );
+ actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actorC.SetAnchorPoint( AnchorPoint::CENTER );
- actorC.SetParentOrigin( ParentOrigin::CENTER );
+ actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actorA.SetProperty( Actor::Property::WIDTH_RESIZE_POLICY, "FILL_TO_PARENT" );
actorA.SetProperty( Actor::Property::HEIGHT_RESIZE_POLICY, "FILL_TO_PARENT" );
Stage stage( Stage::GetCurrent() );
Actor actorA = Actor::New();
- actorA.SetAnchorPoint( AnchorPoint::CENTER );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Vector2 size2( 10.0f, 20.0f );
actorA.SetSize( size2 );
tet_infoline( "UtcDaliActorGetScreenPosition Top Left Anchor Point and 0,0 position \n" );
- actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
application.SendNotification();
application.Render();
tet_infoline( "UtcDaliActorGetScreenPosition Bottom right Anchor Point and 0,0 position \n" );
- actorA.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
application.SendNotification();
application.Render();
tet_infoline( "UtcDaliActorGetScreenPosition Scale parent and check child's screen position \n" );
- actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actorA.SetPosition( 30.0, 30.0 );
Actor actorB = Actor::New();
- actorB.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actorB.SetSize( size2 );
actorB.SetPosition( 10.f, 10.f );
actorA.Add( actorB );
Stage stage( Stage::GetCurrent() );
Actor actorA = Actor::New();
- actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Vector2 size2( 10.0f, 20.0f );
actorA.SetSize( size2 );
tet_infoline( "UtcDaliActorGetScreenPositionAfterScaling BOTTOM_RIGHT Anchor Point, scale 1.5f and 0,0 position \n" );
- actorA.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
application.SendNotification();
application.Render();
Stage stage( Stage::GetCurrent() );
Actor actorA = Actor::New();
- actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- actorA.SetParentOrigin( ParentOrigin::CENTER );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Vector2 size2( 10.0f, 20.0f );
actorA.SetSize( size2 );
actorA.SetPosition( 0.f, 0.f );
tet_infoline( " BOTTOM_RIGHT Anchor Point, ParentOrigin::TOP_RIGHT and 0,0 position \n" );
- actorA.SetParentOrigin( ParentOrigin::TOP_RIGHT );
- actorA.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
application.SendNotification();
application.Render();
tet_infoline( "Create Child Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" );
Actor actorA = Actor::New();
- actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- actorA.SetParentOrigin( ParentOrigin::CENTER );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Vector2 size1( 10.0f, 20.0f );
actorA.SetSize( size1 );
actorA.SetPosition( 0.f, 0.f );
tet_infoline( "Create Parent Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" );
Actor parentActorA = Actor::New();
- parentActorA.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- parentActorA.SetParentOrigin( ParentOrigin::CENTER );
+ parentActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ parentActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Vector2 size2( 30.0f, 60.0f );
parentActorA.SetSize( size2 );
parentActorA.SetPosition( 0.f, 0.f );
tet_infoline( "change parent anchor point and parent origin then check screen position \n" );
- parentActorA.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT );
- parentActorA.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ parentActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT );
+ parentActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
application.SendNotification();
application.Render();
tet_infoline( "Create Child Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" );
Actor actorA = Actor::New();
- actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- actorA.SetParentOrigin( ParentOrigin::CENTER );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Vector2 size1( 10.0f, 20.0f );
actorA.SetSize( size1 );
actorA.SetPosition( 0.f, 0.f );
tet_infoline( "Create Parent Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" );
Actor parentActorA = Actor::New();
- parentActorA.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- parentActorA.SetParentOrigin( ParentOrigin::CENTER );
+ parentActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ parentActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Vector2 size2( 30.0f, 60.0f );
parentActorA.SetSize( size2 );
parentActorA.SetPosition( 0.f, 0.f );
tet_infoline( "Create Grand Parent Actor 1 BOTTOM_LEFT Anchor Point, ParentOrigin::BOTTOM_LEFT and 0,0 position \n" );
Actor grandParentActorA = Actor::New();
- grandParentActorA.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT );
- grandParentActorA.SetParentOrigin( ParentOrigin::BOTTOM_LEFT );
+ grandParentActorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT );
+ grandParentActorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT );
Vector2 size3( 60.0f, 120.0f );
grandParentActorA.SetSize( size3 );
grandParentActorA.SetPosition( 0.f, 0.f );
tet_infoline( "Create an actor with AnchorPoint::TOP_LEFT, ParentOrigin::CENTER and 0,0 position, POSITION_USES_ANCHOR false" );
Actor actorA = Actor::New();
- actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- actorA.SetParentOrigin( ParentOrigin::CENTER );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actorA.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false );
actorA.SetSize( 10.0f, 20.0f );
stage.Add( actorA );
tet_infoline( "Create an Actor with AnchorPoint::BOTTOM_RIGHT, ParentOrigin::CENTER and 0,0 position, POSITION_USES_ANCHOR false" );
Actor actorB = Actor::New();
- actorB.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT );
- actorB.SetParentOrigin( ParentOrigin::CENTER );
+ actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
+ actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actorB.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false );
Vector2 actorBSize( 30.0f, 60.0f );
actorB.SetSize( actorBSize );
tet_infoline( "Create an actor with AnchorPoint::CENTER, ParentOrigin::CENTER and 0,0 position, POSITION_USES_ANCHOR false" );
Actor actorC = Actor::New();
- actorC.SetAnchorPoint( AnchorPoint::CENTER );
- actorC.SetParentOrigin( ParentOrigin::CENTER );
+ actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actorC.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false );
Vector2 actorCSize( 60.0f, 120.0f );
actorC.SetSize( actorCSize );
tet_infoline( "Check default behaviour\n" );
Actor actor = Actor::New();
- actor.SetParentOrigin( ParentOrigin::CENTER );
- actor.SetAnchorPoint( AnchorPoint::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
actor.SetSize( 100.0f, 100.0f );
Stage::GetCurrent().Add( actor );
application.Render();
tet_infoline( "Check that the world position is in the center\n" );
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
tet_infoline( "Set the position uses anchor point property to false\n" );
actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false );
application.Render();
tet_infoline( "Check that the world position has changed appropriately\n" );
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION );
END_TEST;
}
tet_infoline( "Check that the scale is adjusted appropriately when setting the positionUsesAnchorPoint to false\n" );
Actor actor = Actor::New();
- actor.SetParentOrigin( ParentOrigin::CENTER );
- actor.SetAnchorPoint( AnchorPoint::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
actor.SetSize( 100.0f, 100.0f );
actor.SetScale( 2.0f );
actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false );
application.Render();
tet_infoline( "Check the world position is the same as it would be without a scale\n" );
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION );
tet_infoline( "Change the Anchor Point to TOP_LEFT and ensure the world position changes accordingly" );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 100.0f, 100.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 100.0f, 100.0f, 0.0f ), TEST_LOCATION );
tet_infoline( "Change the Anchor Point to BOTTOM_RIGHT and ensure the world position changes accordingly" );
- actor.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
END_TEST;
}
tet_infoline( "Check that the rotation is adjusted appropriately when setting the positionUsesAnchorPoint to false\n" );
Actor actor = Actor::New();
- actor.SetParentOrigin( ParentOrigin::CENTER );
- actor.SetAnchorPoint( AnchorPoint::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
actor.SetSize( 100.0f, 100.0f );
actor.SetOrientation( Degree( 90.0f), Vector3::ZAXIS );
actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false );
application.Render();
tet_infoline( "Check the world position is the same as it would be without a rotation\n" );
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION );
tet_infoline( "Change the Anchor Point to TOP_LEFT and ensure the world position changes accordingly" );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( -50.0f, 50.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( -50.0f, 50.0f, 0.0f ), TEST_LOCATION );
tet_infoline( "Change the Anchor Point to BOTTOM_RIGHT and ensure the world position changes accordingly" );
- actor.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 150.0f, 50.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 150.0f, 50.0f, 0.0f ), TEST_LOCATION );
END_TEST;
}
tet_infoline( "Check that the scale and rotation is adjusted appropriately when setting the positionUsesAnchorPoint to false\n" );
Actor actor = Actor::New();
- actor.SetParentOrigin( ParentOrigin::CENTER );
- actor.SetAnchorPoint( AnchorPoint::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
actor.SetSize( 100.0f, 100.0f );
actor.SetOrientation( Degree( 90.0f), Vector3::ZAXIS );
actor.SetScale( 2.0f );
application.Render();
tet_infoline( "Check the world position is the same as it would be without a scale and rotation\n" );
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 50.0f, 50.0f, 0.0f ), TEST_LOCATION );
tet_infoline( "Change the Anchor Point to TOP_LEFT and ensure the world position changes accordingly" );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( -100.0f, 100.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( -100.0f, 100.0f, 0.0f ), TEST_LOCATION );
tet_infoline( "Change the Anchor Point to BOTTOM_RIGHT and ensure the world position changes accordingly" );
- actor.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), Vector3( 200.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), Vector3( 200.0f, 0.0f, 0.0f ), TEST_LOCATION );
END_TEST;
}
Vector2 stageSize( Stage::GetCurrent().GetSize() );
Actor actor = Actor::New();
- actor.SetParentOrigin( ParentOrigin::CENTER );
- actor.SetAnchorPoint( AnchorPoint::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
actor.SetSize( 100.0f, 100.0f );
- actor.SetInheritScale( false );
- actor.SetInheritOrientation( false );
+ actor.SetProperty( Actor::Property::INHERIT_SCALE, false );
+ actor.SetProperty( Actor::Property::INHERIT_ORIENTATION, false );
actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false );
parent.Add( actor );
const Vector3 expectedWorldPosition( -stageSize.width * 0.5f + 50.0f, -stageSize.height * 0.5f + 50.0f, 0.0f );
tet_infoline( "Check the world position is in the right place\n" );
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), expectedWorldPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), expectedWorldPosition, TEST_LOCATION );
tet_infoline( "Change the Anchor Point to TOP_LEFT and ensure world position hasn't changed" );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), expectedWorldPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), expectedWorldPosition, TEST_LOCATION );
tet_infoline( "Change the Anchor Point to BOTTOM_RIGHT and ensure world position hasn't changed" );
- actor.SetAnchorPoint( AnchorPoint::BOTTOM_RIGHT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentWorldPosition(), expectedWorldPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), expectedWorldPosition, TEST_LOCATION );
END_TEST;
}
VisibilityChangedFunctorData data;
DevelActor::VisibilityChangedSignal( actor ).Connect( &application, VisibilityChangedFunctor( data ) );
- actor.SetVisible( false );
+ actor.SetProperty( Actor::Property::VISIBLE, false );
data.Check( true /* called */, actor, false /* not visible */, DevelActor::VisibilityChange::SELF, TEST_LOCATION );
tet_infoline( "Ensure functor is not called if we attempt to change the visibility to what it already is at" );
data.Reset();
- actor.SetVisible( false );
+ actor.SetProperty( Actor::Property::VISIBLE, false );
data.Check( false /* not called */, TEST_LOCATION );
tet_infoline( "Change the visibility using properties, ensure called" );
DevelActor::VisibilityChangedSignal( child ).Connect( &application, VisibilityChangedFunctor( childData ) );
DevelActor::VisibilityChangedSignal( grandChild ).Connect( &application, VisibilityChangedFunctor( grandChildData ) );
- parent.SetVisible( false );
+ parent.SetProperty( Actor::Property::VISIBLE, false );
parentData.Check( false /* not called */, TEST_LOCATION );
childData.Check( true /* called */, child, false /* not visible */, DevelActor::VisibilityChange::PARENT, TEST_LOCATION );
grandChildData.Check( true /* called */, grandChild, false /* not visible */, DevelActor::VisibilityChange::PARENT, TEST_LOCATION );
DevelActor::VisibilityChangedSignal( parent ).Connect( &application, VisibilityChangedFunctor( parentData ) );
- parent.SetVisible( true );
+ parent.SetProperty( Actor::Property::VISIBLE, true );
parentData.Check( true /* called */, parent, true /* visible */, DevelActor::VisibilityChange::SELF, TEST_LOCATION );
childData.Check( true /* called */, child, true /* visible */, DevelActor::VisibilityChange::PARENT, TEST_LOCATION );
grandChildData.Check( true /* called */, grandChild, true /* visible */, DevelActor::VisibilityChange::PARENT, TEST_LOCATION );
childData.Reset();
grandChildData.Reset();
- parent.SetVisible( true );
+ parent.SetProperty( Actor::Property::VISIBLE, true );
parentData.Check( false /* not called */, TEST_LOCATION );
childData.Check( false /* not called */, TEST_LOCATION );
grandChildData.Check( false /* not called */, TEST_LOCATION );
bool signalCalled=false;
actor.ConnectSignal( &application, "visibilityChanged", VisibilityChangedVoidFunctor(signalCalled) );
DALI_TEST_EQUALS( signalCalled, false, TEST_LOCATION );
- actor.SetVisible( false );
+ actor.SetProperty( Actor::Property::VISIBLE, false );
DALI_TEST_EQUALS( signalCalled, true, TEST_LOCATION );
tet_infoline( "Ensure functor is not called if we attempt to change the visibility to what it already is at" );
signalCalled = false;
- actor.SetVisible( false );
+ actor.SetProperty( Actor::Property::VISIBLE, false );
DALI_TEST_EQUALS( signalCalled, false, TEST_LOCATION );
tet_infoline( "Change the visibility using properties, ensure called" );
auto& glAbstraction = application.GetGlAbstraction();
const auto clearCountBefore = glAbstraction.GetClearCountCalled();
- actor.SetVisible( false );
+ actor.SetProperty( Actor::Property::VISIBLE, false );
application.SendNotification();
application.Render();
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
// Restart the animation, with a different duration
finishCheck.Reset();
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
application.Render(static_cast<unsigned int>(durationSeconds*intervalSeconds*1000.0f));
progress += intervalSeconds;
- DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentPosition(), 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), 0.001f, TEST_LOCATION );
if (progress >= 1.0f)
{
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
finishCheck.Reset();
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f) );
finishCheck.Reset();
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
// Go back to the start
actor.SetPosition(Vector3::ZERO);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
// Test BakeFinal, animate again, for half the duration
finishCheck.Reset();
// We did NOT expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( targetPosition * 0.5f, actor.GetCurrentPosition(), VECTOR4_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition * 0.5f, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), VECTOR4_EPSILON, TEST_LOCATION );
// The position should be same with target position in the next frame
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
// Go back to the start
actor.SetPosition(Vector3::ZERO);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
// Test EndAction::Discard, animate again, but don't bake this time
finishCheck.Reset();
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
// The position should be discarded in the next frame
application.Render(0);
- DALI_TEST_EQUALS( Vector3::ZERO/*discarded*/, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3::ZERO/*discarded*/, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
}
// Bake
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition*0.5f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition*0.5f, TEST_LOCATION );
}
// Discard
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
}
// Don't play the animation: disconnect action should not be applied
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
}
END_TEST;
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION );
DALI_TEST_EQUALS( 0.6f, animation.GetCurrentProgress(), TEST_LOCATION );
animation.Play(); // Test that calling play has no effect, when animation is already playing
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION );
DALI_TEST_EQUALS( 0.8f, animation.GetCurrentProgress(), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 80% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*100.0f) + 1u/*just beyond half the duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 60% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 40% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 20% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), initialPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), initialPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( initialPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( initialPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.1f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.1f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 20% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 30% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.3f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.3f), TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 40% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*1200.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.1f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.1f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 20% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 30% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.3f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.3f), TEST_LOCATION );
tet_printf("Reverse direction of animation whilst playing\n");
tet_printf("SetSpeedFactor(-0.5f)\n");
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 10% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.1f), 0.0001, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.1f), 0.0001, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), initialPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), initialPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( initialPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( initialPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( initialPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
unsigned int actorIndex = 0u;
for( actorIndex = 0u; actorIndex < NUM_ENTRIES; ++actorIndex )
{
- DALI_TEST_EQUALS( actors[actorIndex].GetCurrentPosition().x, testData[actorIndex].expected[frame], 0.001, TEST_LOCATION );
- if( ! Equals(actors[actorIndex].GetCurrentPosition().x, testData[actorIndex].expected[frame]) )
+ DALI_TEST_EQUALS( actors[actorIndex].GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, testData[actorIndex].expected[frame], 0.001, TEST_LOCATION );
+ if( ! Equals(actors[actorIndex].GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, testData[actorIndex].expected[frame]) )
{
tet_printf("Failed at frame %u, actorIndex %u\n", frame, actorIndex );
}
for( unsigned int frame = 0; frame < NUM_FRAMES; ++frame )
{
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, testData.expected[frame], 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, testData.expected[frame], 0.001, TEST_LOCATION );
application.Render(200); // 200 ms at half speed corresponds to 0.1 s
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 80.0f, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, 80.0f, 0.001, TEST_LOCATION );
END_TEST;
}
for( unsigned int frame = 0; frame < NUM_FRAMES; ++frame )
{
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, testData.expected[frame], 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, testData.expected[frame], 0.001, TEST_LOCATION );
application.Render(200); // 200 ms at half speed corresponds to 0.1 s
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 30.0f, 0.001, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, 30.0f, 0.001, TEST_LOCATION );
END_TEST;
}
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.6f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.6f ), TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 200.0f )/* 80% progress */ );
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.8f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.8f ), TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds*100.0f ) + 1u/*just beyond the animation duration*/ );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.9f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.9f ), TEST_LOCATION );
END_TEST;
}
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION );
animation.Play(); // Test that calling play has no effect, when animation is already playing
application.SendNotification();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION );
animation.Play(); // Test that calling play has no effect, when animation is already playing
application.SendNotification();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION );
animation.Play(); // Test that calling play has no effect, when animation is already playing
application.SendNotification();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION );
animation.Play(); // Test that calling play has no effect, when animation is already playing
application.SendNotification();
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Vector3 basePosition(Vector3::ZERO);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), basePosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), basePosition, TEST_LOCATION );
// Not added to the stage yet!
// Build the animation
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(20,20,20), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(20,20,20), TEST_LOCATION );
// Add to the stage
Stage::GetCurrent().Add(actor);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION );
// Remove from the stage
Stage::GetCurrent().Remove(actor);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO/*back to start position as disconnect behaviour is discard*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO/*back to start position as disconnect behaviour is discard*/, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
// Add to the stage
Stage::GetCurrent().Add(actor);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(80,80,80), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(80,80,80), TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Vector3 basePosition(Vector3::ZERO);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), basePosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), basePosition, TEST_LOCATION );
// Not added to the stage!
// Build the animation
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(20,20,20), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(20,20,20), TEST_LOCATION );
// Add to the stage
Stage::GetCurrent().Add(actor);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION );
// Remove from the stage
Stage::GetCurrent().Remove(actor);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition /*bake final*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition /*bake final*/, TEST_LOCATION );
// Add to the stage
Stage::GetCurrent().Add(actor);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition /*bake final removed the */, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition /*bake final removed the */, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Vector3 basePosition(Vector3::ZERO);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), basePosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), basePosition, TEST_LOCATION );
// Not added to the stage!
// Build the animation
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(20,20,20), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(20,20,20), TEST_LOCATION );
// Add to the stage
Stage::GetCurrent().Add(actor);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40)/*on-stage*/, TEST_LOCATION );
// Remove from the stage
Stage::GetCurrent().Remove(actor); // baked here
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(40,40,40) /*baked value*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(40,40,40) /*baked value*/, TEST_LOCATION );
// Add back to the stage
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 80% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /* animation restarted at 40,40,40 + 80%*60 */, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /* animation restarted at 40,40,40 + 80%*60 */, TEST_LOCATION );
application.Render(static_cast<unsigned int>(0.0f) );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION );
application.Render(static_cast<unsigned int>(0.0f) );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION );
// Remove from the stage
Stage::GetCurrent().Remove(actor); // baked here
application.SendNotification();
// this render is a no-op in this case as animator is disabled while off stage
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 100% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION );
application.Render(static_cast<unsigned int>(0.0f) );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION );
application.Render(static_cast<unsigned int>(0.0f) );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) /*baked value*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) /*baked value*/, TEST_LOCATION );
// Add back to the stage
Stage::GetCurrent().Add(actor);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(88,88,88) , TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(88,88,88) , TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 40% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.4f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.4f), TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 60% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 80% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION );
// This is a test of the "Fire and Forget" behaviour
// Stop the animation, and Discard the animation handle!
application.SendNotification();
finishCheck.CheckSignalReceived();
finishCheck.Reset();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 60% progress */);
// Check that nothing has changed
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 80% progress */);
// Check that nothing has changed
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 100% progress */);
// Check that nothing has changed
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.2f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.2f), TEST_LOCATION );
END_TEST;
}
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION );
animation.Play(); // Test that calling play has no effect, when animation is already playing
application.SendNotification();
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition * 0.8f, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition * 0.8f, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition * 0.8f, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition * 0.8f, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
//Loop inside the range
progress = progress - 0.4f;
}
- DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentPosition(), 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), 0.001f, TEST_LOCATION );
}
// We didn't expect the animation to finish yet
progress = progress - 0.7f;
}
- DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentPosition(), 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition*progress, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), 0.001f, TEST_LOCATION );
}
END_TEST;
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.6f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.6f), TEST_LOCATION );
animation.Play(); // Test that calling play has no effect, when animation is already playing
application.SendNotification();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), (targetPosition * 0.8f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), (targetPosition * 0.8f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION );
// Pause the animation
animation.Pause();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION );
}
// Keep going
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
END_TEST;
}
application.SendNotification();
finishCheck.CheckSignalNotReceived();
DALI_TEST_EQUALS( animation.GetState(), Animation::PLAYING, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION );
// Pause the animation
animation.Pause();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress/* Still 50% progress when paused */, TEST_LOCATION );
DALI_TEST_EQUALS( animation.GetState(), Animation::PAUSED, TEST_LOCATION );
}
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
DALI_TEST_EQUALS( animation.GetState(), Animation::STOPPED, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( targetPosition, actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
DALI_TEST_EQUALS( animation.GetState(), Animation::STOPPED, TEST_LOCATION );
// re-play
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION );
// Stop the animation
animation.Stop();
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress when stopped */, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress/* Still 50% progress when stopped */, TEST_LOCATION );
}
END_TEST;
}
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION );
// Stop the animation
animation.Stop();
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), positionSet/*Animation should not interfere with this*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), positionSet/*Animation should not interfere with this*/, TEST_LOCATION );
}
END_TEST;
}
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress, TEST_LOCATION );
// Clear the animation
animation.Clear();
// We don't expect the animation to finish now
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), fiftyPercentProgress/* Still 50% progress since the animator was destroyed */, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), fiftyPercentProgress/* Still 50% progress since the animator was destroyed */, TEST_LOCATION );
// Restart as a scale animation; this should not move the actor's position
finishCheck.Reset();
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO/*Check move-animator was destroyed*/, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3(2.0f, 2.0f, 2.0f), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO/*Check move-animator was destroyed*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3(2.0f, 2.0f, 2.0f), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO/*Check move-animator was destroyed*/, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO/*Check move-animator was destroyed*/, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION );
END_TEST;
}
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ninetyFivePercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ninetyFivePercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*50.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
animation.AnimateBy( Property( actor, Actor::Property::POSITION_Y ), relativePosition.y );
animation.AnimateBy( Property( actor, Actor::Property::POSITION_Z ), relativePosition.z );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
// Start the animation
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Y ), targetPosition.y, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_Z ), targetPosition.z, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION ); // Not changed yet
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION ); // Not changed yet
application.SendNotification();
application.Render( 1000 ); // 1 second progress
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
finishCheck.CheckSignalNotReceived();
// The position should have moved more, than with a linear alpha function
- Vector3 current(actor.GetCurrentPosition());
+ Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
DALI_TEST_CHECK( current.x > ninetyFivePercentProgress.x );
DALI_TEST_CHECK( current.y > ninetyFivePercentProgress.y );
DALI_TEST_CHECK( current.z > ninetyFivePercentProgress.z );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), startPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), startPosition, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ) );
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ) );
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::ZAXIS ), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(actualRotationRadians * 0.25f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(actualRotationRadians * 0.5f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(actualRotationRadians * 0.75f, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(actualRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(actualRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::ZAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.25f*0.25f*0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.25f*0.25f*0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.5f*0.5f*0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.5f*0.5f*0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * 0.75f*0.75f*0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * 0.75f*0.75f*0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
actor.SetOrientation( Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(relativeRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale(), ninetyNinePercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), ninetyNinePercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
actor.SetScale(Vector3::ONE);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
// Repeat with a different (ease-in) alpha function
animation = Animation::New(durationSeconds);
finishCheck.CheckSignalNotReceived();
// The scale should have grown less, than with a linear alpha function
- Vector3 current(actor.GetCurrentScale());
+ Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ));
DALI_TEST_CHECK( current.x > 1.0f );
DALI_TEST_CHECK( current.y > 1.0f );
DALI_TEST_CHECK( current.z > 1.0f );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
actor.SetScale(Vector3::ONE);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
// Repeat with a delay
float delay = 0.5f;
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
animation.AnimateBy( Property( actor, Actor::Property::SCALE_Y ), relativeScale.y );
animation.AnimateBy( Property( actor, Actor::Property::SCALE_Z ), relativeScale.z );
- DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
// Start the animation
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Y ), targetScale.y, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SCALE_Z ), targetScale.z, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION ); // Not changed yet
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION ); // Not changed yet
application.SendNotification();
application.Render( 1000 ); // 1 second progress
- DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Vector4 relativeColor( targetColor - Color::WHITE );
animation.AnimateBy( Property( actor, Actor::Property::COLOR ), relativeColor );
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
// Start the animation
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), targetColor.b, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), targetColor.a, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); // Not changed yet
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Not changed yet
application.SendNotification();
application.Render( 1000 ); // 1 second progress
- DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
animation.AnimateBy( Property( actor, Actor::Property::COLOR_BLUE ), relativeColor.b );
animation.AnimateBy( Property( actor, Actor::Property::COLOR_ALPHA ), relativeColor.a );
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
// Start the animation
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), targetColor.b, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), targetColor.a, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION ); // Not changed yet
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION ); // Not changed yet
application.SendNotification();
application.Render( 1000 ); // 1 second progress
- DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Vector3 relativeSize( targetSize - Vector3::ZERO );
animation.AnimateBy( Property( actor, Actor::Property::SIZE ), relativeSize );
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Start the animation
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), targetSize.height, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), targetSize.depth, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); // Not changed yet
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Not changed yet
application.SendNotification();
application.Render( 1000 ); // 1 second progress
- DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
animation.AnimateBy( Property( actor, Actor::Property::SIZE_HEIGHT ), relativeSize.height );
animation.AnimateBy( Property( actor, Actor::Property::SIZE_DEPTH ), relativeSize.depth );
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Start the animation
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_HEIGHT ), targetSize.height, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::SIZE_DEPTH ), targetSize.depth, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION ); // Not changed yet
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION ); // Not changed yet
application.SendNotification();
application.Render( 1000 ); // 1 second progress
- DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION );
- actor.SetVisible( false );
+ actor.SetProperty( Actor::Property::VISIBLE, false );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.IsVisible(), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// Target value should be retrievable straight away
DALI_TEST_EQUALS( actor.GetProperty< bool >( Actor::Property::VISIBLE ), targetVisibility, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.IsVisible(), false, TEST_LOCATION ); // Not changed yet
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION ); // Not changed yet
application.SendNotification();
application.Render( 1000 ); // 1 second progress
- DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin(), ParentOrigin::TOP_LEFT, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_LEFT, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(0.0f);
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin().x, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).x, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::PARENT_ORIGIN_X), startValue, TEST_LOCATION );
// Build the animation
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(0.0f);
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin().y, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).y, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::PARENT_ORIGIN_Y), startValue, TEST_LOCATION );
// Build the animation
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(0.5f);
- DALI_TEST_EQUALS( actor.GetCurrentParentOrigin().z, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ).z, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::PARENT_ORIGIN_Z), startValue, TEST_LOCATION );
// Build the animation
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint(), AnchorPoint::CENTER, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), AnchorPoint::CENTER, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(0.5f);
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint().x, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).x, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::ANCHOR_POINT_X), startValue, TEST_LOCATION );
// Build the animation
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(0.5f);
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint().y, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).y, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::ANCHOR_POINT_Y), startValue, TEST_LOCATION );
// Build the animation
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(0.5f);
- DALI_TEST_EQUALS( actor.GetCurrentAnchorPoint().z, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ).z, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::ANCHOR_POINT_Z), startValue, TEST_LOCATION );
// Build the animation
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize(), ninetyNinePercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), ninetyNinePercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
actor.SetSize(Vector3::ZERO);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Repeat with a different (ease-in) alpha function
animation = Animation::New(durationSeconds);
finishCheck.CheckSignalNotReceived();
// The size should have travelled less, than with a linear alpha function
- Vector3 current(actor.GetCurrentSize());
+ Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
DALI_TEST_CHECK( current.x > 0.0f );
DALI_TEST_CHECK( current.y > 0.0f );
DALI_TEST_CHECK( current.z > 0.0f );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
actor.SetSize(Vector3::ZERO);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Repeat with a delay
float delay = 0.5f;
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(0.0f);
- DALI_TEST_EQUALS( actor.GetCurrentSize().width, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SIZE_WIDTH), startValue, TEST_LOCATION );
// Build the animation
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize().width, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, fiftyPercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize().width, targetWidth, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, targetWidth, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SIZE_WIDTH), targetWidth, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(0.0f);
- DALI_TEST_EQUALS( actor.GetCurrentSize().height, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SIZE_HEIGHT), startValue, TEST_LOCATION );
// Build the animation
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize().height, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, fiftyPercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize().height, targetHeight, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height, targetHeight, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SIZE_HEIGHT), targetHeight, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(0.0f);
- DALI_TEST_EQUALS( actor.GetCurrentSize().depth, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).depth, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SIZE_DEPTH), startValue, TEST_LOCATION );
// Build the animation
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize().depth, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).depth, fiftyPercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize().depth, targetDepth, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).depth, targetDepth, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SIZE_DEPTH), targetDepth, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize(), ninetyNinePercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), ninetyNinePercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize(), targetSize, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), targetSize, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
actor.SetSize(Vector3::ZERO);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Repeat with a different (ease-in) alpha function
animation = Animation::New(durationSeconds);
finishCheck.CheckSignalNotReceived();
// The size should have travelled less, than with a linear alpha function
- Vector3 current(actor.GetCurrentSize());
+ Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
DALI_TEST_CHECK( current.x > 0.0f );
DALI_TEST_CHECK( current.y > 0.0f );
DALI_TEST_CHECK( current.x < ninetyNinePercentProgress.x );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize().x, targetSize.x, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentSize().y, targetSize.y, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).x, targetSize.x, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y, targetSize.y, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
actor.SetSize(Vector3::ZERO);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Repeat with a delay
float delay = 0.5f;
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentSize().x, targetSize.x, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentSize().y, targetSize.y, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).x, targetSize.x, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y, targetSize.y, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), seventyFivePercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), seventyFivePercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(0.0f);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_X), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Y), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Z), startValue, TEST_LOCATION );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, fiftyPercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, targetX, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x, targetX, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_X), targetX, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Y), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Z), startValue, TEST_LOCATION );
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(0.0f);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().y, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_X), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Y), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Z), startValue, TEST_LOCATION );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition().y, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, fiftyPercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition().y, targetY, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).y, targetY, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_X), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Y), targetY, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Z), startValue, TEST_LOCATION );
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(0.0f);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().z, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_X), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Y), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Z), startValue, TEST_LOCATION );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition().z, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, fiftyPercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition().z, targetZ, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).z, targetZ, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_X), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Y), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Z), targetZ, TEST_LOCATION );
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
finishCheck.CheckSignalNotReceived();
// The position should have moved less, than with a linear alpha function
- Vector3 current(actor.GetCurrentPosition());
+ Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
DALI_TEST_CHECK( current.x > Vector3::ZERO.x );
DALI_TEST_CHECK( current.y > Vector3::ZERO.y );
DALI_TEST_CHECK( current.z > Vector3::ZERO.z );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f*0.75)/* 7/8 animation progress, 3/4 animator progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), seventyFivePercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), seventyFivePercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f*0.25) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f*0.75)/* 7/8 animation progress, 3/4 animator progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), seventyFivePercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), seventyFivePercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f*0.25) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(Radian(0.0f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(Radian(0.0f), Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.25f*0.25f*0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.25f*0.25f*0.25f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.5f*0.5f*0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.5f*0.5f*0.5f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * 0.75f*0.75f*0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * 0.75f*0.75f*0.75f, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
actor.SetOrientation(Quaternion( Dali::ANGLE_0, Vector3::YAXIS ) );
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion( Dali::ANGLE_0, Vector3::YAXIS ), ROTATION_EPSILON, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
float progress = max(0.0f, 0.25f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.5f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
progress = max(0.0f, 0.75f - delay) / (1.0f - delay);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians * progress*progress*progress, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), Quaternion(targetRotationRadians, Vector3::YAXIS), ROTATION_EPSILON, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale(), ninetyNinePercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), ninetyNinePercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*10.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
actor.SetScale(Vector3::ONE);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
// Repeat with a different (ease-in) alpha function
animation = Animation::New(durationSeconds);
finishCheck.CheckSignalNotReceived();
// The scale should have grown less, than with a linear alpha function
- Vector3 current(actor.GetCurrentScale());
+ Vector3 current(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ));
DALI_TEST_CHECK( current.x > 1.0f );
DALI_TEST_CHECK( current.y > 1.0f );
DALI_TEST_CHECK( current.z > 1.0f );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
actor.SetScale(Vector3::ONE);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
// Repeat with a delay
float delay = 0.5f;
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale(), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale(), targetScale, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), targetScale, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(1.0f);
- DALI_TEST_EQUALS( actor.GetCurrentScale().x, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SCALE_X), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SCALE_Y), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SCALE_Z), startValue, TEST_LOCATION );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale().x, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x, fiftyPercentProgress, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), fiftyPercentProgress, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), startValue, TEST_LOCATION );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale().x, targetX, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).x, targetX, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), targetX, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), startValue, TEST_LOCATION );
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(1.0f);
- DALI_TEST_EQUALS( actor.GetCurrentScale().y, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).y, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SCALE_X), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SCALE_Y), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SCALE_Z), startValue, TEST_LOCATION );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale().y, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).y, fiftyPercentProgress, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), fiftyPercentProgress, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), startValue, TEST_LOCATION );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale().y, targetY, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).y, targetY, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), targetY, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), startValue, TEST_LOCATION );
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(1.0f);
- DALI_TEST_EQUALS( actor.GetCurrentScale().z, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).z, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SCALE_X), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SCALE_Y), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::SCALE_Z), startValue, TEST_LOCATION );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale().z, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).z, fiftyPercentProgress, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), fiftyPercentProgress, TEST_LOCATION );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentScale().z, targetZ, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ).z, targetZ, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_X ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Y ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::SCALE_Z ), targetZ, TEST_LOCATION );
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor(), tenPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), tenPercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*900.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
- actor.SetColor(Color::WHITE);
+ actor.SetProperty( Actor::Property::COLOR,Color::WHITE);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
// Repeat with a different (ease-in) alpha function
animation = Animation::New(durationSeconds);
finishCheck.CheckSignalNotReceived();
// The color should have changed less, than with a linear alpha function
- Vector4 current(actor.GetCurrentColor());
+ Vector4 current(actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ));
DALI_TEST_CHECK( current.x == 1.0f ); // doesn't change
DALI_TEST_CHECK( current.y < 1.0f );
DALI_TEST_CHECK( current.y > tenPercentProgress.y );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
- actor.SetColor(Color::WHITE);
+ actor.SetProperty( Actor::Property::COLOR,Color::WHITE);
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::WHITE, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::WHITE, TEST_LOCATION );
// Repeat with a shorter animator duration
float animatorDuration = 0.5f;
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor(), twentyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), twentyPercentProgress, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*400.0f)/* 50% animation progress, 100% animator progress */);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor(), targetColor, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), targetColor, TEST_LOCATION );
END_TEST;
}
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(1.0f);
- DALI_TEST_EQUALS( actor.GetCurrentColor().r, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).r, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor().r, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).r, fiftyPercentProgress, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED), fiftyPercentProgress, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor().r, targetRed, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).r, targetRed, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED), targetRed, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(1.0f);
- DALI_TEST_EQUALS( actor.GetCurrentColor().g, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).g, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor().g, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).g, fiftyPercentProgress, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), fiftyPercentProgress, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor().g, targetGreen, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).g, targetGreen, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), targetGreen, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(1.0f);
- DALI_TEST_EQUALS( actor.GetCurrentColor().b, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).b, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor().b, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).b, fiftyPercentProgress, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), fiftyPercentProgress, TEST_LOCATION );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor().b, targetBlue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).b, targetBlue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), targetBlue, TEST_LOCATION );
Actor actor = Actor::New();
Stage::GetCurrent().Add(actor);
float startValue(1.0f);
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, fiftyPercentProgress, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, targetAlpha, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, targetAlpha, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_RED ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
float startValue(1.0f);
Actor actor = Actor::New();
- actor.SetColor(Vector4(startValue, startValue, startValue, startValue));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
application.Render(0);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.1f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.1f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*100.0f)/* 10% progress */);
application.SendNotification();
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.3f, 0.01f, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.3f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.3f, 0.01f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 30% progress */);
application.SendNotification();
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.25f, 0.01f, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.25f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.25f, 0.01f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*100.0f)/* 40% progress */);
application.SendNotification();
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.0f, 0.01f, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.0f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.0f, 0.01f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*400.0f)/* 80% progress */);
application.SendNotification();
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.7f, 0.01f, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.7f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.7f, 0.01f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*100.0f)/* 90% progress */);
application.SendNotification();
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.8f, 0.01f, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.8f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.8f, 0.01f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*100.0f)+1/* 100% progress */);
application.SendNotification();
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA), 0.9f, 0.01f, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.9f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.9f, 0.01f, TEST_LOCATION );
// We did expect the animation to finish
float startValue(1.0f);
Actor actor = Actor::New();
- actor.SetColor(Vector4(startValue, startValue, startValue, startValue));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
application.Render(0);
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.1f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.1f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*100.0f)/* 10% progress */);
application.SendNotification();
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.36f, 0.01f, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.36f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.36f, 0.01f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 30% progress */);
application.SendNotification();
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.21f, 0.01f, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.21f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.21f, 0.01f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*100.0f)/* 40% progress */);
application.SendNotification();
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.0f, 0.01f, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.0f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.0f, 0.01f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*400.0f)/* 80% progress */);
application.SendNotification();
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.7f, 0.01f, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.7f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.7f, 0.01f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*100.0f)/* 90% progress */);
application.SendNotification();
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.76f, 0.01f, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.76f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.76f, 0.01f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*100.0f)+1/* 100% progress */);
application.SendNotification();
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::COLOR_ALPHA ), 0.9f, 0.01f, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.9f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.9f, 0.01f, TEST_LOCATION );
// We did expect the animation to finish
float startValue(1.0f);
Actor actor = Actor::New();
- actor.SetColor(Vector4(startValue, startValue, startValue, startValue));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
float startValue(1.0f);
Actor actor = Actor::New();
- actor.SetColor(Vector4(startValue, startValue, startValue, startValue));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
animation.Play();
// Final key frame value should be retrievable straight away
- DALI_TEST_EQUALS( actor.GetProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION );
bool signalReceived(false);
AnimationFinishCheck finishCheck(signalReceived);
application.Render(static_cast<unsigned int>(durationSeconds*500.0f)+1);
application.SendNotification();
- DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION);
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION);
finishCheck.CheckSignalReceived();
END_TEST;
}
application.SendNotification();
application.Render(0);
- DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
application.Render(static_cast<unsigned int>(durationSeconds*500.0f)+1);
application.SendNotification();
- DALI_TEST_EQUALS( actor.IsVisible(), true, TEST_LOCATION);
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION);
finishCheck.CheckSignalReceived();
END_TEST;
}
application.SendNotification();
application.Render(0);
Quaternion start(Radian(aa.angle), aa.axis);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Quaternion check( Radian(Degree(60)), Vector3::ZAXIS );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION );
finishCheck.CheckSignalReceived();
END_TEST;
}
Stage::GetCurrent().Add(actor);
Quaternion start(Radian(aa.angle), aa.axis);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
finishCheck.CheckSignalNotReceived();
Quaternion check(Radian(Degree(60)), Vector3::XAXIS);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
application.SendNotification();
check = Quaternion( Radian(Degree(90)), Vector3::XAXIS );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
check = Quaternion( Radian(Degree(120)), Vector3::XAXIS );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
check = Quaternion( Radian(Degree(101.5)), Vector3(0.5f, 0.5f, 0.0f) );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)+1/* 100% progress */);
application.SendNotification();
check = Quaternion( Radian(Degree(120)), Vector3::YAXIS );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION );
// We did expect the animation to finish
application.SendNotification();
application.Render(0);
Quaternion start(Radian(aa.angle), aa.axis);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
Quaternion check( Radian(Degree(60)), Vector3::ZAXIS );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION );
finishCheck.CheckSignalReceived();
END_TEST;
}
Stage::GetCurrent().Add(actor);
Quaternion start(Radian(aa.angle), aa.axis);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), start, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), start, 0.001f, TEST_LOCATION );
// Build the animation
float durationSeconds(1.0f);
finishCheck.CheckSignalNotReceived();
Quaternion check(Radian(Degree(60)), Vector3::XAXIS);
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
application.SendNotification();
check = Quaternion( Radian(Degree(90)), Vector3::XAXIS );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
check = Quaternion( Radian(Degree(120)), Vector3::XAXIS );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
check = Quaternion( Radian(Degree(101.5)), Vector3(0.5f, 0.5f, 0.0f ) );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)+1/* 100% progress */);
application.SendNotification();
check = Quaternion( Radian(Degree(120)), Vector3::YAXIS );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), check, 0.001f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), check, 0.001f, TEST_LOCATION );
// We did expect the animation to finish
float startValue(1.0f);
Actor actor = Actor::New();
- actor.SetColor(Vector4(startValue, startValue, startValue, startValue));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
float startValue(1.0f);
Actor actor = Actor::New();
- actor.SetColor(Vector4(startValue, startValue, startValue, startValue));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
float startValue(1.0f);
Actor actor = Actor::New();
- actor.SetColor(Vector4(startValue, startValue, startValue, startValue));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
float startValue(1.0f);
Actor actor = Actor::New();
- actor.SetColor(Vector4(startValue, startValue, startValue, startValue));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
float startValue(1.0f);
float delay = 0.5f;
Actor actor = Actor::New();
- actor.SetColor(Vector4(startValue, startValue, startValue, startValue));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
float startValue(1.0f);
Actor actor = Actor::New();
- actor.SetColor(Vector4(startValue, startValue, startValue, startValue));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(startValue, startValue, startValue, startValue));
Stage::GetCurrent().Add(actor);
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
Quaternion rotation;
path.Sample( 0.0f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
application.SendNotification();
path.Sample( 0.25f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
path.Sample( 0.5f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
path.Sample( 0.75f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)+1/* 100% progress */);
application.SendNotification();
path.Sample( 1.0f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
finishCheck.CheckSignalReceived();
END_TEST;
Quaternion rotation;
path.Sample( 0.0f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
application.SendNotification();
path.Sample( 0.25f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
path.Sample( 0.5f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
path.Sample( 0.75f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)+1/* 100% progress */);
application.SendNotification();
path.Sample( 1.0f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
finishCheck.CheckSignalReceived();
END_TEST;
Quaternion rotation;
path.Sample( 0.0f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
application.SendNotification();
path.Sample( 0.25f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
path.Sample( 0.5f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
path.Sample( 0.75f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)+1/* 100% progress */);
application.SendNotification();
path.Sample( 1.0f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
finishCheck.CheckSignalReceived();
END_TEST;
Quaternion rotation;
path.Sample( 0.0f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
application.SendNotification();
path.Sample( 0.25f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
application.SendNotification();
path.Sample( 0.5f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
application.SendNotification();
path.Sample( 0.75f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)+1/* 100% progress */);
application.SendNotification();
path.Sample( 1.0f, position, tangent );
rotation = Quaternion( Vector3::XAXIS, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
- DALI_TEST_EQUALS( actor.GetCurrentOrientation(), rotation, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::ORIENTATION ), rotation, TEST_LOCATION );
finishCheck.CheckSignalReceived();
END_TEST;
TestApplication application;
Actor actor = Actor::New();
- actor.SetVisible(false);
+ actor.SetProperty( Actor::Property::VISIBLE,false);
application.SendNotification();
application.Render(0);
- DALI_TEST_CHECK( !actor.IsVisible() );
+ DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
Stage::GetCurrent().Add(actor);
// Start the animation
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_CHECK( !actor.IsVisible() );
+ DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*10.0f)/*Should be shown now*/);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_CHECK( actor.IsVisible() );
+ DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_CHECK( actor.IsVisible() );
+ DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- DALI_TEST_CHECK( actor.IsVisible() );
+ DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
Stage::GetCurrent().Add(actor);
// Start the animation
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_CHECK( actor.IsVisible() );
+ DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*10.0f)/*Should be hidden now*/);
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_CHECK( !actor.IsVisible() );
+ DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_CHECK( !actor.IsVisible() );
+ DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- DALI_TEST_CHECK( actor.IsVisible() );
+ DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
Stage::GetCurrent().Add(actor);
// Start Hide animation
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_CHECK( !actor.IsVisible() );
+ DALI_TEST_CHECK( !actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
// Start Show animation
animation = Animation::New(durationSeconds);
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_CHECK( actor.IsVisible() );
+ DALI_TEST_CHECK( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) );
END_TEST;
}
//Test GetCurrentProgress return 0.0 as the duration is 0.0
DALI_TEST_EQUALS( 0.0f, animation.GetCurrentProgress(), TEST_LOCATION );
- DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
tet_infoline("Set target position in animation without intiating play");
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Y), targetPosition.y, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Z), targetPosition.z, TEST_LOCATION );
- tet_printf( "x position at half way point(%f)\n", actor.GetCurrentPosition().x );
+ tet_printf( "x position at half way point(%f)\n", actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x );
application.Render(2000u);
//Test GetCurrentProgress return 0.0 as the duration is 0.0
DALI_TEST_EQUALS( 0.0f, animation.GetCurrentProgress(), TEST_LOCATION );
- DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3( 0.0f, 0.0f, 0.0f ), actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
tet_infoline("Set target position in animation without intiating play");
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Y), targetPositions[2].y, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::POSITION_Z), targetPositions[2].z, TEST_LOCATION );
- tet_printf( "x position at half way point(%f)\n", actor.GetCurrentPosition().x );
+ tet_printf( "x position at half way point(%f)\n", actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ).x );
application.Render(2000u);
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
application.SendNotification();
application.Render(5000); // After the animation is complete
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 100.0f, TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION );
application.SendNotification();
application.Render(5000); // After the animation is complete
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 0.0f, 0.0f ), TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 100.0f, TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
application.SendNotification();
application.Render(14000); // After the animation is complete
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 145.0f, TEST_LOCATION );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 0.0f, TEST_LOCATION );
application.SendNotification();
application.Render(14000); // After the animation is complete
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 145.0f, 0.0f, 0.0f ), TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetCurrentProperty< float >( Actor::Property::POSITION_X ), 145.0f, TEST_LOCATION );
application.SendNotification();
finishCheck.CheckSignalReceived();
tet_infoline( "Animation finished" );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
application.Render( durationSeconds * 200.f ); // The intial delay time of PlayAfter
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move
application.Render( static_cast< unsigned int >( durationSeconds * 500.0f )/* 50% animation progress, 0% animator progress */ );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 75% animation progress, 50% animator progress */ );
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f ) + 1u/*just beyond the animation duration*/ );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
}
tet_printf("Testing that playing after 2 seconds with negative speedfactor\n");
application.Render( durationSeconds * 200.f ); // The intial delay time of PlayAfter
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 1.0f ), TEST_LOCATION ); // Not move. NOTE SpeedFactor < 0 so 'targetPosition' is start position.
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 1.0f ), TEST_LOCATION ); // Not move. NOTE SpeedFactor < 0 so 'targetPosition' is start position.
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 25% animation progress, 50% animator progress */ );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 50% animation progress, 100% animator progress */ );
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 500.0f ) + 1u/*just beyond the animation duration*/ );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of Timeperiod in seconds
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of Timeperiod in seconds
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(0.0, 0.0, 0.0), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0, 0.0, 0.0), TEST_LOCATION );
}
END_TEST;
application.Render( durationSeconds * 200.f ); // The intial delay time of PlayAfter
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move
}
application.Render( static_cast< unsigned int >( durationSeconds * 500.0f )/* 50% animation progress, 0% animator progress */ );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 75% animation progress, 50% animator progress */ );
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f ) /* 100% progress */ );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
}
animation.SetLooping(false);
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
}
tet_printf("Testing that playing after 2 seconds before looping with negative speedfactor\n");
application.Render( durationSeconds * 200.f ); // The intial delay time of PlayAfter
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 1.0f ), TEST_LOCATION ); // Not move. NOTE SpeedFactor < 0 so 'targetPosition' is start position.
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 1.0f ), TEST_LOCATION ); // Not move. NOTE SpeedFactor < 0 so 'targetPosition' is start position.
}
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 25% animation progress, 50% animator progress */ );
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 50% animation progress, 100% animator progress */ );
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 500.0f ) /* 100% progress */ );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in second
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in second
}
animation.SetLooping(false);
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3(0.0, 0.0, 0.0), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3(0.0, 0.0, 0.0), TEST_LOCATION );
}
END_TEST;
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 75% animation progress, 50% animator progress */ );
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.5f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.5f ), TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f ) + 1u/*just beyond the animation duration*/ );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
// We didn't expect the animation to finish yet
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of PlayAfter
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of PlayAfter
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 100% delay progress, 20% animation progress, 0% animator progress */ );
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 100% delay progress, 45% animation progress, 0% animator progress */ );
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.0f ), TEST_LOCATION ); // Not move - A delay time of TimePeriod in seconds
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 100% delay progress, 70% animation progress, 40% animator progress */ );
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.4f ), TEST_LOCATION ); // 40% of animator progress
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.4f ), TEST_LOCATION ); // 40% of animator progress
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 250.0f )/* 100% delay progress, 95% animation progress, 90% animator progress */ );
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), ( targetPosition * 0.9f ), TEST_LOCATION ); // 90% of animator progress
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), ( targetPosition * 0.9f ), TEST_LOCATION ); // 90% of animator progress
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 50.0f ) + 1u/*just beyond the animation duration*/ );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// Check that nothing has changed after a couple of buffer swaps
application.Render(0);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
}
// LoopingMode::AUTO_REVERSE
// AUTO_REVERSE mode means, for Animation duration time, the actor starts from the beginning, passes the targetPosition,
// and arrives at the beginning.
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 500.0f )/* 100% time progress */ );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
}
animation.SetLooping( false );
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
}
// LoopingMode::AUTO_REVERSE in Reverse mode, which begin from the end
// Setting a negative speed factor is to play the animation in reverse.
// So, when LoopingMode::AUTO_REVERSE and SetSpeedFactor( -1.0f ) is, for Animation duration time,
// the actor starts from the targetPosition, passes the beginning, and arrives at the targetPosition.
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 500.0f )/* 100% time progress */ );
// We did expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalNotReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
}
animation.SetLooping( false );
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
}
END_TEST;
application.Render(static_cast<unsigned int>(durationSeconds*intervalSeconds*1000.0f));
// AUTO_REVERSE mode means, for Animation duration time, the actor starts from the beginning, passes the targetPosition,
// and arrives at the beginning.
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*intervalSeconds*1000.0f));
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
finishCheck.Reset();
}
// Setting a negative speed factor is to play the animation in reverse.
// So, when LoopingMode::AUTO_REVERSE and SetSpeedFactor( -1.0f ) is, for Animation duration time,
// the actor starts from the targetPosition, passes the beginning, and arrives at the targetPosition.
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
application.Render(static_cast<unsigned int>(durationSeconds*intervalSeconds*1000.0f));
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
finishCheck.Reset();
}
// AUTO_REVERSE mode means, for Animation duration time, the actor starts from the beginning, passes the targetPosition,
// and arrives at the beginning.
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 0.5f * 1000.0f )/* 100% time progress */ );
application.SendNotification();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 1.0f * 1000.0f ) + 1u /*just beyond the animation duration*/ );
finishCheck.CheckSignalReceived();
// After all animation finished, arrives at the beginning.
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
finishCheck.Reset();
}
// Setting a negative speed factor is to play the animation in reverse.
// So, when LoopingMode::AUTO_REVERSE and SetSpeedFactor( -1.0f ) is, for Animation duration time,
// the actor starts from the targetPosition, passes the beginning, and arrives at the targetPosition.
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 0.5f * 1000.0f )/* 100% time progress */ );
application.SendNotification();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
application.SendNotification();
application.Render( static_cast< unsigned int >( durationSeconds * 1.0f * 1000.0f ) + 1u /*just beyond the animation duration*/ );
finishCheck.CheckSignalReceived();
// After all animation finished, arrives at the target.
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
finishCheck.Reset();
}
application.SendNotification();
finishCheck.CheckSignalReceived();
tet_infoline( "Animation finished" );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
END_TEST;
}
std::stringstream stream;
stream << "Actor " << i+1;
- actor.SetName(stream.str());
+ actor.SetProperty( Actor::Property::NAME,stream.str());
myVector.push_back(actor);
}
DALI_TEST_EQUALS(TargetVectorSize, static_cast<int>(myVector.size()), TEST_LOCATION);
- DALI_TEST_CHECK(myVector[0].GetName() == "Actor 1");
- DALI_TEST_CHECK(myVector[1].GetName() == "Actor 2");
- DALI_TEST_CHECK(myVector[2].GetName() == "Actor 3");
- DALI_TEST_CHECK(myVector[3].GetName() == "Actor 4");
- DALI_TEST_CHECK(myVector[4].GetName() == "Actor 5");
+ DALI_TEST_CHECK(myVector[0].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 1");
+ DALI_TEST_CHECK(myVector[1].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 2");
+ DALI_TEST_CHECK(myVector[2].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 3");
+ DALI_TEST_CHECK(myVector[3].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 4");
+ DALI_TEST_CHECK(myVector[4].GetProperty< std::string >( Actor::Property::NAME ) == "Actor 5");
END_TEST;
}
DALI_TEST_CHECK(actorObject.DoAction("invalidCommand", attributes) == false);
// Check that the actor is visible
- actor.SetVisible(true);
- DALI_TEST_CHECK(actor.IsVisible() == true);
+ actor.SetProperty( Actor::Property::VISIBLE,true);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true);
// Check the actor performed an action to hide itself
DALI_TEST_CHECK(actorObject.DoAction("hide", attributes) == true);
application.Render();
// Check that the actor is now invisible
- DALI_TEST_CHECK(actor.IsVisible() == false);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == false);
// Check the actor performed an action to show itself
DALI_TEST_CHECK(actorObject.DoAction("show", attributes) == true);
application.Render();
// Check that the actor is now visible
- DALI_TEST_CHECK(actor.IsVisible() == true);
+ DALI_TEST_CHECK(actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true);
Stage::GetCurrent().Add(actor);
// We expect the animation to finish
application.SendNotification();
finishCheck.CheckSignalReceived();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), targetPosition, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), targetPosition, TEST_LOCATION );
// play again
signalReceived = false;
// get the root layer
Actor actor = Actor::New();
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.SetPosition( 240, 400 );
actor.SetSize( 100, 100 );
BufferImage image = BufferImage::New(buffer, 16, 16, Pixel::A8);
Actor actor = CreateRenderableActor( image );
Stage::GetCurrent().Add(actor);
- actor.SetVisible(true);
+ actor.SetProperty( Actor::Property::VISIBLE,true);
std::vector<GLuint> ids;
ids.push_back(200);
BufferImage image = BufferImage::New(buffer, 16, 16, Pixel::A8);
Actor actor = CreateRenderableActor( image );
Stage::GetCurrent().Add(actor);
- actor.SetVisible(true);
+ actor.SetProperty( Actor::Property::VISIBLE,true);
application.SendNotification();
application.Render(0);
actor.GetProperty( CameraActor::Property::FIELD_OF_VIEW ).Get( defaultFieldOfView );
actor.GetProperty( CameraActor::Property::NEAR_PLANE_DISTANCE ).Get( defaultNearPlaneDistance );
actor.GetProperty( CameraActor::Property::FAR_PLANE_DISTANCE ).Get( defaultFarPlaneDistance );
- Vector3 defaultPos = actor.GetCurrentPosition();
+ Vector3 defaultPos = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
actor.SetOrthographicProjection( Size( 1080.0f, 1920.0f ) );
actor.GetProperty( CameraActor::Property::BOTTOM_PLANE_DISTANCE ).Get( value );
DALI_TEST_EQUALS( -960.0f, value, FLOAT_EPSILON, TEST_LOCATION );
- Vector3 pos = actor.GetCurrentPosition();
+ Vector3 pos = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
DALI_TEST_EQUALS( defaultPos.z, pos.z, 0.001f, TEST_LOCATION );
DALI_TEST_EQUALS( actor.GetProjectionMode(), Dali::Camera::ORTHOGRAPHIC_PROJECTION, TEST_LOCATION );
Actor actor = CreateRenderableActor(image);
actor.SetSize( 100.0f, 100.0f );
actor.SetPosition( 20.0f, 30.0f, 40.0f );
- actor.SetParentOrigin( ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( actor );
application.SendNotification();
application.SendNotification();
Matrix resultMatrix( true );
- resultMatrix.SetTransformComponents( Vector3::ONE, Quaternion::IDENTITY, actor.GetCurrentPosition() );
+ resultMatrix.SetTransformComponents( Vector3::ONE, Quaternion::IDENTITY, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) );
RenderTask task = Stage::GetCurrent().GetRenderTaskList().GetTask( 0 );
CameraActor cameraActor = task.GetCameraActor();
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3( 100.0f, 200.0f, 300.0f ), TEST_LOCATION);
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3( 100.0f, 200.0f, 300.0f ), TEST_LOCATION);
END_TEST;
}
Vector2 stageSize = stage.GetSize();
CameraActor freeLookCameraActor = CameraActor::New( stageSize );
- freeLookCameraActor.SetParentOrigin( ParentOrigin::CENTER );
+ freeLookCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
freeLookCameraActor.SetType( Camera::FREE_LOOK );
Vector3 targetPosition( 30.0f, 240.0f, -256.0f );
Actor target = Actor::New();
- target.SetParentOrigin( ParentOrigin::CENTER );
+ target.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
target.SetPosition( targetPosition );
Constraint cameraOrientationConstraint = Constraint::New<Quaternion> ( freeLookCameraActor, Actor::Property::ORIENTATION, &LookAt );
CameraActor lookAtCameraActor = CameraActor::New( stageSize );
lookAtCameraActor.SetType( Camera::LOOK_AT_TARGET );
lookAtCameraActor.SetTargetPosition( targetPosition );
- lookAtCameraActor.SetParentOrigin( ParentOrigin::CENTER );
+ lookAtCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
stage.Add( target );
stage.Add( freeLookCameraActor );
Vector2 stageSize = stage.GetSize();
CameraActor freeLookCameraActor = CameraActor::New( stageSize );
- freeLookCameraActor.SetParentOrigin( ParentOrigin::CENTER );
+ freeLookCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
freeLookCameraActor.SetType( Camera::FREE_LOOK );
Vector3 targetPosition( 30.0f, 240.0f, -256.0f );
Actor target = Actor::New();
- target.SetParentOrigin( ParentOrigin::CENTER );
+ target.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
target.SetPosition( targetPosition );
Constraint cameraOrientationConstraint = Constraint::New<Quaternion> ( freeLookCameraActor, Actor::Property::ORIENTATION, &LookAt );
CameraActor lookAtCameraActor = CameraActor::New( stageSize );
lookAtCameraActor.SetType( Camera::LOOK_AT_TARGET );
lookAtCameraActor.SetTargetPosition( targetPosition );
- lookAtCameraActor.SetParentOrigin( ParentOrigin::CENTER );
+ lookAtCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
stage.Add( target );
stage.Add( freeLookCameraActor );
Matrix freeLookViewMatrix;
freeLookCameraActor.GetProperty( CameraActor::CameraActor::Property::VIEW_MATRIX ).Get( freeLookViewMatrix );
- Matrix freeLookWorld = freeLookCameraActor.GetCurrentWorldMatrix();
+ Matrix freeLookWorld = freeLookCameraActor.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX );
Matrix freeLookTest( false );
Matrix::Multiply( freeLookTest, freeLookViewMatrix, freeLookWorld );
CameraActor freeLookCameraActor = CameraActor::New( stageSize );
freeLookCameraActor.SetType( Camera::FREE_LOOK );
- freeLookCameraActor.SetParentOrigin( ParentOrigin::CENTER );
+ freeLookCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Quaternion cameraOrientation( Radian( Degree( 180.0f ) ), Vector3::YAXIS );
freeLookCameraActor.SetPosition( cameraOffset );
Matrix freeLookViewMatrix;
freeLookCameraActor.GetProperty( CameraActor::CameraActor::Property::VIEW_MATRIX ).Get( freeLookViewMatrix );
- Matrix freeLookWorld = freeLookCameraActor.GetCurrentWorldMatrix();
+ Matrix freeLookWorld = freeLookCameraActor.GetCurrentProperty< Matrix >( Actor::Property::WORLD_MATRIX );
Matrix freeLookTest( false );
Matrix::Multiply( freeLookTest, freeLookViewMatrix, freeLookWorld );
Vector3 position, tangent;
path.Sample(0.2f, position, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 40% progress */);
path.Sample(0.4f, position, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 60% progress */);
path.Sample(0.6f, position, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 80% progress */);
path.Sample(0.8f, position, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 100% progress */);
path.Sample(1.0f, position, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* beyond the animation duration*/);
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
END_TEST;
}
actor.GetCurrentProperty( index ).Get(tValue);
float currentCursor = ( tValue - range.x ) / (range.y-range.x);
path.Sample(currentCursor, position, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
currentCursor = ( tValue - range.x ) / (range.y-range.x);
path.Sample(currentCursor, position, tangent );
path.Sample(0.5, position, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
actor.GetCurrentProperty( index ).Get( tValue );
currentCursor = ( tValue - range.x ) / (range.y-range.x);
path.Sample(currentCursor, position, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 100% progress */);
actor.GetCurrentProperty( index ).Get( tValue );
currentCursor = ( tValue - range.x ) / (range.y-range.x);
path.Sample(currentCursor, position, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* beyond the animation duration*/);
actor.GetCurrentProperty( index ).Get( tValue );
currentCursor = ( tValue - range.x ) / (range.y-range.x);
path.Sample(currentCursor, position, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
// Ensure GetProperty also returns the final result
actor.GetProperty( index ).Get( tValue );
currentCursor = ( tValue - range.x ) / (range.y-range.x);
path.Sample(currentCursor, position, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
END_TEST;
}
Vector3 position, tangent;
path.Sample(0.5f, position, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
}
application.SendNotification();
application.Render(static_cast<unsigned int>(1.0f));
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
END_TEST;
}
Vector3 position, tangent;
path.Sample(0.5f, position, tangent );
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), position, TEST_LOCATION );
//Remove constraint
pathConstrainer.Remove( actor );
application.SendNotification();
application.Render(static_cast<unsigned int>(1.0f));
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), Vector3::ZERO, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ), Vector3::ZERO, TEST_LOCATION );
END_TEST;
}
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.5f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.5f, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.5f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.5f, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 100% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* beyond the animation duration*/);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION );
//Setup a LinearConstrainer specifying the progress for each value
linearConstrainer.Remove(actor);
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 2.0f/3.0f, Math::MACHINE_EPSILON_1, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 2.0f/3.0f, Math::MACHINE_EPSILON_1, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f/3.0f, Math::MACHINE_EPSILON_1, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f/3.0f, Math::MACHINE_EPSILON_1, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 100% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* beyond the animation duration*/);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION );
END_TEST;
}
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 25% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.5f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.5f, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 50% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 75% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.5f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.5f, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* 100% progress */);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION );
application.SendNotification();
application.Render(static_cast<unsigned int>(durationSeconds*250.0f)/* beyond the animation duration*/);
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION );
END_TEST;
}
application.SendNotification();
application.Render(static_cast<unsigned int>(1.0f));
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION );
}
application.SendNotification();
application.Render(static_cast<unsigned int>(1.0f));
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION );
END_TEST;
}
application.SendNotification();
application.Render(static_cast<unsigned int>(1.0f));
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 1.0f, TEST_LOCATION );
//Remove constraint
linearConstrainer.Remove( actor );
application.SendNotification();
application.Render(static_cast<unsigned int>(1.0f));
- DALI_TEST_EQUALS( actor.GetCurrentPosition().x, 0.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ).x, 0.0f, TEST_LOCATION );
END_TEST;
}
// Should not equal position by default
Vector3 position( 10.0f, 20.0f, 30.0f );
- DALI_TEST_CHECK( actor.GetCurrentPosition() != position );
+ DALI_TEST_CHECK( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) != position );
// Create a constraint that constrains to position
Constraint constraint = Constraint::New< Vector3 >( actor, Actor::Property::POSITION, SetValueFunctor< Vector3 >( position ) );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
// Remove the constraint, it should still be at position
constraint.Remove();
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
END_TEST;
}
application.Render();
// Get and store current position
- Vector3 originalPosition = actor.GetCurrentPosition();
+ Vector3 originalPosition = actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION );
// Should not equal position by default
Vector3 position( 10.0f, 20.0f, 30.0f );
- DALI_TEST_CHECK( actor.GetCurrentPosition() != position );
+ DALI_TEST_CHECK( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) != position );
// Create a constraint that constrains to position
Constraint constraint = Constraint::New< Vector3 >( actor, Actor::Property::POSITION, SetValueFunctor< Vector3 >( position ) );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), position, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), position, TEST_LOCATION );
// Remove the constraint, it should still be at position
constraint.Remove();
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentPosition(), originalPosition, TEST_LOCATION );
- DALI_TEST_CHECK( actor.GetCurrentPosition() != position );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), originalPosition, TEST_LOCATION );
+ DALI_TEST_CHECK( actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ) != position );
END_TEST;
}
// Check initial value is fully opaque
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION );
// Create a constraint whose value is discarded when it is removed
Constraint constraint = Constraint::New< Vector4 >( actor, Actor::Property::COLOR, SetHalfOpacity );
// Check value after one render, it should be constrained
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION );
// Render another frame, ensure the other value has also been updated
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION );
// Remove the actor from the stage and delete the constraint
actor.Unparent();
// Check value while off-stage, it should be fully opaque
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION );
// Add the actor back to the stage and check the value, it should be fully opaque again
Stage::GetCurrent().Add( actor );
// Check value when back on-stage, it should be fully opaque as the constraint is no longer applied to it.
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION );
// Render for another frame to ensure both buffers have the correct value
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION );
END_TEST;
}
// Check initial value is fully opaque
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION );
// Create a constraint whose value is discarded when it is removed
Constraint constraint = Constraint::New< Vector4 >( actor, Actor::Property::COLOR, SetHalfOpacity );
// Check value after one render, it should be constrained
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION );
// Render another frame, ensure the other value has also been updated
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION );
// Remove the actor from the stage
actor.Unparent();
// Check value while off-stage, the constraint is no longer being applied as it's off-stage
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION );
// Check the other buffer, the constraint should not be applied to this either.
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 1.0f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 1.0f, TEST_LOCATION );
// Add the actor back to the stage and check the value, the constraint should have been re-applied
Stage::GetCurrent().Add( actor );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION );
// Render for another frame to ensure both buffers have the correct value
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.5f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a, 0.5f, TEST_LOCATION );
END_TEST;
}
TestApplication application;
Actor actor = Actor::New();
- DALI_TEST_EQUALS( actor.GetCurrentWorldOrientation(), Quaternion::IDENTITY, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Quaternion >( Actor::Property::WORLD_ORIENTATION ), Quaternion::IDENTITY, TEST_LOCATION );
Vector3 targetPosition;
Vector3 cameraPosition;
BufferImage image = BufferImage::New(4,4,Pixel::RGBA8888);
Actor actor = CreateRenderableActor( image );
actor.SetSize( 100.0f, 100.0f );
- actor.SetName("Test Image Rendering Actor");
+ actor.SetProperty( Actor::Property::NAME,"Test Image Rendering Actor");
return actor;
}
*/
Test::TestCustomActor actorA = Test::TestCustomActor::New();
- actorA.SetName( "ActorA" );
+ actorA.SetProperty( Actor::Property::NAME, "ActorA" );
Test::TestCustomActor actorB = Test::TestCustomActor::New();
- actorB.SetName( "ActorB" );
+ actorB.SetProperty( Actor::Property::NAME, "ActorB" );
actorA.Add( actorB );
Test::TestCustomActor actorC = Test::TestCustomActor::New();
- actorC.SetName( "ActorC" );
+ actorC.SetProperty( Actor::Property::NAME, "ActorC" );
actorA.Add( actorC );
Test::TestCustomActor actorD = Test::TestCustomActor::New();
- actorD.SetName( "ActorD" );
+ actorD.SetProperty( Actor::Property::NAME, "ActorD" );
actorB.Add( actorD );
Test::TestCustomActor actorE = Test::TestCustomActor::New();
- actorE.SetName( "ActorE" );
+ actorE.SetProperty( Actor::Property::NAME, "ActorE" );
actorB.Add( actorE );
Test::TestCustomActor actorF = Test::TestCustomActor::New();
- actorF.SetName( "ActorF" );
+ actorF.SetProperty( Actor::Property::NAME, "ActorF" );
actorC.Add( actorF );
// add the custom actor to stage
Stage::GetCurrent().Add( actorA );
- DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 4, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION );
- DALI_TEST_EQUALS( 3, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 4, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION );
DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 3 ], TEST_LOCATION );
- DALI_TEST_EQUALS( 2, (int)(actorC.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnChildAdd", actorC.GetMethodsCalled()[ 0 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorC.GetMethodsCalled()[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 3, (int)(actorC.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorC.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnChildAdd", actorC.GetMethodsCalled()[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorC.GetMethodsCalled()[ 2 ], TEST_LOCATION );
- DALI_TEST_EQUALS( 1, (int)(actorD.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorD.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 2, (int)(actorD.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorD.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorD.GetMethodsCalled()[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( 1, (int)(actorE.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorE.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 2, (int)(actorE.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorE.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorE.GetMethodsCalled()[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( 1, (int)(actorF.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorF.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 2, (int)(actorF.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorF.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorF.GetMethodsCalled()[ 1 ], TEST_LOCATION );
// Check sequence is correct in MasterCallStack
- DALI_TEST_EQUALS( 3+3+2+1+1+1, (int)(MasterCallStack.size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( 4+4+3+2+2+2, (int)(MasterCallStack.size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 0 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 3 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorC: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorC: OnPropertySet", MasterCallStack[ 3 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorD: OnPropertySet", MasterCallStack[ 5 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 5 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 6 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorD: OnStageConnection", MasterCallStack[ 7 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorE: OnStageConnection", MasterCallStack[ 8 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorC: OnStageConnection", MasterCallStack[ 9 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorF: OnStageConnection", MasterCallStack[ 10 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 6 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorE: OnPropertySet", MasterCallStack[ 7 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 8 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorF: OnPropertySet", MasterCallStack[ 9 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorC: OnChildAdd", MasterCallStack[ 10 ], TEST_LOCATION );
+
+ DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 11 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 12 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorD: OnStageConnection", MasterCallStack[ 13 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorE: OnStageConnection", MasterCallStack[ 14 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorC: OnStageConnection", MasterCallStack[ 15 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorF: OnStageConnection", MasterCallStack[ 16 ], TEST_LOCATION );
// Excercise the message passing to Update thread
*/
Test::TestCustomActor actorA = Test::TestCustomActor::New();
- actorA.SetName( "ActorA" );
+ actorA.SetProperty( Actor::Property::NAME, "ActorA" );
stage.Add( actorA );
Test::TestCustomActor actorB = Test::TestCustomActor::New();
- actorB.SetName( "ActorB" );
+ actorB.SetProperty( Actor::Property::NAME, "ActorB" );
actorA.Add( actorB );
Test::TestCustomActor actorC = Test::TestCustomActor::New();
- actorC.SetName( "ActorC" );
+ actorC.SetProperty( Actor::Property::NAME, "ActorC" );
actorA.Add( actorC );
Test::TestCustomActor actorD = Test::TestCustomActor::New();
- actorD.SetName( "ActorD" );
+ actorD.SetProperty( Actor::Property::NAME, "ActorD" );
actorB.Add( actorD );
Test::TestCustomActor actorE = Test::TestCustomActor::New();
- actorE.SetName( "ActorE" );
+ actorE.SetProperty( Actor::Property::NAME, "ActorE" );
actorB.Add( actorE );
Test::TestCustomActor actorF = Test::TestCustomActor::New();
- actorF.SetName( "ActorF" );
+ actorF.SetProperty( Actor::Property::NAME, "ActorF" );
actorC.Add( actorF );
// Excercise the message passing to Update thread
*/
Test::TestCustomActor actorB = Test::TestCustomActor::New();
- actorB.SetName( "ActorB" );
+ actorB.SetProperty( Actor::Property::NAME, "ActorB" );
Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant1( actorB );
- actorA.SetName( "ActorA" );
+ actorA.SetProperty( Actor::Property::NAME, "ActorA" );
stage.Add( actorA );
// Check callback sequence
- DALI_TEST_EQUALS( 2, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); // Called from within OnStageConnection()
+ DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); // Called from within OnStageConnection()
- DALI_TEST_EQUALS( 2, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 2, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( 3, (int)(MasterCallStack.size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( 5, (int)(MasterCallStack.size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 0 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION ); // Occurs during Actor::Add from within from within OnStageConnection()
- DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION ); // Occurs after Actor::Add from within from within OnStageConnection()
+ DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 3 ], TEST_LOCATION ); // Occurs during Actor::Add from within from within OnStageConnection()
+ DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION ); // Occurs after Actor::Add from within from within OnStageConnection()
// Excercise the message passing to Update thread
*/
Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant2();
- actorA.SetName( "ActorA" );
+ actorA.SetProperty( Actor::Property::NAME, "ActorA" );
Test::TestCustomActor actorB = Test::TestCustomActor::New();
- actorB.SetName( "ActorB" );
+ actorB.SetProperty( Actor::Property::NAME, "ActorB" );
actorA.Add( actorB );
Test::TestCustomActor actorC = Test::TestCustomActor::New();
- actorC.SetName( "ActorC" );
+ actorC.SetProperty( Actor::Property::NAME, "ActorC" );
actorA.Add( actorC );
stage.Add( actorA );
// Check callback sequence
- DALI_TEST_EQUALS( 5, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 6, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); // Called from within OnStageConnection()
+ DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION );
DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 4 ], TEST_LOCATION ); // Called from within OnStageConnection()
+ DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 5 ], TEST_LOCATION ); // Called from within OnStageConnection()
- DALI_TEST_EQUALS( 5, (int)(MasterCallStack.size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( 8, (int)(MasterCallStack.size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 0 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 3 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 4 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorC: OnPropertySet", MasterCallStack[ 3 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 5 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 6 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 7 ], TEST_LOCATION );
/* Actors B & C should be removed before the point where they could receive an OnStageConnection callback
* Therefore they shouldn't receive either OnStageConnection or OnStageDisconnection
*/
- DALI_TEST_EQUALS( 0, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( 0, (int)(actorC.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( 1, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( 1, (int)(actorC.GetMethodsCalled().size()), TEST_LOCATION );
// Excercise the message passing to Update thread
*/
Test::TestCustomActor actorB = Test::TestCustomActor::New();
- actorB.SetName( "ActorB" );
+ actorB.SetProperty( Actor::Property::NAME, "ActorB" );
Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant3( actorB );
- actorA.SetName( "ActorA" );
+ actorA.SetProperty( Actor::Property::NAME, "ActorA" );
stage.Add( actorA );
// Excercise the message passing to Update thread
*/
Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant4();
- actorA.SetName( "ActorA" );
+ actorA.SetProperty( Actor::Property::NAME, "ActorA" );
stage.Add( actorA );
Test::TestCustomActor actorB = Test::TestCustomActor::New();
- actorB.SetName( "ActorB" );
+ actorB.SetProperty( Actor::Property::NAME, "ActorB" );
actorA.Add( actorB );
// Excercise the message passing to Update thread
*/
Test::TestCustomActor actorA = Test::TestCustomActor::New();
- actorA.SetName( "ActorA" );
+ actorA.SetProperty( Actor::Property::NAME, "ActorA" );
Test::TestCustomActor actorB = Test::TestCustomActor::NewVariant5();
- actorB.SetName( "ActorB" );
+ actorB.SetProperty( Actor::Property::NAME, "ActorB" );
actorA.Add( actorB );
stage.Add( actorA );
// Check callback sequence
- DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageDisconnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 4, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageDisconnection", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION );
- DALI_TEST_EQUALS( 1, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 2, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( 4, (int)(MasterCallStack.size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( 6, (int)(MasterCallStack.size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 0 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnStageDisconnection", MasterCallStack[ 3 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 3 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 4 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnStageDisconnection", MasterCallStack[ 5 ], TEST_LOCATION );
// Excercise the message passing to Update thread
*/
Test::TestCustomActor actorA = Test::TestCustomActor::New();
- actorA.SetName( "ActorA" );
+ actorA.SetProperty( Actor::Property::NAME, "ActorA" );
stage.Add( actorA );
Test::TestCustomActor actorB = Test::TestCustomActor::NewVariant6();
- actorB.SetName( "ActorB" );
+ actorB.SetProperty( Actor::Property::NAME, "ActorB" );
actorA.Add( actorB );
stage.Remove( actorA );
// Check callback sequence
- DALI_TEST_EQUALS( 2, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION );
- DALI_TEST_EQUALS( 2, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageDisconnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 3, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageDisconnection", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION );
// Disconnect was interrupted, so we should only get one OnStageConnection() for actorB
- DALI_TEST_EQUALS( 4, (int)(MasterCallStack.size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( 6, (int)(MasterCallStack.size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 0 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorB: OnStageDisconnection", MasterCallStack[ 3 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 3 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnStageDisconnection", MasterCallStack[ 5 ], TEST_LOCATION );
// Excercise the message passing to Update thread
stage.Add( actorA );
Test::TestCustomActor actorB = Test::TestCustomActor::New();
- actorB.SetName( "ActorB" );
+ actorB.SetProperty( Actor::Property::NAME, "ActorB" );
actorA.Add( actorB );
// Check hierarchy is as follows:
DALI_TEST_CHECK( container );
if ( container )
{
- DALI_TEST_EQUALS( "Container", container.GetName(), TEST_LOCATION );
+ DALI_TEST_EQUALS( "Container", container.GetProperty< std::string >( Actor::Property::NAME ), TEST_LOCATION );
DALI_TEST_EQUALS( 1, (int)(container.GetChildCount()), TEST_LOCATION );
containerChild = container.GetChildAt(0);
}
DALI_TEST_CHECK( containerChild );
if ( containerChild )
{
- DALI_TEST_EQUALS( "ActorB", containerChild.GetName(), TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB", containerChild.GetProperty< std::string >( Actor::Property::NAME ), TEST_LOCATION );
DALI_TEST_EQUALS( 0, (int)(containerChild.GetChildCount()), TEST_LOCATION );
}
// Check callback sequence
- DALI_TEST_EQUALS( 4, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); // The mContainer added to actorA
- DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); // The actorB added to actorA
- DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 5, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); // The mContainer added to actorA
+ DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); // The actorB added to actorA
+ DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 4 ], TEST_LOCATION );
// mContainer will then receive OnChildAdd
- DALI_TEST_EQUALS( 3, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageDisconnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 4, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageDisconnection", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 3 ], TEST_LOCATION );
- DALI_TEST_EQUALS( 7, (int)(MasterCallStack.size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( 9, (int)(MasterCallStack.size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 0 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 3 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorB: OnStageDisconnection", MasterCallStack[ 4 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 5 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 6 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 3 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 4 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 5 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnStageDisconnection", MasterCallStack[ 6 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 7 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 8 ], TEST_LOCATION );
// Excercise the message passing to Update thread
*/
Test::TestCustomActor actorB = Test::TestCustomActor::New();
- actorB.SetName( "ActorB" );
+ actorB.SetProperty( Actor::Property::NAME, "ActorB" );
stage.Add( actorB );
Test::TestCustomActor actorA = Test::TestCustomActor::NewVariant8( actorB );
- actorA.SetName( "ActorA" );
+ actorA.SetProperty( Actor::Property::NAME, "ActorA" );
stage.Add( actorA );
Actor childActor = Actor::New();
- childActor.SetName( "Child" );
+ childActor.SetProperty( Actor::Property::NAME, "Child" );
// Reparent from actorA to actorB
actorA.Add( childActor );
actorB.Add( childActor );
DALI_TEST_CHECK( child );
if ( child )
{
- DALI_TEST_EQUALS( "Child", child.GetName(), TEST_LOCATION );
+ DALI_TEST_EQUALS( "Child", child.GetProperty< std::string >( Actor::Property::NAME ), TEST_LOCATION );
}
// Check callback sequence
- DALI_TEST_EQUALS( 3, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION ); // The mContainer added to actorA
- DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION ); // The actorB added to actorA
+ DALI_TEST_EQUALS( 4, (int)(actorA.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorA.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorA.GetMethodsCalled()[ 1 ], TEST_LOCATION ); // The mContainer added to actorA
+ DALI_TEST_EQUALS( "OnChildAdd", actorA.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnChildRemove", actorA.GetMethodsCalled()[ 3 ], TEST_LOCATION ); // The actorB added to actorA
// mContainer will then receive OnChildAdd
- DALI_TEST_EQUALS( 3, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( 4, (int)(actorB.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", actorB.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnStageConnection", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION );
// The derived class are always notified, no matter the child is successfully removed or not
- DALI_TEST_EQUALS( "OnChildRemove", actorB.GetMethodsCalled()[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnChildRemove", actorB.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnChildAdd", actorB.GetMethodsCalled()[ 3 ], TEST_LOCATION );
- DALI_TEST_EQUALS( 6, (int)(MasterCallStack.size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( 8, (int)(MasterCallStack.size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 0 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 2 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 3 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnPropertySet", MasterCallStack[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnStageConnection", MasterCallStack[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnPropertySet", MasterCallStack[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnStageConnection", MasterCallStack[ 3 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnChildAdd", MasterCallStack[ 4 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorA: OnChildRemove", MasterCallStack[ 5 ], TEST_LOCATION );
// The derived class are always notified, no matter the child is successfully removed or not
- DALI_TEST_EQUALS( "ActorB: OnChildRemove", MasterCallStack[ 4 ], TEST_LOCATION );
- DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 5 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnChildRemove", MasterCallStack[ 6 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "ActorB: OnChildAdd", MasterCallStack[ 7 ], TEST_LOCATION );
// Excercise the message passing to Update thread
DALI_TEST_CHECK(customActorObject.DoAction("invalidCommand", attributes) == false);
// Check that the custom actor is visible
- custom.SetVisible(true);
- DALI_TEST_CHECK(custom.IsVisible() == true);
+ custom.SetProperty( Actor::Property::VISIBLE,true);
+ DALI_TEST_CHECK(custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true);
// Check the custom actor performed an action to hide itself
DALI_TEST_CHECK(customActorObject.DoAction("hide", attributes) == true);
application.Render();
// Check that the custom actor is now invisible
- DALI_TEST_CHECK(custom.IsVisible() == false);
+ DALI_TEST_CHECK(custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == false);
// Check the custom actor performed an action to show itself
DALI_TEST_CHECK(customActorObject.DoAction("show", attributes) == true);
application.Render();
// Check that the custom actor is now visible
- DALI_TEST_CHECK(custom.IsVisible() == true);
+ DALI_TEST_CHECK(custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) == true);
END_TEST;
}
auto actorHandle = Actor::New();
DALI_TEST_EQUALS( custom.GetPropertyCount(), actorHandle.GetPropertyCount(), TEST_LOCATION );
- DALI_TEST_EQUALS( custom.IsVisible(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), true, TEST_LOCATION );
custom.SetProperty( Actor::Property::VISIBLE, false );
application.SendNotification();
application.Render(); // IsVisible returns scene value
- DALI_TEST_EQUALS( custom.IsVisible(), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( custom.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION );
// should have custom actor typename (as it has not registered itself)
DALI_TEST_EQUALS( "CustomActor", custom.GetTypeName(), TEST_LOCATION );
application.Render(1000.f);
DALI_TEST_EQUALS( Vector3( 100.0f, 150.0f, 200.0f ), custom.GetProperty( Actor::Property::POSITION ).Get<Vector3>(), TEST_LOCATION );
- DALI_TEST_EQUALS( Vector3( 100.0f, 150.0f, 200.0f ), custom.GetCurrentPosition(), TEST_LOCATION );
+ DALI_TEST_EQUALS( Vector3( 100.0f, 150.0f, 200.0f ), custom.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
Dali::WeakHandle<UnregisteredCustomActor> weakRef( custom );
// should have actor signals
Vector3 scale( 2.0f, 4.0f, 6.0f );
Actor actor = Actor::New();
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetSize( actorSize );
- actor.SetColor( color );
+ actor.SetProperty( Actor::Property::COLOR, color );
actor.SetPosition( position );
actor.SetScale( scale );
Vector2 actorSize( 200, 300 );
Actor actor = Actor::New();
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetSize( actorSize );
Stage stage = Stage::GetCurrent();
Vector2 actorSize( 200, 300 );
Actor actor = Actor::New();
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetSize( actorSize );
Stage stage = Stage::GetCurrent();
positions['H'] = Vector3( 20.0f, 21.0f, 22.0f );
Actor actorA = Actor::New();
- actorA.SetParentOrigin( ParentOrigin::TOP_LEFT );
- actorA.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actorA.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actorA.SetSize( sizes['A'] );
actorA.SetPosition( positions['A'] );
stage.Add( actorA );
Actor actorB = Actor::New();
- actorB.SetParentOrigin( ParentOrigin::BOTTOM_RIGHT );
- actorB.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actorB.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_RIGHT );
+ actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actorB.SetSize( sizes['B'] );
actorB.SetPosition( positions['B'] );
actorA.Add( actorB );
Actor actorC = Actor::New();
- actorC.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
- actorC.SetAnchorPoint( AnchorPoint::TOP_CENTER );
+ actorC.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
+ actorC.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
actorC.SetSize( sizes['C'] );
actorC.SetPosition( positions['C'] );
actorB.Add( actorC );
Actor actorD = Actor::New();
- actorD.SetParentOrigin( ParentOrigin::CENTER_RIGHT );
- actorD.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ actorD.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_RIGHT );
+ actorD.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
actorD.SetSize( sizes['D'] );
actorD.SetPosition( positions['D'] );
actorA.Add( actorD );
Actor actorE = Actor::New();
- actorE.SetParentOrigin( ParentOrigin::BOTTOM_LEFT );
- actorE.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT );
+ actorE.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT );
+ actorE.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT );
actorE.SetSize( sizes['E'] );
actorE.SetPosition( positions['E'] );
stage.Add( actorE );
Actor actorF = Actor::New();
- actorF.SetParentOrigin( ParentOrigin::TOP_CENTER );
- actorF.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
+ actorF.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
+ actorF.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
actorF.SetSize( sizes['F'] );
actorF.SetPosition( positions['F'] );
actorE.Add( actorF );
Actor actorG = Actor::New();
- actorG.SetParentOrigin( ParentOrigin::CENTER_RIGHT );
- actorG.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
+ actorG.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_RIGHT );
+ actorG.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
actorG.SetSize( sizes['G'] );
actorG.SetPosition( positions['G'] );
actorE.Add( actorG );
Actor actorH = Actor::New();
- actorH.SetParentOrigin( ParentOrigin::TOP_RIGHT );
- actorH.SetAnchorPoint( AnchorPoint::BOTTOM_LEFT );
+ actorH.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT );
+ actorH.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT );
actorH.SetSize( sizes['H'] );
actorH.SetPosition( positions['H'] );
actorG.Add( actorH );
TestApplication application;
Actor actor = Actor::New();
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetSize( 200, 300 );
Stage stage = Stage::GetCurrent();
case Dali::HitTestAlgorithm::CHECK_ACTOR:
{
// Check whether the actor is visible and not fully transparent.
- if( actor.IsVisible()
- && actor.GetCurrentWorldColor().a > 0.01f) // not FULLY_TRANSPARENT
+ if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE )
+ && actor.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ).a > 0.01f) // not FULLY_TRANSPARENT
{
// Check whether the actor has the specific name "HittableActor"
- if(actor.GetName() == "HittableActor")
+ if(actor.GetProperty< std::string >( Actor::Property::NAME ) == "HittableActor")
{
hittable = true;
}
}
case Dali::HitTestAlgorithm::DESCEND_ACTOR_TREE:
{
- if( actor.IsVisible() ) // Actor is visible, if not visible then none of its children are visible.
+ if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) ) // Actor is visible, if not visible then none of its children are visible.
{
hittable = true;
}
{
case Dali::HitTestAlgorithm::CHECK_ACTOR:
{
- if( actor.IsVisible() &&
- actor.IsSensitive() &&
- actor.GetCurrentWorldColor().a > 0.01f)
+ if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) &&
+ actor.GetProperty< bool >( Actor::Property::SENSITIVE ) &&
+ actor.GetCurrentProperty< Vector4 >( Actor::Property::WORLD_COLOR ).a > 0.01f)
{
hittable = true;
}
}
case Dali::HitTestAlgorithm::DESCEND_ACTOR_TREE:
{
- if( actor.IsVisible() && // Actor is visible, if not visible then none of its children are visible.
- actor.IsSensitive()) // Actor is sensitive, if insensitive none of its children should be hittable either.
+ if( actor.GetCurrentProperty< bool >( Actor::Property::VISIBLE ) && // Actor is visible, if not visible then none of its children are visible.
+ actor.GetProperty< bool >( Actor::Property::SENSITIVE )) // Actor is sensitive, if insensitive none of its children should be hittable either.
{
hittable = true;
}
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
- actor.SetName("NonHittableActor");
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::NAME,"NonHittableActor");
stage.Add(actor);
// Render and notify
Dali::HitTestAlgorithm::HitTest( stage, screenCoordinates, results, IsActorHittableFunction );
DALI_TEST_CHECK( results.actor != actor );
- actor.SetName("HittableActor");
+ actor.SetProperty( Actor::Property::NAME,"HittableActor");
results.actor = Actor();
results.actorCoordinates = Vector2::ZERO;
Vector2 actorSize( stageSize * 0.5f );
// Create two actors with half the size of the stage and set them to be partially overlapping
Actor blue = Actor::New();
- blue.SetName( "Blue" );
- blue.SetAnchorPoint( AnchorPoint::CENTER );
- blue.SetParentOrigin( Vector3(1.0f/3.0f, 1.0f/3.0f, 0.5f) );
+ blue.SetProperty( Actor::Property::NAME, "Blue" );
+ blue.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ blue.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(1.0f/3.0f, 1.0f/3.0f, 0.5f) );
blue.SetSize( actorSize );
blue.SetZ(30.0f);
Actor green = Actor::New( );
- green.SetName( "Green" );
- green.SetAnchorPoint( AnchorPoint::CENTER );
- green.SetParentOrigin( Vector3(2.0f/3.0f, 2.0f/3.0f, 0.5f) );
+ green.SetProperty( Actor::Property::NAME, "Green" );
+ green.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ green.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(2.0f/3.0f, 2.0f/3.0f, 0.5f) );
green.SetSize( actorSize );
// Add the actors to the view
Vector2 actorSize( stageSize * 0.5f );
// Create two actors with half the size of the stage and set them to be partially overlapping
Actor blue = Actor::New();
- blue.SetName( "Blue" );
- blue.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- blue.SetParentOrigin( Vector3(0.2f, 0.2f, 0.5f) );
+ blue.SetProperty( Actor::Property::NAME, "Blue" );
+ blue.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ blue.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.2f, 0.2f, 0.5f) );
blue.SetSize( actorSize );
blue.SetZ(30.0f);
Actor green = Actor::New( );
- green.SetName( "Green" );
- green.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- green.SetParentOrigin( Vector3(0.4f, 0.4f, 0.5f) );
+ green.SetProperty( Actor::Property::NAME, "Green" );
+ green.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ green.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.4f, 0.4f, 0.5f) );
green.SetSize( actorSize );
// Add the actors to the view
Stage stage = Stage::GetCurrent();
Actor rootLayer = stage.GetRootLayer();
- rootLayer.SetName( "RootLayer" );
+ rootLayer.SetProperty( Actor::Property::NAME, "RootLayer" );
// Create a layer
Layer layer = Layer::New();
- layer.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- layer.SetParentOrigin( ParentOrigin::TOP_LEFT );
- layer.SetName( "layer" );
+ layer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ layer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ layer.SetProperty( Actor::Property::NAME, "layer" );
stage.Add( layer );
// Create a clipping actor and add it to the layer.
Actor clippingActor = CreateRenderableActor( Dali::BufferImage::WHITE() );
- clippingActor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- clippingActor.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ clippingActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
clippingActor.SetSize( 50.0f, 50.0f );
clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
- clippingActor.SetName( "clippingActor" );
+ clippingActor.SetProperty( Actor::Property::NAME, "clippingActor" );
layer.Add( clippingActor );
// Create a renderable actor and add it to the clipping actor.
Actor childActor = CreateRenderableActor( Dali::BufferImage::WHITE() );
childActor.SetSize( 100.0f, 100.0f );
- childActor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- childActor.SetParentOrigin( ParentOrigin::TOP_LEFT );
- childActor.SetName( "childActor" );
+ childActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ childActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
+ childActor.SetProperty( Actor::Property::NAME, "childActor" );
clippingActor.Add( childActor );
// Render and notify
HitTestAlgorithm::Results results;
HitTest( stage, Vector2( 10.0f, 10.0f ), results, &DefaultIsActorTouchableFunction );
DALI_TEST_CHECK( results.actor == childActor );
- tet_printf( "Hit: %s\n", ( results.actor ? results.actor.GetName().c_str() : "NULL" ) );
+ tet_printf( "Hit: %s\n", ( results.actor ? results.actor.GetProperty< std::string >( Actor::Property::NAME ).c_str() : "NULL" ) );
// Hit within childActor but outside of clippingActor, should hit the root-layer instead.
HitTest( stage, Vector2( 60.0f, 60.0f ), results, &DefaultIsActorTouchableFunction);
DALI_TEST_CHECK( results.actor == rootLayer );
- tet_printf( "Hit: %s\n", ( results.actor ? results.actor.GetName().c_str() : "NULL" ) );
+ tet_printf( "Hit: %s\n", ( results.actor ? results.actor.GetProperty< std::string >( Actor::Property::NAME ).c_str() : "NULL" ) );
END_TEST;
}
// Create two actors with half the size of the stage and set them to be partially overlapping
Actor blue = Actor::New();
blue.SetDrawMode( DrawMode::OVERLAY_2D );
- blue.SetName( "Blue" );
- blue.SetAnchorPoint( AnchorPoint::CENTER );
- blue.SetParentOrigin( Vector3(1.0f/3.0f, 1.0f/3.0f, 0.5f) );
+ blue.SetProperty( Actor::Property::NAME, "Blue" );
+ blue.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ blue.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(1.0f/3.0f, 1.0f/3.0f, 0.5f) );
blue.SetSize( actorSize );
blue.SetZ(30.0f);
Actor green = Actor::New( );
- green.SetName( "Green" );
- green.SetAnchorPoint( AnchorPoint::CENTER );
- green.SetParentOrigin( Vector3(2.0f/3.0f, 2.0f/3.0f, 0.5f) );
+ green.SetProperty( Actor::Property::NAME, "Green" );
+ green.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
+ green.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(2.0f/3.0f, 2.0f/3.0f, 0.5f) );
green.SetSize( actorSize );
// Add the actors to the view
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::CENTER);
- actor.SetParentOrigin(ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
stage.Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
actor.HoveredSignal().Connect( &application, functor );
// Set actor to require leave events
- actor.SetLeaveRequired( true );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Emit a started signal
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) );
data.Reset();
// We do not want to listen to leave events anymore
- actor.SetLeaveRequired( false );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false );
// Another motion event outside of actor, no signalling
application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
rootActor.HoveredSignal().Connect( &application, rootFunctor );
// Set actor to require leave events
- actor.SetLeaveRequired( true );
- rootActor.SetLeaveRequired( true );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
+ rootActor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Emit a started signal
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) );
rootData.Reset();
// We do not want to listen to leave events of actor anymore
- actor.SetLeaveRequired( false );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false );
// Another motion event outside of root actor, only root signalled
Vector2 stageSize( Stage::GetCurrent().GetSize() );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
data.Reset();
// Change actor to insensitive
- actor.SetSensitive( false );
+ actor.SetProperty( Actor::Property::SENSITIVE, false );
// Emit a motion signal, signalled with an interrupted
application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
application.Render();
// Make root actor insensitive
- rootActor.SetSensitive( false );
+ rootActor.SetProperty( Actor::Property::SENSITIVE, false );
// Emit a motion signal, signalled with an interrupted (should get interrupted even if within root actor)
application.ProcessEvent( GenerateSingleHover( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) );
Layer layer1 ( Layer::New() );
layer1.SetSize(100.0f, 100.0f);
- layer1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer1 );
Actor actor1 ( Actor::New() );
actor1.SetSize( 100.0f, 100.0f );
- actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor1.SetZ( 1.0f ); // Should hit actor1 in this layer
layer1.Add( actor1 );
data.Reset();
// Make layer1 insensitive, nothing should be hit
- layer1.SetSensitive( false );
+ layer1.SetProperty( Actor::Property::SENSITIVE, false );
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
data.Reset();
// Make layer1 sensitive again, again actor1 will be hit
- layer1.SetSensitive( true );
+ layer1.SetProperty( Actor::Property::SENSITIVE, true );
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
DALI_TEST_CHECK( data.hoveredActor == actor1 );
data.Reset();
// Make rootActor insensitive, nothing should be hit
- rootActor.SetSensitive( false );
+ rootActor.SetProperty( Actor::Property::SENSITIVE, false );
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
data.Reset();
// Make rootActor sensitive
- rootActor.SetSensitive( true );
+ rootActor.SetProperty( Actor::Property::SENSITIVE, true );
// Add another layer
Layer layer2 ( Layer::New() );
layer2.SetSize(100.0f, 100.0f );
- layer2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
layer2.SetZ( 10.0f ); // Should hit layer2 in this layer rather than actor2
Stage::GetCurrent().Add( layer2 );
Actor actor2 ( Actor::New() );
actor2.SetSize(100.0f, 100.0f);
- actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
layer2.Add( actor2 );
// Render and notify
data.Reset();
// Make layer2 insensitive, should hit actor1
- layer2.SetSensitive( false );
+ layer2.SetProperty( Actor::Property::SENSITIVE, false );
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
DALI_TEST_CHECK( data.hoveredActor == actor1 );
data.Reset();
// Make layer2 sensitive again, should hit layer2
- layer2.SetSensitive( true );
+ layer2.SetProperty( Actor::Property::SENSITIVE, true );
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
//DALI_TEST_CHECK( data.hoveredActor == layer2 ); // TODO: Uncomment this after removing renderable hack!
data.Reset();
// Make layer2 invisible, render and notify
- layer2.SetVisible( false );
+ layer2.SetProperty( Actor::Property::VISIBLE, false );
application.SendNotification();
application.Render();
data.Reset();
// Make rootActor invisible, render and notify
- rootActor.SetVisible( false );
+ rootActor.SetProperty( Actor::Property::VISIBLE, false );
application.SendNotification();
application.Render();
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
// Create render task
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
Layer layer = Layer::New();
layer.SetSize(100.0f, 100.0f);
- layer.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor.Add(layer);
// Create render task
// Create a renderable actor to display the FrameBufferImage
Actor renderableActor = CreateRenderableActor( frameBufferImage );
- renderableActor.SetParentOrigin(ParentOrigin::CENTER);
+ renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
renderableActor.SetSize( stageSize.x, stageSize.y );
renderableActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
stage.Add( renderableActor );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add( actor );
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects
Actor parent = CreateRenderableActor();
parent.SetSize( 100.0f, 100.0f );
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(parent);
Actor actor = CreateRenderableActor();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
actor.HoveredSignal().Connect( &application, functor );
// Register for leave events
- actor.SetLeaveRequired( true );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Emit a started signal
application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
// Set actor to receive hover-events
- actor.SetLeaveRequired( true );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Render and notify
application.SendNotification();
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
stage.Add( actor );
Actor clippingActor = Actor::New();
clippingActor.SetSize( 50.0f, 50.0f );
- clippingActor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
stage.Add( clippingActor );
Actor clippingChild = Actor::New();
clippingChild.SetSize( 50.0f, 50.0f );
clippingChild.SetPosition( 25.0f, 25.0f );
- clippingChild.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ clippingChild.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
clippingActor.Add( clippingChild );
// Render and notify.
Actor actor = CreateRenderableActor( img );
Actor actor2 = CreateRenderableActor( img );
actor.SetSize(1,1);
- actor.SetColor( Vector4(1, 1, 1, 0.5f ) ); // 50% transparent
+ actor.SetProperty( Actor::Property::COLOR, Vector4(1, 1, 1, 0.5f ) ); // 50% transparent
actor2.SetSize(1,1);
- actor2.SetColor( Vector4(1, 1, 1, 0.5f ) ); // 50% transparent
+ actor2.SetProperty( Actor::Property::COLOR, Vector4(1, 1, 1, 0.5f ) ); // 50% transparent
// add to stage
Stage::GetCurrent().Add( actor );
}
Actor actor = CreateRenderableActor( bufferImage );
- actor.SetParentOrigin( ParentOrigin::CENTER );
- actor.SetAnchorPoint( AnchorPoint::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
return actor;
}
// Attach an actor and emit a touch event on the actor to ensure complete line coverage
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
{
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
// Set child to completely cover parent.
// conversion of the parent actor is correct.
Actor child = Actor::New();
child.SetSize(100.0f, 100.0f);
- child.SetAnchorPoint(AnchorPoint::CENTER);
- child.SetParentOrigin(ParentOrigin::CENTER);
+ child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
parent.Add(child);
Actor first = Actor::New();
first.SetSize(100.0f, 100.0f);
- first.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(first);
Actor second = Actor::New();
second.SetSize(100.0f, 100.0f);
second.SetX(100.0f);
- second.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(second);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
// Actor becomes invisible - actor should not receive the next long press
- actor.SetVisible(false);
+ actor.SetProperty( Actor::Property::VISIBLE,false);
// Render and notify
application.SendNotification();
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Create and add a second actor so that GestureDetector destruction does not come into play.
Actor dummyActor( Actor::New() );
dummyActor.SetSize( 100.0f, 100.0f );
dummyActor.SetPosition( 100.0f, 100.0f );
- dummyActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummyActor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a detector
// Add a layer to overlap the actor
Layer layer = Layer::New();
layer.SetSize(100.0f, 100.0f);
- layer.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( actor );
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor actor2 = Actor::New();
actor2.SetSize(100.0f, 100.0f);
- actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor2.SetX(100.0f);
Stage::GetCurrent().Add(actor2);
nativeImageInterface->SetGlExtensionCreateResult( false );
Actor actor = CreateRenderableActor( nativeImage );
- actor.SetParentOrigin( ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( actor );
TestGlAbstraction& gl = application.GetGlAbstraction();
// Attach an actor and emit a touch event on the actor to ensure complete line coverage
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
detector.Attach(actor);
Stage::GetCurrent().Add(actor);
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
// is destroyed.
Actor tempActor = Actor::New();
tempActor.SetSize(100.0f, 100.0f);
- tempActor.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
+ tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
Stage::GetCurrent().Add(tempActor);
detector.Attach(tempActor);
{
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
// Set child to completely cover parent.
// conversion of the parent actor is correct.
Actor child = Actor::New();
child.SetSize(100.0f, 100.0f);
- child.SetAnchorPoint(AnchorPoint::CENTER);
- child.SetParentOrigin(ParentOrigin::CENTER);
+ child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
parent.Add(child);
Actor first = Actor::New();
first.SetSize(100.0f, 100.0f);
- first.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(first);
Actor second = Actor::New();
second.SetSize(100.0f, 100.0f);
second.SetX(100.0f);
- second.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(second);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
// Actor become invisible - actor should not receive the next pan
- actor.SetVisible(false);
+ actor.SetProperty( Actor::Property::VISIBLE,false);
// Render and notify
application.SendNotification();
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor actor2 = Actor::New();
actor2.SetSize(100.0f, 100.0f);
- actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
+ actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
Stage::GetCurrent().Add(actor2);
// Render and notify
Actor actor1 = Actor::New();
actor1.SetSize(100.0f, 100.0f);
- actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor1);
SignalData data1;
GestureReceivedFunctor functor1(data1);
Actor actor2 = Actor::New();
actor2.SetSize(100.0f, 100.0f);
- actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
- actor2.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT);
+ actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
+ actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT);
Stage::GetCurrent().Add(actor2);
SignalData data2;
GestureReceivedFunctor functor2(data2);
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
child.SetSize(100.0f, 100.0f);
- child.SetAnchorPoint(AnchorPoint::CENTER);
- child.SetParentOrigin(ParentOrigin::CENTER);
+ child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
parent.Add( child );
// Create detector for parent and attach
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Create and add a second actor so that GestureDetector destruction does not come into play.
Actor dummyActor( Actor::New() );
dummyActor.SetSize( 100.0f, 100.0f );
dummyActor.SetPosition( 100.0f, 100.0f );
- dummyActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummyActor);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor child = Actor::New();
child.SetSize(100.0f, 100.0f);
- child.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(child);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor child = Actor::New();
child.SetSize(100.0f, 100.0f);
- child.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(child);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a pan detector
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a pan detector
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a pan detector
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a pan detector
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a pan detector
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a pan detector
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a pan detector
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a pan detector
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a pan detector
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a pan detector
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a pan detector
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a pan detector
// Add a layer to overlap the actor
Layer layer = Layer::New();
layer.SetSize(100.0f, 100.0f);
- layer.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a pan detector
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
// Attach an actor and emit a touch event on the actor to ensure complete line coverage
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
// is destroyed.
Actor tempActor = Actor::New();
tempActor.SetSize(100.0f, 100.0f);
- tempActor.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
+ tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
Stage::GetCurrent().Add(tempActor);
detector.Attach(tempActor);
{
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
// Set child to completely cover parent.
// conversion of the parent actor is correct.
Actor child = Actor::New();
child.SetSize(100.0f, 100.0f);
- child.SetAnchorPoint(AnchorPoint::CENTER);
- child.SetParentOrigin(ParentOrigin::CENTER);
+ child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
parent.Add(child);
Actor first = Actor::New();
first.SetSize(100.0f, 100.0f);
- first.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(first);
Actor second = Actor::New();
second.SetSize(100.0f, 100.0f);
second.SetX(100.0f);
- second.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(second);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
// Actor become invisible - actor should not receive the next pinch
- actor.SetVisible(false);
+ actor.SetProperty( Actor::Property::VISIBLE,false);
// Render and notify
application.SendNotification();
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor actor2 = Actor::New();
actor2.SetSize(100.0f, 100.0f);
- actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
+ actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
Stage::GetCurrent().Add(actor2);
// Render and notify
Actor actor1 = Actor::New();
actor1.SetSize(100.0f, 100.0f);
- actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor1);
SignalData data1;
GestureReceivedFunctor functor1(data1);
Actor actor2 = Actor::New();
actor2.SetSize(100.0f, 100.0f);
- actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
- actor2.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT);
+ actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
+ actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT);
Stage::GetCurrent().Add(actor2);
SignalData data2;
GestureReceivedFunctor functor2(data2);
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Create and add a second actor so that GestureDetector destruction does not come into play.
Actor dummyActor( Actor::New() );
dummyActor.SetSize( 100.0f, 100.0f );
dummyActor.SetPosition( 100.0f, 100.0f );
- dummyActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummyActor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a detector
// Add a layer to overlap the actor
Layer layer = Layer::New();
layer.SetSize(100.0f, 100.0f);
- layer.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor actor2 = Actor::New();
actor2.SetSize(100.0f, 100.0f);
- actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor2.SetX(100.0f);
Stage::GetCurrent().Add(actor2);
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( actor );
// Render and notify
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( actor );
// Render and notify
notification.NotifySignal().Connect( &TestCallback );
actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
- actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
// Move right to satisfy XAxis condition
// Change alpha Colour to satisfy w/alpha component condition
gCallBackCalled = false;
Wait(application, DEFAULT_WAIT_PERIOD);
- actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 1.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
END_TEST;
notification.NotifySignal().Connect( &TestCallback );
actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
- actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 1.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
// Move left to satisfy XAxis condition
// Change alpha Colour to satisfy w/alpha component condition
gCallBackCalled = false;
Wait(application, DEFAULT_WAIT_PERIOD);
- actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
END_TEST;
// set outside all conditions
actor.SetPosition(Vector3(200.0f, 200.0f, 200.0f));
- actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 1.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
// Move x to inside condition
// change alpha to inside condition
gCallBackCalled = false;
Wait(application, DEFAULT_WAIT_PERIOD);
- actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.5f));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 0.5f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
END_TEST;
// set inside all conditions
actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
- actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 0.5f));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 0.5f));
Wait(application, DEFAULT_WAIT_PERIOD);
// Move x to outside condition
// change alpha to outside condition
gCallBackCalled = false;
Wait(application, DEFAULT_WAIT_PERIOD);
- actor.SetColor(Vector4(0.0f, 0.0f, 0.0f, 1.0f));
+ actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 1.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
END_TEST;
Actor secondRootActor = CreateRenderableActorSuccess(application, "aFile.jpg");
Stage::GetCurrent().Add(secondRootActor);
- secondRootActor.SetVisible(false);
+ secondRootActor.SetProperty( Actor::Property::VISIBLE,false);
RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ALWAYS, true);
bool finished = false;
application.GetPlatform().ClearReadyResources();
// MAKE SOURCE ACTOR VISIBLE - expect continuous renders to start, no finished signal
- secondRootActor.SetVisible(true);
+ secondRootActor.SetProperty( Actor::Property::VISIBLE,true);
application.SendNotification();
// CONTINUE PROCESS/RENDER Input, Expected Input, Expected
BufferImage image = BufferImage::New( 10, 10 );
Actor rootActor = CreateRenderableActor( image );
rootActor.SetSize( 10, 10 );
- rootActor.SetVisible(false);
+ rootActor.SetProperty( Actor::Property::VISIBLE,false);
Stage::GetCurrent().Add( rootActor );
RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
actor.SetSize(100.0f, 100.0f);
actor.SetPosition( Vector3(0.0, 0.0, 0.0) );
- actor.SetParentOrigin( Vector3(0.5, 0.5, 0.5) );
- actor.SetAnchorPoint( Vector3(0.5, 0.5, 0.5) );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.5, 0.5, 0.5) );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, Vector3(0.5, 0.5, 0.5) );
Stage::GetCurrent().Add(actor);
float screenX = 0.0;
float screenY = 0.0;
- bool ok = task.WorldToViewport(actor.GetCurrentWorldPosition(), screenX, screenY);
+ bool ok = task.WorldToViewport(actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), screenX, screenY);
DALI_TEST_CHECK(ok == true);
DALI_TEST_EQUALS(screenX, screenSize.x/2, Math::MACHINE_EPSILON_10000, TEST_LOCATION);
float actor2Size = 100.f;
actor2.SetSize( actor2Size, actor2Size );
actor2.SetPosition( Vector3(0.0, 0.0, 0.0) );
- actor2.SetParentOrigin( Vector3(0.5, 0.5, 0.0) );
- actor2.SetAnchorPoint( Vector3(0.5, 0.5, 0.0) );
+ actor2.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0.5, 0.5, 0.0) );
+ actor2.SetProperty( Actor::Property::ANCHOR_POINT, Vector3(0.5, 0.5, 0.0) );
Stage::GetCurrent().Add( actor2 );
actor2.Add(actor);
- actor.SetParentOrigin( Vector3(0,0,0) );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3(0,0,0) );
application.SendNotification();
application.Render();
application.SendNotification();
- ok = task.WorldToViewport(actor.GetCurrentWorldPosition(), screenX, screenY);
+ ok = task.WorldToViewport(actor.GetCurrentProperty< Vector3 >( Actor::Property::WORLD_POSITION ), screenX, screenY);
DALI_TEST_CHECK(ok == true);
DALI_TEST_EQUALS(screenX, screenSize.x/2 - actor2Size/2, Math::MACHINE_EPSILON_10000, TEST_LOCATION);
{
TestApplication application;
Actor actor = Actor::New();
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor.SetSize(100.0f, 100.0f);
actor.SetPosition(10.0f, 10.0f);
Stage::GetCurrent().Add(actor);
{
TestApplication application;
Actor actor = Actor::New();
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetSize( 100.0f, 100.0f );
actor.SetPosition( 10.0f, 10.0f );
Stage::GetCurrent().Add( actor );
Actor actor = Actor::New();
// set a transparent actor color so that blending is enabled
- actor.SetOpacity( 0.5f );
+ actor.SetProperty( DevelActor::Property::OPACITY, 0.5f );
actor.AddRenderer(renderer);
actor.SetSize(400, 400);
Stage::GetCurrent().Add(actor);
Renderer renderer = Renderer::New( geometry, shader );
Actor actor = Actor::New();
- actor.SetOpacity( 0.5f ); // enable blending
+ actor.SetProperty( DevelActor::Property::OPACITY, 0.5f ); // enable blending
actor.AddRenderer(renderer);
actor.SetSize(400, 400);
Stage::GetCurrent().Add(actor);
Renderer renderer = Renderer::New( geometry, shader );
Actor actor = Actor::New();
- actor.SetOpacity( 0.1f );
+ actor.SetProperty( DevelActor::Property::OPACITY, 0.1f );
actor.AddRenderer(renderer);
actor.SetSize(400, 400);
Stage::GetCurrent().Add(actor);
Renderer renderer = Renderer::New( geometry, shader );
Actor actor = Actor::New();
- actor.SetOpacity( 0.98f );
+ actor.SetProperty( DevelActor::Property::OPACITY, 0.98f );
actor.AddRenderer(renderer);
actor.SetSize(400, 400);
Stage::GetCurrent().Add(actor);
Renderer renderer = Renderer::New( geometry, shader );
Actor actor = Actor::New();
- actor.SetOpacity( 0.0f );
+ actor.SetProperty( DevelActor::Property::OPACITY, 0.0f );
actor.AddRenderer(renderer);
actor.SetSize(400, 400);
Stage::GetCurrent().Add(actor);
Renderer renderer = Renderer::New( geometry, shader );
Actor actor = Actor::New();
- actor.SetOpacity( 0.15f );
+ actor.SetProperty( DevelActor::Property::OPACITY, 0.15f );
actor.AddRenderer(renderer);
actor.SetSize(400, 400);
Stage::GetCurrent().Add(actor);
Renderer renderer = Renderer::New( geometry, shader );
Actor actor = Actor::New();
- actor.SetOpacity( 0.75f );
+ actor.SetProperty( DevelActor::Property::OPACITY, 0.75f );
actor.AddRenderer(renderer);
actor.SetSize(400, 400);
Stage::GetCurrent().Add(actor);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
actor.SetSize(400, 400);
- actor.SetColor( Vector4(1.0f, 0.0f, 1.0f, 0.5f) );
+ actor.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 0.0f, 1.0f, 0.5f) );
Stage::GetCurrent().Add(actor);
renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
actor.SetSize(400, 400);
- actor.SetColor( Color::MAGENTA );
+ actor.SetProperty( Actor::Property::COLOR, Color::MAGENTA );
Stage::GetCurrent().Add(actor);
renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
actor.SetSize(400, 400);
- actor.SetColor( Vector4(1.0f, 0.0f, 1.0f, 0.5f) );
+ actor.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 0.0f, 1.0f, 0.5f) );
Stage::GetCurrent().Add(actor);
Property::Value value = renderer.GetProperty( Renderer::Property::BLEND_PRE_MULTIPLIED_ALPHA );
Actor CreateActor( Actor parent, int siblingOrder, const char* location )
{
Actor actor = Actor::New();
- actor.SetAnchorPoint(AnchorPoint::CENTER);
- actor.SetParentOrigin(AnchorPoint::CENTER);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,AnchorPoint::CENTER);
actor.SetPosition(0.0f,0.0f);
actor.SetSize(100, 100);
parent.Add(actor);
Actor actor = Actor::New();
actor.AddRenderer( renderer );
actor.SetSize( 400, 400 );
- actor.SetColor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
+ actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
Stage::GetCurrent().Add( actor );
Property::Value value = renderer.GetProperty( DevelRenderer::Property::OPACITY );
Actor actor = Actor::New();
actor.AddRenderer( renderer );
actor.SetSize( 400, 400 );
- actor.SetColor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
+ actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
Actor actor = Actor::New();
actor.AddRenderer( renderer );
actor.SetSize( 400, 400 );
- actor.SetColor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
+ actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
Stage::GetCurrent().Add( actor );
Property::Value value = renderer.GetProperty( DevelRenderer::Property::RENDERING_BEHAVIOR );
Actor actor = Actor::New();
actor.AddRenderer( renderer );
actor.SetSize( 400, 400 );
- actor.SetColor( Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
+ actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
// Attach an actor and emit a touch event on the actor to ensure complete line coverage
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
// is destroyed.
Actor tempActor = Actor::New();
tempActor.SetSize(100.0f, 100.0f);
- tempActor.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
+ tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
Stage::GetCurrent().Add(tempActor);
detector.Attach(tempActor);
{
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
// Set child to completely cover parent.
// conversion of the parent actor is correct.
Actor child = Actor::New();
child.SetSize(100.0f, 100.0f);
- child.SetAnchorPoint(AnchorPoint::CENTER);
- child.SetParentOrigin(ParentOrigin::CENTER);
+ child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
parent.Add(child);
Actor first = Actor::New();
first.SetSize(100.0f, 100.0f);
- first.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(first);
Actor second = Actor::New();
second.SetSize(100.0f, 100.0f);
second.SetX(100.0f);
- second.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(second);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
// Actor become invisible - actor should not receive the next rotation
- actor.SetVisible(false);
+ actor.SetProperty( Actor::Property::VISIBLE,false);
// Render and notify
application.SendNotification();
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor actor2 = Actor::New();
actor2.SetSize(100.0f, 100.0f);
- actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
+ actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
Stage::GetCurrent().Add(actor2);
// Render and notify
Actor actor1 = Actor::New();
actor1.SetSize(100.0f, 100.0f);
- actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor1);
SignalData data1;
GestureReceivedFunctor functor1(data1);
Actor actor2 = Actor::New();
actor2.SetSize(100.0f, 100.0f);
- actor2.SetAnchorPoint(AnchorPoint::BOTTOM_RIGHT);
- actor2.SetParentOrigin(ParentOrigin::BOTTOM_RIGHT);
+ actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
+ actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT);
Stage::GetCurrent().Add(actor2);
SignalData data2;
GestureReceivedFunctor functor2(data2);
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Create and add a second actor so that GestureDetector destruction does not come into play.
Actor dummyActor( Actor::New() );
dummyActor.SetSize( 100.0f, 100.0f );
dummyActor.SetPosition( 100.0f, 100.0f );
- dummyActor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummyActor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a detector
// Add a layer to overlap the actor
Layer layer = Layer::New();
layer.SetSize(100.0f, 100.0f);
- layer.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( actor );
application.SendNotification();
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( actor );
application.SendNotification();
renderer.SetTextures( textureSet );
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetParentOrigin( ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actor.SetSize(400, 400);
Stage::GetCurrent().Add( actor );
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetParentOrigin( ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actor.SetSize(400, 400);
Stage::GetCurrent().Add( actor );
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetParentOrigin( ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actor.SetSize( 400, 400 );
Stage::GetCurrent().Add( actor );
// Add an actor to the scene.
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.TouchedSignal().Connect( &DummyTouchCallback );
scene.Add( actor );
// Add an actor to the scene.
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.TouchedSignal().Connect( &DummyTouchCallback );
scene.Add( actor );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( handle.GetCurrentSize(), Vector3::ONE, TEST_LOCATION );
- DALI_TEST_EQUALS( handle.GetCurrentPosition(), Vector3::XAXIS, TEST_LOCATION );
- DALI_TEST_EQUALS( handle.GetCurrentScale(), Vector3::ONE, TEST_LOCATION );
- DALI_TEST_EQUALS( handle.IsVisible(), false, TEST_LOCATION );
- DALI_TEST_EQUALS( handle.GetCurrentColor(), Color::MAGENTA, TEST_LOCATION );
- DALI_TEST_EQUALS( handle.GetName(), "MyActor", TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::XAXIS, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetCurrentProperty< bool >( Actor::Property::VISIBLE ), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::MAGENTA, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetProperty< std::string >( Actor::Property::NAME ), "MyActor", TEST_LOCATION );
DALI_TEST_EQUALS( handle.GetColorMode(), USE_PARENT_COLOR, TEST_LOCATION );
- DALI_TEST_EQUALS( handle.IsSensitive(), false, TEST_LOCATION );
- DALI_TEST_EQUALS( handle.GetLeaveRequired(), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::SENSITIVE ), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::LEAVE_REQUIRED ), true, TEST_LOCATION );
DALI_TEST_EQUALS( handle.GetDrawMode(), DrawMode::OVERLAY_2D, TEST_LOCATION );
- DALI_TEST_EQUALS( handle.IsOrientationInherited(), false, TEST_LOCATION );
- DALI_TEST_EQUALS( handle.IsScaleInherited(), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::INHERIT_ORIENTATION ), false, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetProperty< bool >( Actor::Property::INHERIT_SCALE ), false, TEST_LOCATION );
Stage::GetCurrent().Remove( handle );
}
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( handle.GetCurrentParentOrigin(), ParentOrigin::TOP_CENTER, TEST_LOCATION );
- DALI_TEST_EQUALS( handle.GetCurrentAnchorPoint(), AnchorPoint::TOP_LEFT, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_CENTER, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), AnchorPoint::TOP_LEFT, TEST_LOCATION );
Stage::GetCurrent().Remove( handle );
}
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( handle.GetCurrentParentOrigin(), ParentOrigin::TOP_LEFT, TEST_LOCATION );
- DALI_TEST_EQUALS( handle.GetCurrentAnchorPoint(), AnchorPoint::CENTER_LEFT, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::PARENT_ORIGIN ), ParentOrigin::TOP_LEFT, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::ANCHOR_POINT ), AnchorPoint::CENTER_LEFT, TEST_LOCATION );
Stage::GetCurrent().Remove( handle );
}
Scripting::NewAnimation( map, data );
Actor actor = Actor::New();
- actor.SetName("Actor1");
- actor.SetColor(Color::CYAN);
+ actor.SetProperty( Actor::Property::NAME,"Actor1");
+ actor.SetProperty( Actor::Property::COLOR,Color::CYAN);
Stage::GetCurrent().Add(actor);
Animation anim = data.CreateAnimation( actor, 0.5f );
application.Render(500); // Start animation
application.Render(500); // Halfway thru anim
application.SendNotification();
- DALI_TEST_EQUALS( actor.GetCurrentColor(), (Color::MAGENTA+Color::CYAN)*0.5f, TEST_LOCATION);
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), (Color::MAGENTA+Color::CYAN)*0.5f, TEST_LOCATION);
application.Render(500); // Halfway thru anim
application.SendNotification();
- DALI_TEST_EQUALS( actor.GetCurrentColor(), Color::MAGENTA, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector4 >( Actor::Property::COLOR ), Color::MAGENTA, TEST_LOCATION );
END_TEST;
}
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( handle.GetCurrentPosition(), Vector3::XAXIS, TEST_LOCATION );
+ DALI_TEST_EQUALS( handle.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::XAXIS, TEST_LOCATION );
DALI_TEST_EQUALS( handle.GetChildCount(), 1u, TEST_LOCATION );
Actor child1 = handle.GetChildAt(0);
DALI_TEST_CHECK( child1 );
DALI_TEST_CHECK( Layer::DownCast( child1 ) );
- DALI_TEST_EQUALS( child1.GetCurrentPosition(), Vector3::YAXIS, TEST_LOCATION );
+ DALI_TEST_EQUALS( child1.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), Vector3::YAXIS, TEST_LOCATION );
DALI_TEST_EQUALS( child1.GetChildCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Remove( handle );
actor.SetSize( Vector3::ONE );
actor.SetPosition( Vector3::XAXIS );
actor.SetScale( Vector3::ZAXIS );
- actor.SetVisible( false );
- actor.SetColor( Color::MAGENTA );
- actor.SetName( "MyActor" );
- actor.SetAnchorPoint( AnchorPoint::CENTER_LEFT );
- actor.SetParentOrigin( ParentOrigin::TOP_RIGHT );
- actor.SetSensitive( false );
- actor.SetLeaveRequired( true );
- actor.SetInheritOrientation( false );
- actor.SetInheritScale( false );
+ actor.SetProperty( Actor::Property::VISIBLE, false );
+ actor.SetProperty( Actor::Property::COLOR, Color::MAGENTA );
+ actor.SetProperty( Actor::Property::NAME, "MyActor" );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT );
+ actor.SetProperty( Actor::Property::SENSITIVE, false );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
+ actor.SetProperty( Actor::Property::INHERIT_ORIENTATION, false );
+ actor.SetProperty( Actor::Property::INHERIT_SCALE, false );
actor.SetSizeModeFactor( Vector3::ONE );
Stage::GetCurrent().Add( actor );
// Add an actor to the scene.
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.TouchedSignal().Connect( &DummyTouchCallback );
stage.Add( actor );
// Add an actor to the scene.
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.TouchedSignal().Connect( &DummyTouchCallback );
stage.Add( actor );
// Add an actor to the scene.
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.TouchedSignal().Connect( &DummyTouchCallback );
stage.Add( actor );
// Add an actor to the scene.
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- actor.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.TouchedSignal().Connect( &DummyTouchCallback );
stage.Add( actor );
// Attach an actor and emit a touch event on the actor to ensure complete line coverage
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
{
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
// Set child to completely cover parent.
// conversion of the parent actor is correct.
Actor child = Actor::New();
child.SetSize(100.0f, 100.0f);
- child.SetAnchorPoint(AnchorPoint::CENTER);
- child.SetParentOrigin(ParentOrigin::CENTER);
+ child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
child.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
parent.Add(child);
Actor first = Actor::New();
first.SetSize(100.0f, 100.0f);
- first.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(first);
Actor second = Actor::New();
second.SetSize(100.0f, 100.0f);
second.SetX(100.0f);
- second.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(second);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
DALI_TEST_EQUALS(true, data.functorCalled, TEST_LOCATION);
// Actor become invisible - actor should not receive the next pan
- actor.SetVisible(false);
+ actor.SetProperty( Actor::Property::VISIBLE,false);
// Render and notify
application.SendNotification();
Actor first = Actor::New();
first.SetSize(100.0f, 100.0f);
- first.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(first);
Actor second = Actor::New();
second.SetSize(100.0f, 100.0f);
- second.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
second.SetX(100.0f);
first.Add(second);
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a detector
// Add a layer to overlap the actor
Layer layer = Layer::New();
layer.SetSize(100.0f, 100.0f);
- layer.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor actor2 = Actor::New();
actor2.SetSize(100.0f, 100.0f);
- actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor2.SetX(100.0f);
Stage::GetCurrent().Add(actor2);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetParentOrigin( ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actor.SetSize(400, 400);
return actor;
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetParentOrigin( ParentOrigin::CENTER );
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actor.SetSize(400, 400);
Stage::GetCurrent().Add( actor );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::CENTER);
- actor.SetParentOrigin(ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
stage.Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
actor.TouchSignal().Connect( &application, functor );
// Set actor to require leave events
- actor.SetLeaveRequired( true );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
data.Reset();
// We do not want to listen to leave events anymore
- actor.SetLeaveRequired( false );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false );
// Another motion event outside of actor, no signalling
application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2 ( 200.0f, 200.0f )) );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
rootActor.TouchSignal().Connect( &application, rootFunctor );
// Set actor to require leave events
- actor.SetLeaveRequired( true );
- rootActor.SetLeaveRequired( true );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
+ rootActor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
rootData.Reset();
// We do not want to listen to leave events of actor anymore
- actor.SetLeaveRequired( false );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false );
// Another motion event outside of root actor, only root signalled
Vector2 stageSize( Stage::GetCurrent().GetSize() );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
data.Reset();
// Change actor to insensitive
- actor.SetSensitive( false );
+ actor.SetProperty( Actor::Property::SENSITIVE, false );
// Emit a motion signal, signalled with an interrupted
application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2 ( 200.0f, 200.0f )) );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
application.Render();
// Make root actor insensitive
- rootActor.SetSensitive( false );
+ rootActor.SetProperty( Actor::Property::SENSITIVE, false );
// Emit a motion signal, signalled with an interrupted (should get interrupted even if within root actor)
application.ProcessEvent( GenerateSingleTouch( PointState::MOTION, Vector2 ( 200.0f, 200.0f )) );
Layer layer1 ( Layer::New() );
layer1.SetSize(100.0f, 100.0f);
- layer1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer1 );
Actor actor1 ( Actor::New() );
actor1.SetSize( 100.0f, 100.0f );
- actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor1.SetZ( 1.0f ); // Should hit actor1 in this layer
layer1.Add( actor1 );
data.Reset();
// Make layer1 insensitive, nothing should be hit
- layer1.SetSensitive( false );
+ layer1.SetProperty( Actor::Property::SENSITIVE, false );
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
data.Reset();
// Make layer1 sensitive again, again actor1 will be hit
- layer1.SetSensitive( true );
+ layer1.SetProperty( Actor::Property::SENSITIVE, true );
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
DALI_TEST_CHECK( data.touchedActor == actor1 );
data.Reset();
// Make rootActor insensitive, nothing should be hit
- rootActor.SetSensitive( false );
+ rootActor.SetProperty( Actor::Property::SENSITIVE, false );
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
data.Reset();
// Make rootActor sensitive
- rootActor.SetSensitive( true );
+ rootActor.SetProperty( Actor::Property::SENSITIVE, true );
// Add another layer
Layer layer2 ( Layer::New() );
layer2.SetSize(100.0f, 100.0f );
- layer2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
layer2.SetZ( 10.0f ); // Should hit layer2 in this layer rather than actor2
Stage::GetCurrent().Add( layer2 );
Actor actor2 ( Actor::New() );
actor2.SetSize(100.0f, 100.0f);
- actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
layer2.Add( actor2 );
// Render and notify
data.Reset();
// Make layer2 insensitive, should hit actor1
- layer2.SetSensitive( false );
+ layer2.SetProperty( Actor::Property::SENSITIVE, false );
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
DALI_TEST_CHECK( data.touchedActor == actor1 );
data.Reset();
// Make layer2 sensitive again, should hit layer2
- layer2.SetSensitive( true );
+ layer2.SetProperty( Actor::Property::SENSITIVE, true );
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
//DALI_TEST_CHECK( data.touchedActor == layer2 ); // TODO: Uncomment this after removing renderable hack!
data.Reset();
// Make layer2 invisible, render and notify
- layer2.SetVisible( false );
+ layer2.SetProperty( Actor::Property::VISIBLE, false );
application.SendNotification();
application.Render();
data.Reset();
// Make rootActor invisible, render and notify
- rootActor.SetVisible( false );
+ rootActor.SetProperty( Actor::Property::VISIBLE, false );
application.SendNotification();
application.Render();
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
// Create render task
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
Layer layer = Layer::New();
layer.SetSize(100.0f, 100.0f);
- layer.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor.Add(layer);
// Create render task
// Create a renderable actor to display the FrameBufferImage
Actor renderableActor = CreateRenderableActor( frameBufferImage );
- renderableActor.SetParentOrigin(ParentOrigin::CENTER);
+ renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
renderableActor.SetSize( stageSize.x, stageSize.y );
renderableActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
stage.Add( renderableActor );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add( actor );
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects
Actor parent = CreateRenderableActor();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(parent);
Actor actor = CreateRenderableActor();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
actor.TouchSignal().Connect( &application, functor );
// Register for leave events
- actor.SetLeaveRequired( true );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
// Add a layer to overlap the actor
Layer layer = Layer::New();
layer.SetSize(100.0f, 100.0f);
- layer.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
// Set actor to receive touch-events
- actor.SetLeaveRequired( true );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Render and notify
application.SendNotification();
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
stage.Add( actor );
Actor clippingActor = Actor::New();
clippingActor.SetSize( 50.0f, 50.0f );
- clippingActor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
stage.Add( clippingActor );
Actor clippingChild = Actor::New();
clippingChild.SetSize( 50.0f, 50.0f );
clippingChild.SetPosition( 25.0f, 25.0f );
- clippingChild.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ clippingChild.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
clippingActor.Add( clippingChild );
// Render and notify.
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::CENTER);
- actor.SetParentOrigin(ParentOrigin::CENTER);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
+ actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
stage.Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
actor.TouchedSignal().Connect( &application, functor );
// Set actor to require leave events
- actor.SetLeaveRequired( true );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
data.Reset();
// We do not want to listen to leave events anymore
- actor.SetLeaveRequired( false );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false );
// Another motion event outside of actor, no signalling
application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
rootActor.TouchedSignal().Connect( &application, rootFunctor );
// Set actor to require leave events
- actor.SetLeaveRequired( true );
- rootActor.SetLeaveRequired( true );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
+ rootActor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
rootData.Reset();
// We do not want to listen to leave events of actor anymore
- actor.SetLeaveRequired( false );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, false );
// Another motion event outside of root actor, only root signalled
Vector2 stageSize( Stage::GetCurrent().GetSize() );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
data.Reset();
// Change actor to insensitive
- actor.SetSensitive( false );
+ actor.SetProperty( Actor::Property::SENSITIVE, false );
// Emit a motion signal, signalled with an interrupted
application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
application.Render();
// Make root actor insensitive
- rootActor.SetSensitive( false );
+ rootActor.SetProperty( Actor::Property::SENSITIVE, false );
// Emit a motion signal, signalled with an interrupted (should get interrupted even if within root actor)
application.ProcessEvent( GenerateSingleTouch( TouchPoint::Motion, Vector2 ( 200.0f, 200.0f )) );
Layer layer1 ( Layer::New() );
layer1.SetSize(100.0f, 100.0f);
- layer1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer1 );
Actor actor1 ( Actor::New() );
actor1.SetSize( 100.0f, 100.0f );
- actor1.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor1.SetZ( 1.0f ); // Should hit actor1 in this layer
layer1.Add( actor1 );
data.Reset();
// Make layer1 insensitive, nothing should be hit
- layer1.SetSensitive( false );
+ layer1.SetProperty( Actor::Property::SENSITIVE, false );
application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
data.Reset();
// Make layer1 sensitive again, again actor1 will be hit
- layer1.SetSensitive( true );
+ layer1.SetProperty( Actor::Property::SENSITIVE, true );
application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
DALI_TEST_CHECK( data.touchedActor == actor1 );
data.Reset();
// Make rootActor insensitive, nothing should be hit
- rootActor.SetSensitive( false );
+ rootActor.SetProperty( Actor::Property::SENSITIVE, false );
application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION );
data.Reset();
// Make rootActor sensitive
- rootActor.SetSensitive( true );
+ rootActor.SetProperty( Actor::Property::SENSITIVE, true );
// Add another layer
Layer layer2 ( Layer::New() );
layer2.SetSize(100.0f, 100.0f );
- layer2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
layer2.SetZ( 10.0f ); // Should hit layer2 in this layer rather than actor2
Stage::GetCurrent().Add( layer2 );
Actor actor2 ( Actor::New() );
actor2.SetSize(100.0f, 100.0f);
- actor2.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
layer2.Add( actor2 );
// Render and notify
data.Reset();
// Make layer2 insensitive, should hit actor1
- layer2.SetSensitive( false );
+ layer2.SetProperty( Actor::Property::SENSITIVE, false );
application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
DALI_TEST_CHECK( data.touchedActor == actor1 );
data.Reset();
// Make layer2 sensitive again, should hit layer2
- layer2.SetSensitive( true );
+ layer2.SetProperty( Actor::Property::SENSITIVE, true );
application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION );
//DALI_TEST_CHECK( data.touchedActor == layer2 ); // TODO: Uncomment this after removing renderable hack!
data.Reset();
// Make layer2 invisible, render and notify
- layer2.SetVisible( false );
+ layer2.SetProperty( Actor::Property::VISIBLE, false );
application.SendNotification();
application.Render();
data.Reset();
// Make rootActor invisible, render and notify
- rootActor.SetVisible( false );
+ rootActor.SetProperty( Actor::Property::VISIBLE, false );
application.SendNotification();
application.Render();
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
// Create render task
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
Layer layer = Layer::New();
layer.SetSize(100.0f, 100.0f);
- layer.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor.Add(layer);
// Create render task
// Create a renderable actor to display the FrameBufferImage
Actor renderableActor = CreateRenderableActor( frameBufferImage );
- renderableActor.SetParentOrigin(ParentOrigin::CENTER);
+ renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
renderableActor.SetSize( stageSize.x, stageSize.y );
renderableActor.ScaleBy( Vector3(1.0f, -1.0f, 1.0f) ); // FIXME
stage.Add( renderableActor );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add( actor );
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects
Actor parent = CreateRenderableActor();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(parent);
Actor actor = CreateRenderableActor();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
actor.TouchedSignal().Connect( &application, functor );
// Register for leave events
- actor.SetLeaveRequired( true );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Emit a down signal
application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) );
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
// Add a layer to overlap the actor
Layer layer = Layer::New();
layer.SetSize(100.0f, 100.0f);
- layer.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
// Set actor to receive touch-events
- actor.SetLeaveRequired( true );
+ actor.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
// Render and notify
application.SendNotification();
Actor actor = Actor::New();
actor.SetSize( 100.0f, 100.0f );
- actor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
stage.Add( actor );
Actor clippingActor = Actor::New();
clippingActor.SetSize( 50.0f, 50.0f );
- clippingActor.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
stage.Add( clippingActor );
Actor clippingChild = Actor::New();
clippingChild.SetSize( 50.0f, 50.0f );
clippingChild.SetPosition( 25.0f, 25.0f );
- clippingChild.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ clippingChild.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
clippingActor.Add( clippingChild );
// Render and notify.
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
// Render and notify
Actor parent = Actor::New();
parent.SetSize(100.0f, 100.0f);
- parent.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
// Render and notify
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
BaseHandle CreateNamedActorType()
{
Actor actor = Actor::New();
- actor.SetName( "NamedActor" );
+ actor.SetProperty( Actor::Property::NAME, "NamedActor" );
return actor;
}
Actor namedActor( Actor::DownCast( namedHandle ) );
DALI_TEST_CHECK( namedActor );
- DALI_TEST_CHECK( namedActor.GetName() == "NamedActor" );
+ DALI_TEST_CHECK( namedActor.GetProperty< std::string >( Actor::Property::NAME ) == "NamedActor" );
DALI_TEST_CHECK( type.GetName() == "MyNamedActor" );
DALI_TEST_CHECK( type.GetBaseName() == "Actor" );
Actor a = Actor::DownCast(hdl);
DALI_TEST_CHECK( a );
- a.SetVisible(false);
+ a.SetProperty( Actor::Property::VISIBLE,false);
application.SendNotification();
application.Render(0);
- DALI_TEST_CHECK(!a.IsVisible());
+ DALI_TEST_CHECK(!a.GetCurrentProperty< bool >( Actor::Property::VISIBLE ));
Property::Map attributes;
application.SendNotification();
application.Render(0);
- DALI_TEST_CHECK(a.IsVisible());
+ DALI_TEST_CHECK(a.GetCurrentProperty< bool >( Actor::Property::VISIBLE ));
DALI_TEST_CHECK(!hdl.DoAction("unknownAction", attributes));
END_TEST;
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Register Type
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Register Type
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Register Type
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Register Type
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Register Type
Actor actor = Actor::New();
actor.SetSize(100.0f, 100.0f);
- actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Render and notify
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
}
+void Filter::SetGlobalLogLevel( LogLevel level )
+{
+ for(FilterIter iter = GetActiveFilters()->begin(); iter != GetActiveFilters()->end(); iter++)
+ {
+ (*iter)->SetLogLevel( level );
+ }
+}
void Filter::Log(LogLevel level, const char* format, ...)
{
#define DALI_INTEGRATION_DEBUG_H
/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* Enable trace on all filters.
*/
- void EnableGlobalTrace();
+ static void EnableGlobalTrace();
/**
* Disable trace on all filters.
*/
- void DisableGlobalTrace();
+ static void DisableGlobalTrace();
+
+ /**
+ * Set log level for all filters.
+ *
+ * @param[in] level The log level
+ */
+ static void SetGlobalLogLevel( LogLevel level );
private:
DALI_LOG_INFO( gLogFilter, Debug::General, " State(%s), Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n",
TOUCH_POINT_STATE[iter->GetState()], iter->GetScreenPosition().x, iter->GetScreenPosition().y,
( hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL ),
- ( hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ),
+ ( hitTestResults.actor ? hitTestResults.actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ),
hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y );
// Only set the currentRenderTask for the primary hit actor.
Dali::Actor primaryHitActor = primaryPoint.hitActor;
TouchPoint::State primaryPointState = primaryPoint.state;
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryPoint.hitActor ? reinterpret_cast< void* >( &primaryPoint.hitActor.GetBaseObject() ) : NULL, primaryPoint.hitActor ? primaryPoint.hitActor.GetName().c_str() : "" );
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetName().c_str() : "" );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryPoint.hitActor ? reinterpret_cast< void* >( &primaryPoint.hitActor.GetBaseObject() ) : NULL, primaryPoint.hitActor ? primaryPoint.hitActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" );
if ( ( primaryPointState == TouchPoint::Started ) &&
( hoverEvent.GetPointCount() == 1 ) &&
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#if defined(DEBUG_ENABLED)
-static bool HIERARCHY_GEOMETRY(false);
-static bool HIERARCHY_SENSITIVITY(false);
-static bool HIERARCHY_TOUCH_REQUIRED(false);
-static bool HIERARCHY_HOVER_REQUIRED(false);
-static bool HIERARCHY_HITTABLE(false);
+static bool HIERARCHY_GEOMETRY(true);
+static bool HIERARCHY_SENSITIVITY(true);
+static bool HIERARCHY_TOUCH_REQUIRED(true);
+static bool HIERARCHY_HOVER_REQUIRED(true);
+static bool HIERARCHY_HITTABLE(true);
static const Debug::LogLevel HIERARCHY_DEBUG_LOG_LEVEL( Debug::Verbose );
output << " | ";
}
- output << actor.GetName() << "(" << actor.GetTypeName() << ", " << actor.GetObjectPtr() << ")";
+ output << actor.GetProperty< std::string >( Dali::Actor::Property::NAME ) << "(" << actor.GetTypeName() << ", " << actor.GetObjectPtr() << ")";
if ( HIERARCHY_GEOMETRY )
{
- output << " Pos: " << actor.GetCurrentWorldPosition() << " Size: " << actor.GetCurrentSize() << " Scale: " << actor.GetCurrentWorldScale();
+ output << " Pos: " << actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::WORLD_POSITION ) << " Size: " << actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::SIZE ) << " Scale: " << actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::WORLD_SCALE );
}
if ( HIERARCHY_SENSITIVITY )
DALI_LOG_INFO( gLogFilter, Debug::General, " State(%s), Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n",
TOUCH_POINT_STATE[iter->GetState()], iter->GetScreenPosition().x, iter->GetScreenPosition().y,
( hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL ),
- ( hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ),
+ ( hitTestResults.actor ? hitTestResults.actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ),
hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y );
// Only set the currentRenderTask for the primary hit actor.
Dali::Actor primaryHitActor = primaryPoint.GetHitActor();
PointState::Type primaryPointState = primaryPoint.GetState();
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryHitActor ? reinterpret_cast< void* >( &primaryHitActor.GetBaseObject() ) : NULL, primaryHitActor ? primaryHitActor.GetName().c_str() : "" );
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetName().c_str() : "" );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "PrimaryHitActor: (%p) %s\n", primaryHitActor ? reinterpret_cast< void* >( &primaryHitActor.GetBaseObject() ) : NULL, primaryHitActor ? primaryHitActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" );
if ( ( primaryPointState == PointState::DOWN ) &&
( touchEvent.GetPointCount() == 1 ) &&
}
case Dali::HitTestAlgorithm::DESCEND_ACTOR_TREE:
{
- if( actor.IsVisible() ) // Actor is visible, if not visible then none of its children are visible.
+ if( actor.GetProperty< bool >( Dali::Actor::Property::VISIBLE ) ) // Actor is visible, if not visible then none of its children are visible.
{
hittable = true;
}
DALI_LOG_INFO( gLogFilter, Debug::General, " Screen(%.0f, %.0f), HitActor(%p, %s), Local(%.2f, %.2f)\n",
event.point.x, event.point.y,
( hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL ),
- ( hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" ),
+ ( hitTestResults.actor ? hitTestResults.actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" ),
hitTestResults.actorCoordinates.x, hitTestResults.actorCoordinates.y );
// Recursively deliver events to the actor and its parents, until the event is consumed or the stage is reached.
Dali::Actor consumedActor = EmitWheelSignals( hitTestResults.actor, wheelEvent );
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "HitActor: (%p) %s\n", hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL, hitTestResults.actor ? hitTestResults.actor.GetName().c_str() : "" );
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetName().c_str() : "" );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "HitActor: (%p) %s\n", hitTestResults.actor ? reinterpret_cast< void* >( &hitTestResults.actor.GetBaseObject() ) : NULL, hitTestResults.actor ? hitTestResults.actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "ConsumedActor: (%p) %s\n", consumedActor ? reinterpret_cast< void* >( &consumedActor.GetBaseObject() ) : NULL, consumedActor ? consumedActor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str() : "" );
}
else
{
output << actor.GetTypeName();
- output << ", " << actor.GetName();
+ output << ", " << actor.GetProperty< std::string >( Dali::Actor::Property::NAME );
- output << " - Pos: " << actor.GetCurrentPosition() << " Size: " << actor.GetTargetSize();
+ output << " - Pos: " << actor.GetCurrentProperty< Vector3 >( Dali::Actor::Property::POSITION ) << " Size: " << actor.GetTargetSize();
output << ", Dirty: (" << ( GetImplementation( actor ).IsLayoutDirty( Dimension::WIDTH ) ? "TRUE" : "FALSE" ) << "," << ( GetImplementation( actor ).IsLayoutDirty( Dimension::HEIGHT ) ? "TRUE" : "FALSE" ) << ")";
output << ", Negotiated: (" << ( GetImplementation( actor ).IsLayoutNegotiated( Dimension::WIDTH ) ? "TRUE" : "FALSE" ) << "," << ( GetImplementation( actor ).IsLayoutNegotiated( Dimension::HEIGHT ) ? "TRUE" : "FALSE" ) << ")";
if( actorImpl.RelayoutRequired() )
{
- DALI_LOG_INFO( gLogFilter, Debug::General, "[Internal::RelayoutController::Relayout] Negotiating %p %s %s (%.2f, %.2f)\n", &actorImpl, actor.GetTypeName().c_str(), actor.GetName().c_str(), size.width, size.height );
+ DALI_LOG_INFO( gLogFilter, Debug::General, "[Internal::RelayoutController::Relayout] Negotiating %p %s %s (%.2f, %.2f)\n", &actorImpl, actor.GetTypeName().c_str(), actor.GetProperty< std::string >( Dali::Actor::Property::NAME ).c_str(), size.width, size.height );
// 3. Negotiate the size with the current actor. Pass it an empty container which the actor
// has to fill with all the actors it has not done any size negotiation for.
/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
return *this;
}
-const std::string& Actor::GetName() const
-{
- return GetImplementation(*this).GetName();
-}
-
-void Actor::SetName(const std::string& name)
-{
- GetImplementation(*this).SetName(name);
-}
-
uint32_t Actor::GetId() const
{
return GetImplementation(*this).GetId();
return Actor(parent);
}
-void Actor::SetParentOrigin(const Vector3& origin)
-{
- GetImplementation(*this).SetParentOrigin(origin);
-}
-
-Vector3 Actor::GetCurrentParentOrigin() const
-{
- return GetImplementation(*this).GetCurrentParentOrigin();
-}
-
-void Actor::SetAnchorPoint(const Vector3& anchorPoint)
-{
- GetImplementation(*this).SetAnchorPoint(anchorPoint);
-}
-
-Vector3 Actor::GetCurrentAnchorPoint() const
-{
- return GetImplementation(*this).GetCurrentAnchorPoint();
-}
-
void Actor::SetSize(float width, float height)
{
GetImplementation(*this).SetSize(width, height);
return GetImplementation(*this).GetTargetSize();
}
-Vector3 Actor::GetCurrentSize() const
-{
- return GetImplementation(*this).GetCurrentSize();
-}
-
Vector3 Actor::GetNaturalSize() const
{
return GetImplementation(*this).GetNaturalSize();
GetImplementation(*this).TranslateBy(distance);
}
-Vector3 Actor::GetCurrentPosition() const
-{
- return GetImplementation(*this).GetCurrentPosition();
-}
-
-Vector3 Actor::GetCurrentWorldPosition() const
-{
- return GetImplementation(*this).GetCurrentWorldPosition();
-}
-
void Actor::SetOrientation(const Radian& angle, const Vector3& axis)
{
GetImplementation(*this).SetOrientation(angle, axis);
GetImplementation(*this).RotateBy(relativeRotation);
}
-Quaternion Actor::GetCurrentOrientation() const
-{
- return GetImplementation(*this).GetCurrentOrientation();
-}
-
-void Actor::SetInheritOrientation(bool inherit)
-{
- GetImplementation(*this).SetInheritOrientation(inherit);
-}
-
-bool Actor::IsOrientationInherited() const
-{
- return GetImplementation(*this).IsOrientationInherited();
-}
-
-Quaternion Actor::GetCurrentWorldOrientation() const
-{
- return GetImplementation(*this).GetCurrentWorldOrientation();
-}
-
void Actor::SetScale(float scale)
{
GetImplementation(*this).SetScale(scale);
GetImplementation(*this).ScaleBy(relativeScale);
}
-Vector3 Actor::GetCurrentScale() const
-{
- return GetImplementation(*this).GetCurrentScale();
-}
-
-Vector3 Actor::GetCurrentWorldScale() const
-{
- return GetImplementation(*this).GetCurrentWorldScale();
-}
-
-void Actor::SetInheritScale( bool inherit )
-{
- GetImplementation(*this).SetInheritScale( inherit );
-}
-
-bool Actor::IsScaleInherited() const
-{
- return GetImplementation(*this).IsScaleInherited();
-}
-
void Actor::SetSizeModeFactor(const Vector3& factor)
{
GetImplementation(*this).SetSizeModeFactor(factor);
return GetImplementation(*this).GetSizeModeFactor();
}
-Matrix Actor::GetCurrentWorldMatrix() const
-{
- return GetImplementation(*this).GetCurrentWorldMatrix();
-}
-
-void Actor::SetVisible(bool visible)
-{
- GetImplementation(*this).SetVisible(visible);
-}
-
-bool Actor::IsVisible() const
-{
- return GetImplementation(*this).IsVisible();
-}
-
-void Actor::SetOpacity(float opacity)
-{
- GetImplementation(*this).SetOpacity(opacity);
-}
-
-float Actor::GetCurrentOpacity() const
-{
- return GetImplementation(*this).GetCurrentOpacity();
-}
-
-void Actor::SetColor(const Vector4& color)
-{
- GetImplementation(*this).SetColor(color);
-}
-
-Vector4 Actor::GetCurrentColor() const
-{
- return GetImplementation(*this).GetCurrentColor();
-}
-
void Actor::SetColorMode( ColorMode colorMode )
{
GetImplementation(*this).SetColorMode(colorMode);
return GetImplementation(*this).GetColorMode();
}
-Vector4 Actor::GetCurrentWorldColor() const
-{
- return GetImplementation(*this).GetCurrentWorldColor();
-}
-
void Actor::SetDrawMode( DrawMode::Type drawMode )
{
GetImplementation(*this).SetDrawMode( drawMode );
return GetImplementation(*this).GetDrawMode();
}
-void Actor::SetSensitive(bool sensitive)
-{
- GetImplementation(*this).SetSensitive(sensitive);
-}
-
-bool Actor::IsSensitive() const
-{
- return GetImplementation(*this).IsSensitive();
-}
-
bool Actor::ScreenToLocal(float& localX, float& localY, float screenX, float screenY) const
{
return GetImplementation(*this).ScreenToLocal(localX, localY, screenX, screenY);
}
-void Actor::SetLeaveRequired(bool required)
-{
- GetImplementation(*this).SetLeaveRequired(required);
-}
-
-bool Actor::GetLeaveRequired() const
-{
- return GetImplementation(*this).GetLeaveRequired();
-}
-
void Actor::SetKeyboardFocusable( bool focusable )
{
GetImplementation(*this).SetKeyboardFocusable(focusable);
paddingOut.top = heightPadding.y;
}
-void Actor::SetMinimumSize( const Vector2& size )
-{
- Internal::Actor& impl = GetImplementation(*this);
-
- impl.SetMinimumSize( size.x, Dimension::WIDTH );
- impl.SetMinimumSize( size.y, Dimension::HEIGHT );
-}
-
-Vector2 Actor::GetMinimumSize()
-{
- Internal::Actor& impl = GetImplementation(*this);
-
- return Vector2( impl.GetMinimumSize( Dimension::WIDTH ), impl.GetMinimumSize( Dimension::HEIGHT ) );
-}
-
-void Actor::SetMaximumSize( const Vector2& size )
-{
- Internal::Actor& impl = GetImplementation(*this);
-
- impl.SetMaximumSize( size.x, Dimension::WIDTH );
- impl.SetMaximumSize( size.y, Dimension::HEIGHT );
-}
-
-Vector2 Actor::GetMaximumSize()
-{
- Internal::Actor& impl = GetImplementation(*this);
-
- return Vector2( impl.GetMaximumSize( Dimension::WIDTH ), impl.GetMaximumSize( Dimension::HEIGHT ) );
-}
-
int32_t Actor::GetHierarchyDepth()
{
return GetImplementation(*this).GetHierarchyDepth();
#define DALI_ACTOR_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* - An actor is only hittable if the actor's touch or hover signal has a connection.
* - An actor is only hittable when it is between the camera's near and far planes.
- * - If an actor is made insensitive, then the actor and its children are not hittable; see IsSensitive().
- * - If an actor's visibility flag is unset, then none of its children are hittable either; see IsVisible().
+ * - If an actor is made insensitive, then the actor and its children are not hittable; see Actor::Property::SENSITIVE.
+ * - If an actor's visibility flag is unset, then none of its children are hittable either; see Actor::Property::VISIBLE.
* - To be hittable, an actor must have a non-zero size.
* - If an actor's world color is fully transparent, then it is not hittable; see GetCurrentWorldColor().
*
* @brief The origin of an actor, within its parent's area.
* @details Name "parentOrigin", type Property::VECTOR3, constraint-input
* @SINCE_1_0.0
- * @see Actor::SetParentOrigin()
*/
PARENT_ORIGIN = DEFAULT_ACTOR_PROPERTY_START_INDEX,
* @brief The x origin of an actor, within its parent's area.
* @details Name "parentOriginX", type Property::FLOAT, constraint-input
* @SINCE_1_0.0
- * @see Actor::SetParentOrigin()
*/
PARENT_ORIGIN_X,
* @brief The y origin of an actor, within its parent's area.
* @details Name "parentOriginY", type Property::FLOAT, constraint-input
* @SINCE_1_0.0
- * @see Actor::SetParentOrigin()
*/
PARENT_ORIGIN_Y,
* @brief The z origin of an actor, within its parent's area.
* @details Name "parentOriginZ", type Property::FLOAT, constraint-input
* @SINCE_1_0.0
- * @see Actor::SetParentOrigin()
*/
PARENT_ORIGIN_Z,
* @brief The anchor-point of an actor.
* @details Name "anchorPoint", type Property::VECTOR3, constraint-input
* @SINCE_1_0.0
- * @see Actor::SetAnchorPoint()
*/
ANCHOR_POINT,
* @brief The x anchor-point of an actor.
* @details Name "anchorPointX", type Property::FLOAT, constraint-input
* @SINCE_1_0.0
- * @see Actor::SetAnchorPoint()
*/
ANCHOR_POINT_X,
* @brief The y anchor-point of an actor.
* @details Name "anchorPointY", type Property::FLOAT, constraint-input
* @SINCE_1_0.0
- * @see Actor::SetAnchorPoint()
*/
ANCHOR_POINT_Y,
* @brief The z anchor-point of an actor.
* @details Name "anchorPointZ", type Property::FLOAT, constraint-input
* @SINCE_1_0.0
- * @see Actor::SetAnchorPoint()
*/
ANCHOR_POINT_Z,
* @brief The world position of an actor.
* @details Name "worldPosition", type Property::VECTOR3, read-only / constraint-input
* @SINCE_1_0.0
- * @see Actor::GetCurrentWorldPosition()
*/
WORLD_POSITION,
* @brief The x world position of an actor.
* @details Name "worldPositionX", type Property::FLOAT, read-only / constraint-input
* @SINCE_1_0.0
- * @see Actor::GetCurrentWorldPosition()
*/
WORLD_POSITION_X,
* @brief The y world position of an actor.
* @details Name "worldPositionY", type Property::FLOAT, read-only / constraint-input
* @SINCE_1_0.0
- * @see Actor::GetCurrentWorldPosition()
*/
WORLD_POSITION_Y,
* @brief The z world position of an actor.
* @details Name "worldPositionZ", type Property::FLOAT, read-only / constraint-input
* @SINCE_1_0.0
- * @see Actor::GetCurrentWorldPosition()
*/
WORLD_POSITION_Z,
* @brief The world orientation of an actor.
* @details Name "worldOrientation", type Property::ROTATION, read-only / constraint-input
* @SINCE_1_0.0
- * @see Actor::GetCurrentWorldOrientation()
*/
WORLD_ORIENTATION,
* @brief The world scale factor applied to an actor.
* @details Name "worldScale", type Property::VECTOR3, read-only / constraint-input
* @SINCE_1_0.0
- * @see Actor::GetCurrentWorldScale()
*/
WORLD_SCALE,
* @brief The visibility flag of an actor.
* @details Name "visible", type Property::BOOL, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetVisible()
*/
VISIBLE,
* @details Name "color", type Property::VECTOR4 or Property::VECTOR3, animatable / constraint-input
* @note The alpha value will be 1.0f if a Vector3 type value is set.
* @SINCE_1_0.0
- * @see Actor::SetColor()
*/
COLOR,
* @brief The red component of an actor's color.
* @details Name "colorRed", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetColor()
*/
COLOR_RED,
* @brief The green component of an actor's color.
* @details Name "colorGreen", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetColor()
*/
COLOR_GREEN,
* @brief The blue component of an actor's color.
* @details Name "colorBlue", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetColor()
*/
COLOR_BLUE,
* @brief The alpha component of an actor's color.
* @details Name "colorAlpha", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetColor()
*/
COLOR_ALPHA,
* @brief The world color of an actor.
* @details Name "worldColor", type Property::VECTOR4, read-only / constraint-input
* @SINCE_1_0.0
- * @see Actor::GetCurrentWorldColor()
*/
WORLD_COLOR,
* @brief The world matrix of an actor.
* @details Name "worldMatrix", type Property::MATRIX, read-only / constraint-input
* @SINCE_1_0.0
- * @see Actor::GetCurrentWorldMatrix()
*/
WORLD_MATRIX,
* @brief The name of an actor.
* @details Name "name", type Property::STRING
* @SINCE_1_0.0
- * @see Actor::GetName()
*/
NAME,
* @brief The flag whether an actor should emit touch or hover signals.
* @details Name "sensitive", type Property::BOOLEAN
* @SINCE_1_0.0
- * @see Actor::SetSensitive()
*/
SENSITIVE,
* @brief The flag whether an actor should receive a notification when touch or hover motion events leave.
* @details Name "leaveRequired", type Property::BOOLEAN
* @SINCE_1_0.0
- * @see Actor::SetLeaveRequired()
*/
LEAVE_REQUIRED,
* @brief The flag whether a child actor inherits it's parent's orientation.
* @details Name "inheritOrientation", type Property::BOOLEAN
* @SINCE_1_0.0
- * @see Actor::SetInheritOrientation()
*/
INHERIT_ORIENTATION,
* @brief The flag whether a child actor inherits it's parent's scale.
* @details Name "inheritScale", type Property::BOOLEAN
* @SINCE_1_0.0
- * @see Actor::SetInheritScale()
*/
INHERIT_SCALE,
* @brief The minimum size an actor can be assigned in size negotiation.
* @details Name "minimumSize", type Property::VECTOR2.
* @SINCE_1_0.0
- * @see Actor::SetMinimumSize()
*/
MINIMUM_SIZE,
* @brief The maximum size an actor can be assigned in size negotiation.
* @details Name "maximumSize", type Property::VECTOR2.
* @SINCE_1_0.0
- * @see Actor::SetMaximumSize()
*/
MAXIMUM_SIZE,
* @brief The flag whether a child actor inherits it's parent's position.
* @details Name "inheritPosition", type Property::BOOLEAN.
* @SINCE_1_1.24
- * @see Actor::SetInheritPosition()
*/
INHERIT_POSITION,
Actor& operator=(const Actor& rhs);
/**
- * @brief Retrieves the Actor's name.
- *
- * @SINCE_1_0.0
- * @return The Actor's name
- * @pre The Actor has been initialized.
- */
- const std::string& GetName() const;
-
- /**
- * @brief Sets the Actor's name.
- *
- * @SINCE_1_0.0
- * @param[in] name The new name
- * @pre The Actor has been initialized.
- */
- void SetName(const std::string& name);
-
- /**
* @brief Retrieves the unique ID of the actor.
*
* @SINCE_1_0.0
// Positioning
/**
- * @brief Sets the origin of an actor, within its parent's area.
- *
- * This is expressed in unit coordinates, such that (0.0, 0.0, 0.5) is the top-left corner of the parent,
- * and (1.0, 1.0, 0.5) is the bottom-right corner.
- * The default parent-origin is Dali::ParentOrigin::TOP_LEFT (0.0, 0.0, 0.5).
- * An actor's position is the distance between this origin, and the actor's anchor-point.
- * @image html parent-origin.png
- * @SINCE_1_0.0
- * @param[in] origin The new parent-origin
- * @pre The Actor has been initialized.
- * @see Dali::ParentOrigin for predefined parent origin values
- */
- void SetParentOrigin(const Vector3& origin);
-
- /**
- * @brief Retrieves the parent-origin of an actor.
- *
- * @SINCE_1_0.0
- * @return The current parent-origin
- * @pre The Actor has been initialized.
- */
- Vector3 GetCurrentParentOrigin() const;
-
- /**
- * @brief Sets the anchor-point of an actor.
- *
- * This is expressed in unit coordinates, such that (0.0, 0.0, 0.5)
- * is the top-left corner of the actor, and (1.0, 1.0, 0.5) is the
- * bottom-right corner. The default anchor point is
- * Dali::AnchorPoint::CENTER (0.5, 0.5, 0.5).
- * An actor position is the distance between its parent-origin and this anchor-point.
- * An actor's orientation is the rotation from its default orientation, the rotation is centered around its anchor-point.
- * @image html anchor-point.png
- * @SINCE_1_0.0
- * @param[in] anchorPoint The new anchor-point
- * @pre The Actor has been initialized.
- * @see Dali::AnchorPoint for predefined anchor point values
- */
- void SetAnchorPoint(const Vector3& anchorPoint);
-
- /**
- * @brief Retrieves the anchor-point of an actor.
- *
- * @SINCE_1_0.0
- * @return The current anchor-point
- * @pre The Actor has been initialized.
- */
- Vector3 GetCurrentAnchorPoint() const;
-
- /**
* @brief Sets the size of an actor.
*
* Geometry can be scaled to fit within this area.
Vector3 GetTargetSize() const;
/**
- * @brief Retrieves the actor's size.
- *
- * @SINCE_1_0.0
- * @return The actor's current size
- * @pre The actor has been initialized.
- * @note This property can be animated; the return value may not match the value written with SetSize().
- */
- Vector3 GetCurrentSize() const;
-
- /**
* @brief Returns the natural size of the actor.
*
* Deriving classes stipulate the natural size and by default an actor has a ZERO natural size.
*
* By default, sets the position vector between the parent origin and anchor point (default).
*
- * If Position inheritance if disabled, sets the world position. @see SetInheritPosition
+ * If Position inheritance if disabled, sets the world position. @see Actor::Property::INHERIT_POSITION
*
* @image html actor-position.png
* The Actor's z position will be set to 0.0f.
*
* By default, sets the position vector between the parent origin and anchor point (default).
*
- * If Position inheritance if disabled, sets the world position. @see SetInheritPosition
+ * If Position inheritance if disabled, sets the world position. @see Actor::Property::INHERIT_POSITION
*
* @image html actor-position.png
* @SINCE_1_0.0
*
* By default, sets the position vector between the parent origin and anchor point (default).
*
- * If Position inheritance if disabled, sets the world position. @see SetInheritPosition
+ * If Position inheritance if disabled, sets the world position. @see Actor::Property::INHERIT_POSITION
*
* @image html actor-position.png
* @SINCE_1_0.0
void TranslateBy(const Vector3& distance);
/**
- * @brief Retrieves the position of the Actor.
- *
- * @SINCE_1_0.0
- * @return The Actor's current position
- * @pre The Actor has been initialized.
- * @note This property can be animated; the return value may not match the value written with SetPosition().
- */
- Vector3 GetCurrentPosition() const;
-
- /**
- * @brief Retrieves the world-position of the Actor.
- *
- * @SINCE_1_0.0
- * @return The Actor's current position in world coordinates
- * @pre The Actor has been initialized.
- * @note The actor may not have a world-position unless it has been added to the stage.
- */
- Vector3 GetCurrentWorldPosition() const;
-
- /**
- * @brief Sets whether a child actor inherits it's parent's position.
- *
- * Default is to inherit.
- * Switching this off means that using SetPosition() sets the actor's world position, i.e. translates from
- * the world origin (0,0,0) to the anchor point of the actor.
- * @SINCE_1_1.24
- * @param[in] inherit - @c true if the actor should inherit position, @c false otherwise
- * @pre The Actor has been initialized.
- */
- inline void SetInheritPosition( bool inherit )
- {
- SetProperty(Property::INHERIT_POSITION, inherit );
- }
-
- /**
- * @brief Returns whether the actor inherits its parent's position.
- *
- * @SINCE_1_1.24
- * @return @c true if the actor inherits its parent position, @c false if it uses world position
- * @pre The Actor has been initialized.
- */
- inline bool IsPositionInherited() const
- {
- return GetProperty(Property::INHERIT_POSITION ).Get<bool>();
- }
-
- /**
* @brief Sets the orientation of the Actor.
*
* An actor's orientation is the rotation from its default orientation, and the rotation is centered around its anchor-point.
void RotateBy(const Quaternion& relativeRotation);
/**
- * @brief Retrieves the Actor's orientation.
- *
- * @SINCE_1_0.0
- * @return The current orientation
- * @pre The Actor has been initialized.
- * @note This property can be animated; the return value may not match the value written with SetOrientation().
- */
- Quaternion GetCurrentOrientation() const;
-
- /**
- * @brief Sets whether a child actor inherits it's parent's orientation.
- *
- * Default is to inherit.
- * Switching this off means that using SetOrientation() sets the actor's world orientation.
- * @SINCE_1_0.0
- * @param[in] inherit - @c true if the actor should inherit orientation, @c false otherwise
- * @pre The Actor has been initialized.
- */
- void SetInheritOrientation(bool inherit);
-
- /**
- * @brief Returns whether the actor inherits its parent's orientation.
- *
- * @SINCE_1_0.0
- * @return @c true if the actor inherits its parent orientation, @c false if it uses world orientation
- * @pre The Actor has been initialized.
- */
- bool IsOrientationInherited() const;
-
- /**
- * @brief Retrieves the world-orientation of the Actor.
- *
- * @SINCE_1_0.0
- * @return The Actor's current orientation in the world
- * @pre The Actor has been initialized.
- * @note The actor will not have a world-orientation, unless it has previously been added to the stage.
- */
- Quaternion GetCurrentWorldOrientation() const;
-
- /**
* @brief Sets the scale factor applied to an actor.
*
* @SINCE_1_0.0
*/
void ScaleBy(const Vector3& relativeScale);
- /**
- * @brief Retrieves the scale factor applied to an actor.
- *
- * @SINCE_1_0.0
- * @return A vector representing the scale factor for each axis
- * @pre The Actor has been initialized.
- * @note This property can be animated; the return value may not match the value written with SetScale().
- */
- Vector3 GetCurrentScale() const;
-
- /**
- * @brief Retrieves the world-scale of the Actor.
- *
- * @SINCE_1_0.0
- * @return The Actor's current scale in the world
- * @pre The Actor has been initialized.
- * @note The actor will not have a world-scale, unless it has previously been added to the stage.
- */
- Vector3 GetCurrentWorldScale() const;
-
- /**
- * @brief Sets whether a child actor inherits it's parent's scale.
- *
- * Default is to inherit.
- * Switching this off means that using SetScale() sets the actor's world scale.
- * @SINCE_1_0.0
- * @param[in] inherit - @c true if the actor should inherit scale, @c false otherwise
- * @pre The Actor has been initialized.
- */
- void SetInheritScale( bool inherit );
-
- /**
- * @brief Returns whether the actor inherits its parent's scale.
- *
- * @SINCE_1_0.0
- * @return @c true if the actor inherits its parent scale, @c false if it uses world scale
- * @pre The Actor has been initialized.
- */
- bool IsScaleInherited() const;
-
- /**
- * @brief Retrieves the world-matrix of the actor.
- *
- * @SINCE_1_0.0
- * @return The Actor's current world matrix
- * @pre The Actor has been initialized.
- * @note The actor will not have a world-matrix, unless it has previously been added to the stage.
- */
- Matrix GetCurrentWorldMatrix() const;
-
// Visibility & Color
/**
- * @brief Sets the visibility flag of an actor.
- *
- * @SINCE_1_0.0
- * @param[in] visible The new visibility flag
- * @pre The actor has been initialized.
- * @note This is an asynchronous method; the value written may not match a value subsequently read with IsVisible().
- * @note If an actor's visibility flag is set to false, then the actor and its children will not be rendered.
- * This is regardless of the individual visibility values of the children i.e. an actor will only be
- * rendered if all of its parents have visibility set to true.
- */
- void SetVisible(bool visible);
-
- /**
- * @brief Retrieves the visibility flag of an actor.
- *
- * @SINCE_1_0.0
- * @return The visibility flag
- * @pre The actor has been initialized.
- * @note This property can be animated; the return value may not match the value written with SetVisible().
- * @note If an actor is not visible, then the actor and its children will not be rendered.
- * This is regardless of the individual visibility values of the children i.e. an actor will only be
- * rendered if all of its parents have visibility set to true.
- */
- bool IsVisible() const;
-
- /**
- * @brief Sets the opacity of an actor.
- *
- * @SINCE_1_0.0
- * @param[in] opacity The new opacity
- * @pre The actor has been initialized.
- * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentOpacity().
- */
- void SetOpacity(float opacity);
-
- /**
- * @brief Retrieves the actor's opacity.
- *
- * @SINCE_1_0.0
- * @return The actor's opacity
- * @pre The actor has been initialized.
- * @note This property can be animated; the return value may not match the value written with SetOpacity().
- */
- float GetCurrentOpacity() const;
-
- /**
- * @brief Sets the actor's color; this is an RGBA value.
- *
- * The final color of the actor depends on its color mode.
- * @SINCE_1_0.0
- * @param[in] color The new color
- * @pre The Actor has been initialized.
- * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentColor().
- */
- void SetColor(const Vector4& color);
-
- /**
- * @brief Retrieves the actor's color.
- *
- * Actor's own color is not clamped.
- * @SINCE_1_0.0
- * @return The color
- * @pre The Actor has been initialized.
- * @note This property can be animated; the return value may not match the value written with SetColor().
- */
- Vector4 GetCurrentColor() const;
-
- /**
* @brief Sets the actor's color mode.
*
* This specifies whether the Actor uses its own color, or inherits
ColorMode GetColorMode() const;
/**
- * @brief Retrieves the world-color of the Actor, where each component is clamped within the 0->1 range.
- *
- * @SINCE_1_0.0
- * @return The Actor's current color in the world
- * @pre The Actor has been initialized.
- * @note The actor will not have a world-color, unless it has previously been added to the stage.
- */
- Vector4 GetCurrentWorldColor() const;
-
- /**
* @brief Sets how the actor and its children should be drawn.
*
* Not all actors are renderable, but DrawMode can be inherited from any actor.
// Input Handling
/**
- * @brief Sets whether an actor should emit touch or hover signals.
- *
- * An actor is sensitive by default, which means that as soon as an application connects to the SignalTouch(),
- * the touch event signal will be emitted, and as soon as an application connects to the SignalHover(), the
- * hover event signal will be emitted.
- *
- * If the application wishes to temporarily disable the touch or hover event signal emission, then they can do so by calling:
- * @code
- * actor.SetSensitive(false);
- * @endcode
- *
- * Then, to re-enable the touch or hover event signal emission, the application should call:
- * @code
- * actor.SetSensitive(true);
- * @endcode
- *
- * @SINCE_1_0.0
- * @param[in] sensitive true to enable emission of the touch or hover event signals, false otherwise
- * @pre The Actor has been initialized.
- * @note If an actor's sensitivity is set to false, then it's children will not be hittable either.
- * This is regardless of the individual sensitivity values of the children i.e. an actor will only be
- * hittable if all of its parents have sensitivity set to true.
- * @see @see TouchedSignal() and HoveredSignal().
- */
- void SetSensitive(bool sensitive);
-
- /**
- * @brief Queries whether an actor emits touch or hover event signals.
- *
- * @SINCE_1_0.0
- * @return @c true, if emission of touch or hover event signals is enabled, @c false otherwise
- * @pre The Actor has been initialized.
- * @note If an actor is not sensitive, then it's children will not be hittable either.
- * This is regardless of the individual sensitivity values of the children i.e. an actor will only be
- * hittable if all of its parents have sensitivity set to true.
- */
- bool IsSensitive() const;
-
- /**
* @brief Converts screen coordinates into the actor's coordinate system using the default camera.
*
* @SINCE_1_0.0
bool ScreenToLocal(float& localX, float& localY, float screenX, float screenY) const;
/**
- * @brief Sets whether the actor should receive a notification when touch or hover motion events leave
- * the boundary of the actor.
- *
- * @SINCE_1_0.0
- * @param[in] required Should be set to true if a Leave event is required
- * @pre The Actor has been initialized.
- * @note By default, this is set to false as most actors do not require this.
- * @note Need to connect to the TouchedSignal() or HoveredSignal() to actually receive this event.
- *
- */
- void SetLeaveRequired(bool required);
-
- /**
- * @brief This returns whether the actor requires touch or hover events whenever touch or hover motion events leave
- * the boundary of the actor.
- *
- * @SINCE_1_0.0
- * @return @c true if a Leave event is required, @c false otherwise
- * @pre The Actor has been initialized.
- */
- bool GetLeaveRequired() const;
-
- /**
* @brief Sets whether the actor should be focusable by keyboard navigation.
*
* The default is false.
void GetPadding( Padding& paddingOut ) const;
/**
- * @brief Sets the minimum size an actor can be assigned in size negotiation.
- *
- * @SINCE_1_0.0
- * @param[in] size The minimum size
- */
- void SetMinimumSize( const Vector2& size );
-
- /**
- * @brief Returns the minimum relayout size.
- *
- * @SINCE_1_0.0
- * @return Return the minimum size
- */
- Vector2 GetMinimumSize();
-
- /**
- * @brief Sets the maximum size an actor can be assigned in size negotiation.
- *
- * @SINCE_1_0.0
- * @param[in] size The maximum size
- */
- void SetMaximumSize( const Vector2& size );
-
- /**
- * @brief Returns the maximum relayout size.
- *
- * @SINCE_1_0.0
- * @return Return the maximum size
- */
- Vector2 GetMaximumSize();
-
- /**
* @brief Gets depth in the hierarchy for the actor.
*
* @SINCE_1_0.0