Actor actor = Actor::New();
actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- actor.SetSize( size );
- actor.SetPosition( position );
+ actor.SetProperty( Actor::Property::SIZE, size );
+ actor.SetProperty( Actor::Property::POSITION, position );
Stage::GetCurrent().Add( actor );
RelayoutSignalHandler relayoutSignal( application );
Actor meshActor = Actor::New();
meshActor.AddRenderer( renderer );
- meshActor.SetSize( Vector3( 400.0f, 400.0f, 0.1f ) );
+ meshActor.SetProperty( Actor::Property::SIZE, Vector3( 400.0f, 400.0f, 0.1f ) );
meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, parentOrigin );
meshActor.SetProperty( Actor::Property::ANCHOR_POINT, anchorPoint );
Stage::GetCurrent().Add( meshActor );
float radius = meshActor.GetTargetSize().Length() * 0.5f;
float offset = radius + 0.1f;
meshPosition.z = cameraDepth - nearPlane + offset;
- meshActor.SetPosition( meshPosition );
+ meshActor.SetProperty( Actor::Property::POSITION, meshPosition );
drawTrace.Reset();
application.SendNotification();
float offset = meshActor.GetTargetSize().z - 0.1f;
meshPosition.z = cameraDepth - nearPlane + offset;
- meshActor.SetPosition( meshPosition );
+ meshActor.SetProperty( Actor::Property::POSITION, meshPosition );
drawTrace.Reset();
application.SendNotification();
float radius = meshActor.GetTargetSize().Length() * 0.5f;
float offset = radius + 0.1f;
meshPosition.z = cameraDepth - farPlane - offset;
- meshActor.SetPosition( meshPosition );
+ meshActor.SetProperty( Actor::Property::POSITION, meshPosition );
drawTrace.Reset();
application.SendNotification();
float offset = meshActor.GetTargetSize().z - 0.1f;
meshPosition.z = cameraDepth - farPlane - offset;
- meshActor.SetPosition( meshPosition );
+ meshActor.SetProperty( Actor::Property::POSITION, meshPosition );
drawTrace.Reset();
application.SendNotification();
renderer.SetTextures( textureSet );
// Set actor to the size of the texture if set
- actor.SetSize( texture.GetWidth(), texture.GetHeight() );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( texture.GetWidth(), texture.GetHeight() ) );
}
return actor;
END_TEST;
}
-// SetSize(float width, float height)
int UtcDaliActorSetSize01(void)
{
TestApplication application;
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
- actor.SetSize(vector.x, vector.y);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( vector.x, vector.y ) );
// Immediately retrieve the size after setting
Vector3 currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_EQUALS( currentSize, vector, Math::MACHINE_EPSILON_0, TEST_LOCATION );
// Set a new size after resize policy is changed and check the new size
- actor.SetSize( Vector3( 0.1f, 0.2f, 0.0f ) );
+ actor.SetProperty( Actor::Property::SIZE, Vector3( 0.1f, 0.2f, 0.0f ) );
currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_EQUALS( currentSize, Vector3( 0.1f, 0.2f, 0.0f ), Math::MACHINE_EPSILON_0, TEST_LOCATION );
DALI_TEST_EQUALS( currentSize, Vector3( 0.1f, 0.2f, 0.0f ), Math::MACHINE_EPSILON_0, TEST_LOCATION );
// Set another new size after resize policy is changed and check the new size
- actor.SetSize( Vector3( 50.0f, 60.0f, 0.0f ) );
+ actor.SetProperty( Actor::Property::SIZE, Vector3( 50.0f, 60.0f, 0.0f ) );
currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_EQUALS( currentSize, Vector3( 50.0f, 60.0f, 0.0f ), Math::MACHINE_EPSILON_0, TEST_LOCATION );
END_TEST;
}
-// SetSize(float width, float height, float depth)
int UtcDaliActorSetSize02(void)
{
TestApplication application;
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
- actor.SetSize(vector.x, vector.y, vector.z);
+ actor.SetProperty( Actor::Property::SIZE, Vector3( vector.x, vector.y, vector.z ) );
// Immediately check the size after setting
Vector3 currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
- actor.SetSize(Vector2(vector.x, vector.y));
+ actor.SetProperty( Actor::Property::SIZE,Vector2(vector.x, vector.y));
// Immediately check the size after setting
Vector3 currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
- actor.SetSize(vector);
+ actor.SetProperty( Actor::Property::SIZE,vector);
// Immediately check the size after setting
Vector3 currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
Stage::GetCurrent().Add( actor );
- actor.SetSize( Vector3( 0.1f, 0.2f, 0.3f ) );
+ actor.SetProperty( Actor::Property::SIZE, Vector3( 0.1f, 0.2f, 0.3f ) );
// Immediately check the size after setting
currentSize = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
- actor.SetSize(vector);
+ actor.SetProperty( Actor::Property::SIZE,vector);
// flush the queue and render once
application.SendNotification();
DALI_TEST_CHECK(vector != actor.GetTargetSize());
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
- actor.SetSize(vector);
+ actor.SetProperty( Actor::Property::SIZE,vector);
DALI_TEST_CHECK(vector == actor.GetTargetSize());
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ));
Actor actor = Actor::New();
- actor.SetPosition(Vector3(2.0f, 2.0f, 16.0f));
- actor.SetSize(Vector3{ 1.0f, 1.0f, 1.0f });
+ actor.SetProperty( Actor::Property::POSITION, Vector3(2.0f, 2.0f, 16.0f));
+ actor.SetProperty( Actor::Property::SIZE,Vector3{ 1.0f, 1.0f, 1.0f });
application.SendNotification();
application.Render();
Actor actor = Actor::New();
// Set to random to start off with
- actor.SetPosition(Vector3(120.0f, 120.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(120.0f, 120.0f, 0.0f));
Vector3 vector(100.0f, 100.0f, 0.0f);
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
- actor.SetPosition(vector.x, vector.y);
+ actor.SetProperty( Actor::Property::POSITION, Vector2(vector.x, vector.y));
// flush the queue and render once
application.SendNotification();
application.Render();
DALI_TEST_CHECK(vector == actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
Stage::GetCurrent().Add( actor );
- actor.SetPosition( Vector3( 0.1f, 0.2f, 0.3f ) );
+ actor.SetProperty( Actor::Property::POSITION, 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.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
- actor.SetX( 1.0f );
- actor.SetY( 1.1f );
- actor.SetZ( 1.2f );
+ actor.SetProperty( Actor::Property::POSITION_X, 1.0f );
+ actor.SetProperty( Actor::Property::POSITION_Y, 1.1f );
+ actor.SetProperty( Actor::Property::POSITION_Z, 1.2f );
// flush the queue and render once
application.SendNotification();
application.Render();
Actor actor = Actor::New();
// Set to random to start off with
- actor.SetPosition(Vector3(120.0f, 120.0f, 120.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(120.0f, 120.0f, 120.0f));
Vector3 vector(100.0f, 100.0f, 100.0f);
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
- actor.SetPosition(vector.x, vector.y, vector.z);
+ actor.SetProperty( Actor::Property::POSITION, Vector3(vector.x, vector.y, vector.z));
// flush the queue and render once
application.SendNotification();
Actor actor = Actor::New();
// Set to random to start off with
- actor.SetPosition(Vector3(120.0f, 120.0f, 120.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(120.0f, 120.0f, 120.0f));
Vector3 vector(100.0f, 100.0f, 100.0f);
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
- actor.SetPosition(vector);
+ actor.SetProperty( Actor::Property::POSITION, vector);
// flush the queue and render once
application.SendNotification();
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
- actor.SetX(100.0f);
+ actor.SetProperty( Actor::Property::POSITION_X, 100.0f);
// flush the queue and render once
application.SendNotification();
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
- actor.SetY(100.0f);
+ actor.SetProperty( Actor::Property::POSITION_Y, 100.0f);
// flush the queue and render once
application.SendNotification();
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
- actor.SetZ(100.0f);
+ actor.SetProperty( Actor::Property::POSITION_Z, 100.0f);
// flush the queue and render once
application.SendNotification();
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ));
- actor.SetPosition(vector);
+ actor.SetProperty( Actor::Property::POSITION, vector);
// flush the queue and render once
application.SendNotification();
Actor actor = Actor::New();
Vector3 setVector(100.0f, 100.0f, 0.0f);
- actor.SetPosition(setVector);
+ actor.SetProperty( Actor::Property::POSITION, setVector);
// flush the queue and render once
application.SendNotification();
Actor parent = Actor::New();
Vector3 parentPosition( 1.0f, 2.0f, 3.0f );
- parent.SetPosition( parentPosition );
+ parent.SetProperty( Actor::Property::POSITION, parentPosition );
parent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
parent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Stage::GetCurrent().Add( parent );
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 );
+ child.SetProperty( Actor::Property::POSITION, childPosition );
parent.Add( child );
// The actors should not have a world position yet
Actor parent = Actor::New();
Vector3 parentPosition( 1.0f, 2.0f, 3.0f );
- parent.SetPosition( parentPosition );
+ parent.SetProperty( Actor::Property::POSITION, parentPosition );
parent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
parent.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Stage::GetCurrent().Add( parent );
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 );
+ child.SetProperty( Actor::Property::POSITION, childPosition );
parent.Add( child );
// The actors should not have a world position yet
//Change child position
Vector3 childOffset( -1.0f, 1.0f, 0.0f );
- child.SetPosition( childOffset );
+ child.SetProperty( Actor::Property::POSITION, childOffset );
// Use local position as world postion
child.SetProperty( Actor::Property::INHERIT_POSITION, false );
Actor actor = Actor::New();
// Set to random value first -.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) asserts if called before SetScale()
- actor.SetScale(0.25f);
+ actor.SetProperty( Actor::Property::SCALE,0.25f);
Vector3 scale(10.0f, 10.0f, 10.0f);
DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) != scale);
- actor.SetScale(scale.x);
+ actor.SetProperty( Actor::Property::SCALE,scale.x);
// flush the queue and render once
application.SendNotification();
Actor actor = Actor::New();
// Set to random value first -.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) asserts if called before SetScale()
- actor.SetScale(Vector3(12.0f, 1.0f, 2.0f));
+ actor.SetProperty( Actor::Property::SCALE, Vector3( 12.0f, 1.0f, 2.0f ) );
DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) != scale);
- actor.SetScale(scale.x, scale.y, scale.z);
+ actor.SetProperty( Actor::Property::SCALE, Vector3( scale.x, scale.y, scale.z ) );
// flush the queue and render once
application.SendNotification();
application.Render();
// add to stage and test
Stage::GetCurrent().Add( actor );
- actor.SetScale( 2.0f, 2.0f, 2.0f );
+ actor.SetProperty( Actor::Property::SCALE, Vector3( 2.0f, 2.0f, 2.0f ) );
// flush the queue and render once
application.SendNotification();
application.Render();
Actor actor = Actor::New();
// Set to random value first -.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) asserts if called before SetScale()
- actor.SetScale(Vector3(12.0f, 1.0f, 2.0f));
+ actor.SetProperty( Actor::Property::SCALE, Vector3(12.0f, 1.0f, 2.0f));
DALI_TEST_CHECK(actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ) != scale);
- actor.SetScale(scale);
+ actor.SetProperty( Actor::Property::SCALE,scale);
// flush the queue and render once
application.SendNotification();
DALI_TEST_CHECK(vector != actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ));
- actor.SetScale(vector);
+ actor.SetProperty( Actor::Property::SCALE,vector);
// flush the queue and render once
application.SendNotification();
Actor actor = Actor::New();
- actor.SetScale(scale);
+ actor.SetProperty( Actor::Property::SCALE,scale);
// flush the queue and render once
application.SendNotification();
Actor parent = Actor::New();
Vector3 parentScale( 1.0f, 2.0f, 3.0f );
- parent.SetScale( parentScale );
+ parent.SetProperty( Actor::Property::SCALE, parentScale );
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
Vector3 childScale( 2.0f, 2.0f, 2.0f );
- child.SetScale( childScale );
+ child.SetProperty( Actor::Property::SCALE, childScale );
parent.Add( child );
// The actors should not have a scale yet
Actor parent = Actor::New();
Vector3 parentScale( 1.0f, 2.0f, 3.0f );
- parent.SetScale( parentScale );
+ parent.SetProperty( Actor::Property::SCALE, parentScale );
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
Vector3 childScale( 2.0f, 2.0f, 2.0f );
- child.SetScale( childScale );
+ child.SetProperty( Actor::Property::SCALE, childScale );
parent.Add( child );
application.SendNotification();
TestApplication application;
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- actor.SetSize(100.0f, 100.0f);
- actor.SetPosition(10.0f, 10.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ actor.SetProperty( Actor::Property::POSITION, Vector2(10.0f, 10.0f));
Stage::GetCurrent().Add(actor);
// flush the queue and render once
unsigned int index = 0;
while( NULL != hitTestData[index] )
{
- actor.SetSize( 1.f, 1.f );
- actor.SetScale( hitTestData[index]->mScale.x, hitTestData[index]->mScale.y, hitTestData[index]->mScale.z );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 1.f, 1.f ) );
+ actor.SetProperty( Actor::Property::SCALE, Vector3( hitTestData[index]->mScale.x, hitTestData[index]->mScale.y, hitTestData[index]->mScale.z ) );
// flush the queue and render once
application.SendNotification();
Radian rotationAngle(Degree(85.0f));
Quaternion parentRotation(rotationAngle, Vector3::ZAXIS);
Vector3 parentScale( 1.0f, 2.0f, 3.0f );
- parent.SetPosition( parentPosition );
+ parent.SetProperty( Actor::Property::POSITION, parentPosition );
parent.SetProperty( Actor::Property::ORIENTATION, parentRotation );
- parent.SetScale( parentScale );
+ parent.SetProperty( Actor::Property::SCALE, parentScale );
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
Radian childRotationAngle(Degree(23.0f));
Quaternion childRotation( childRotationAngle, Vector3::YAXIS );
Vector3 childScale( 2.0f, 2.0f, 2.0f );
- child.SetPosition( childPosition );
+ child.SetProperty( Actor::Property::POSITION, childPosition );
child.SetProperty( Actor::Property::ORIENTATION, childRotation );
- child.SetScale( childScale );
+ child.SetProperty( Actor::Property::SCALE, childScale );
parent.Add( child );
app.SendNotification();
Radian rotationAngle(Degree(85.0f));
Quaternion parentRotation(rotationAngle, Vector3::ZAXIS);
Vector3 parentScale( 1.0f, 2.0f, 3.0f );
- parent.SetPosition( parentPosition );
+ parent.SetProperty( Actor::Property::POSITION, parentPosition );
parent.SetProperty( Actor::Property::ORIENTATION, parentRotation );
- parent.SetScale( parentScale );
+ parent.SetProperty( Actor::Property::SCALE, parentScale );
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
Radian rotationAngle(Degree(85.0f));
Quaternion parentRotation(rotationAngle, Vector3::ZAXIS);
Vector3 parentScale( 1.0f, 2.0f, 3.0f );
- parent.SetPosition( parentPosition );
+ parent.SetProperty( Actor::Property::POSITION, parentPosition );
parent.SetProperty( Actor::Property::ORIENTATION, parentRotation );
- parent.SetScale( parentScale );
+ parent.SetProperty( Actor::Property::SCALE, parentScale );
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
DALI_TEST_EQUALS( actor.GetRelayoutSize( Dimension::WIDTH ), 0.0f, TEST_LOCATION );
actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::WIDTH );
- actor.SetSize( Vector2( 1.0f, 0.0f ) );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 0.0f ) );
// Flush the queue and render once
app.SendNotification();
Stage::GetCurrent().Add( actor );
actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- actor.SetSize( Vector2( 1.0f, 2.0 ) );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 2.0 ) );
// Flush the queue and render once
application.SendNotification();
// Setup dimensions and position so actor is not skipped by culling.
actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- actor.SetSize( width, height );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( width, height ) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
// Setup dimensions and position so actor is not skipped by culling.
actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- actor.SetSize( 16.0f, 16.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 16.0f, 16.0f ) );
if( i == 0 )
{
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 );
- clippingActorB.SetPosition( 0.0f, 0.0f, 0.0f );
+ clippingActorA.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -200.0f, 0.0f ));
+ clippingActorB.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
Stage::GetCurrent().Add( clippingActorA );
Stage::GetCurrent().Add( clippingActorB );
{
// Position the child clipping actor so it intersects with the 1st clipping actor. This changes each loop.
const Vector2 position = ( imageSize / 2.0f ) * positionModifiers[test];
- clippingActorB.SetPosition( position.x, position.y );
+ clippingActorB.SetProperty( Actor::Property::POSITION, Vector2( position.x, position.y ));
// Gather the call trace.
GenerateTrace( application, enabledDisableTrace, scissorTrace );
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 );
- clippingActorC.SetPosition( 0.0f, 100.0f, 0.0f );
- clippingActorD.SetPosition( 0.0f, 0.0f, 0.0f );
- clippingActorE.SetPosition( 0.0f, 0.0f, 0.0f );
+ clippingActorA.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -200.0f, 0.0f ));
+ clippingActorB.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
+ clippingActorC.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 100.0f, 0.0f ));
+ clippingActorD.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
+ clippingActorE.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ));
Stage::GetCurrent().Add( clippingActorA );
clippingActorA.Add( clippingActorB );
actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Vector2 size2( 10.0f, 20.0f );
- actorA.SetSize( size2 );
+ actorA.SetProperty( Actor::Property::SIZE, size2 );
- actorA.SetPosition( 0.f, 0.f );
+ actorA.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f ));
tet_infoline( "UtcDaliActorGetScreenPosition Center Anchor Point and 0,0 position \n" );
tet_infoline( "UtcDaliActorGetScreenPosition Bottom right Anchor Point and 30,0 position \n" );
- actorA.SetPosition( 30.0, 0.0 );
+ actorA.SetProperty( Actor::Property::POSITION, Vector2( 30.0, 0.0 ));
application.SendNotification();
application.Render();
tet_infoline( "UtcDaliActorGetScreenPosition Bottom right Anchor Point and 30,420 position \n" );
- actorA.SetPosition( 30.0, 420.0 );
+ actorA.SetProperty( Actor::Property::POSITION, Vector2( 30.0, 420.0 ));
application.SendNotification();
application.Render();
tet_infoline( "UtcDaliActorGetScreenPosition Scale parent and check child's screen position \n" );
actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- actorA.SetPosition( 30.0, 30.0 );
+ actorA.SetProperty( Actor::Property::POSITION, Vector2( 30.0, 30.0 ));
Actor actorB = Actor::New();
actorB.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- actorB.SetSize( size2 );
- actorB.SetPosition( 10.f, 10.f );
+ actorB.SetProperty( Actor::Property::SIZE, size2 );
+ actorB.SetProperty( Actor::Property::POSITION, Vector2( 10.f, 10.f ));
actorA.Add( actorB );
- actorA.SetScale( 2.0f );
+ actorA.SetProperty( Actor::Property::SCALE, 2.0f );
application.SendNotification();
application.Render();
actorA.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Vector2 size2( 10.0f, 20.0f );
- actorA.SetSize( size2 );
- actorA.SetScale( 1.5f );
- actorA.SetPosition( 0.f, 0.f );
+ actorA.SetProperty( Actor::Property::SIZE, size2 );
+ actorA.SetProperty( Actor::Property::SCALE, 1.5f );
+ actorA.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f ));
tet_infoline( "UtcDaliActorGetScreenPositionAfterScaling TopRight Anchor Point, scale 1.5f and 0,0 position \n" );
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 );
+ actorA.SetProperty( Actor::Property::SIZE, size2 );
+ actorA.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f ));
tet_infoline( " TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" );
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 );
+ actorA.SetProperty( Actor::Property::SIZE, size1 );
+ actorA.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f ));
tet_infoline( "Create Parent Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" );
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 );
+ parentActorA.SetProperty( Actor::Property::SIZE, size2 );
+ parentActorA.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f ));
tet_infoline( "Add child 1 to Parent 1 and check screen position \n" );
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 );
+ actorA.SetProperty( Actor::Property::SIZE, size1 );
+ actorA.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f ));
tet_infoline( "Create Parent Actor 1 TOP_LEFT Anchor Point, ParentOrigin::CENTER and 0,0 position \n" );
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 );
+ parentActorA.SetProperty( Actor::Property::SIZE, size2 );
+ parentActorA.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f ));
tet_infoline( "Create Grand Parent Actor 1 BOTTOM_LEFT Anchor Point, ParentOrigin::BOTTOM_LEFT and 0,0 position \n" );
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 );
+ grandParentActorA.SetProperty( Actor::Property::SIZE, size3 );
+ grandParentActorA.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f ));
tet_infoline( "Add Parent 1 to Grand Parent 1 \n" );
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 );
+ actorA.SetProperty( Actor::Property::SIZE, Vector2( 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" );
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 );
+ actorB.SetProperty( Actor::Property::SIZE, actorBSize );
stage.Add( actorB );
tet_infoline( "Create an actor with AnchorPoint::CENTER, ParentOrigin::CENTER and 0,0 position, POSITION_USES_ANCHOR false" );
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 );
+ actorC.SetProperty( Actor::Property::SIZE, actorCSize );
stage.Add( actorC );
application.SendNotification();
tet_infoline( "Add scale to all actors" );
- actorA.SetScale( 2.0f );
- actorB.SetScale( 2.0f );
- actorC.SetScale( 2.0f );
+ actorA.SetProperty( Actor::Property::SCALE, 2.0f );
+ actorB.SetProperty( Actor::Property::SCALE, 2.0f );
+ actorC.SetProperty( Actor::Property::SCALE, 2.0f );
application.SendNotification();
application.Render();
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
Actor actor = Actor::New();
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( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ actor.SetProperty( Actor::Property::SCALE, 2.0f );
actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false );
Stage::GetCurrent().Add( actor );
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Degree( 90.0f), Vector3::ZAXIS ) );
actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false );
Stage::GetCurrent().Add( actor );
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Degree( 90.0f), Vector3::ZAXIS ) );
- actor.SetScale( 2.0f );
+ actor.SetProperty( Actor::Property::SCALE, 2.0f );
actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false );
Stage::GetCurrent().Add( actor );
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::INHERIT_SCALE, false );
actor.SetProperty( Actor::Property::INHERIT_ORIENTATION, false );
actor.SetProperty( DevelActor::Property::POSITION_USES_ANCHOR_POINT, false );
tet_infoline( "Check that the actor is culled if the actor is out of the screen" );
Actor actor = Actor::New();
- actor.SetSize( 10.0f, 10.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 10.0f, 10.0f ) );
Geometry geometry = CreateQuadGeometry();
Shader shader = CreateShader();
CulledPropertyNotificationFunctor f( propertyNotificationSignal, source );
notification.NotifySignal().Connect( &application, f ) ;
- actor.SetPosition( 1000.0f, 1000.0f );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 1000.0f, 1000.0f ));
application.SendNotification();
application.Render();
tet_infoline( "Ensure we clear the screen when the last actor is removed" );
Actor actor = CreateRenderableActor();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
stage.Add( actor );
application.SendNotification();
tet_infoline( "Ensure we clear the screen when the last actor is made invisible" );
Actor actor = CreateRenderableActor();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
stage.Add( actor );
application.SendNotification();
Vector3 actorSize( 100.0f, 100.0f, 0.0f );
Actor actor = Actor::New();
- actor.SetSize( actorSize );
+ actor.SetProperty( Actor::Property::SIZE, actorSize );
actor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
Stage::GetCurrent().Add( actor );
// Set size again
actorSize = Vector3( 200.0f, 200.0f, 0.0f );
- actor.SetSize( actorSize );
+ actor.SetProperty( Actor::Property::SIZE, actorSize );
size = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_EQUALS( size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION );
// Set size again
actorSize = Vector3( 300.0f, 300.0f, 0.0f );
- actor.SetSize( actorSize );
+ actor.SetProperty( Actor::Property::SIZE, actorSize );
size = actor.GetProperty( Actor::Property::SIZE ).Get< Vector3 >();
DALI_TEST_EQUALS( size, actorSize, Math::MACHINE_EPSILON_0, TEST_LOCATION );
// Restart the animation, with a different duration
finishCheck.Reset();
- actor.SetPosition(Vector3::ZERO);
+ actor.SetProperty( Actor::Property::POSITION, Vector3::ZERO );
durationSeconds = 3.5f;
animation.SetDuration(durationSeconds);
DALI_TEST_EQUALS(animation.GetDuration(), durationSeconds, TEST_LOCATION);
DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
// Go back to the start
- actor.SetPosition(Vector3::ZERO);
+ actor.SetProperty( Actor::Property::POSITION, Vector3::ZERO );
application.SendNotification();
application.Render(0);
DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
DALI_TEST_EQUALS( targetPosition, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
// Go back to the start
- actor.SetPosition(Vector3::ZERO);
+ actor.SetProperty( Actor::Property::POSITION, Vector3::ZERO );
application.SendNotification();
application.Render(0);
DALI_TEST_EQUALS( Vector3::ZERO, actor.GetCurrentProperty< Vector3 >( Actor::Property::POSITION ), TEST_LOCATION );
for( unsigned int actorIndex = 0; actorIndex < NUM_ENTRIES; ++actorIndex )
{
Actor actor = Actor::New();
- actor.SetPosition( Vector3( testData[actorIndex].startX, 0, 0 ) );
+ actor.SetProperty( Actor::Property::POSITION, Vector3( testData[actorIndex].startX, 0, 0 ) );
actors.push_back(actor);
Stage::GetCurrent().Add(actor);
std::vector<Dali::Actor> actors;
Actor actor = Actor::New();
- actor.SetPosition( Vector3( testData.startX, 0, 0 ) );
+ actor.SetProperty( Actor::Property::POSITION, Vector3( testData.startX, 0, 0 ) );
actors.push_back(actor);
Stage::GetCurrent().Add(actor);
std::vector<Dali::Actor> actors;
Actor actor = Actor::New();
- actor.SetPosition( Vector3( testData.startX, 0, 0 ) );
+ actor.SetProperty( Actor::Property::POSITION, Vector3( testData.startX, 0, 0 ) );
actors.push_back(actor);
Stage::GetCurrent().Add(actor);
// Stop the animation
animation.Stop();
Vector3 positionSet(2.0f, 3.0f, 4.0f);
- actor.SetPosition(positionSet);
+ actor.SetProperty( Actor::Property::POSITION, positionSet );
application.SendNotification();
// Loop 5 times
// Restart as a scale animation; this should not move the actor's position
finishCheck.Reset();
- actor.SetPosition(Vector3::ZERO);
+ actor.SetProperty( Actor::Property::POSITION, Vector3::ZERO );
Vector3 targetScale(3.0f, 3.0f, 3.0f);
animation.AnimateTo( Property( actor, Actor::Property::SCALE ), targetScale, AlphaFunction::LINEAR );
animation.Play();
Actor actor = Actor::New();
Vector3 startPosition(10.0f, 10.0f, 10.0f);
- actor.SetPosition(startPosition);
+ actor.SetProperty( Actor::Property::POSITION, startPosition );
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
Actor actor = Actor::New();
Vector3 startPosition(10.0f, 10.0f, 10.0f);
- actor.SetPosition(startPosition);
+ actor.SetProperty( Actor::Property::POSITION, startPosition );
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
Actor actor = Actor::New();
Vector3 startPosition(10.0f, 10.0f, 10.0f);
- actor.SetPosition(startPosition);
+ actor.SetProperty( Actor::Property::POSITION, startPosition );
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
Actor actor = Actor::New();
Vector3 startPosition(10.0f, 10.0f, 10.0f);
- actor.SetPosition(startPosition);
+ actor.SetProperty( Actor::Property::POSITION, startPosition );
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
// Reset everything
finishCheck.Reset();
- actor.SetScale(Vector3::ONE);
+ actor.SetProperty( Actor::Property::SCALE,Vector3::ONE);
application.SendNotification();
application.Render(0);
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
- actor.SetScale(Vector3::ONE);
+ actor.SetProperty( Actor::Property::SCALE,Vector3::ONE);
application.SendNotification();
application.Render(0);
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
- actor.SetSize(Vector3::ZERO);
+ actor.SetProperty( Actor::Property::SIZE,Vector3::ZERO);
application.SendNotification();
application.Render(0);
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
- actor.SetSize(Vector3::ZERO);
+ actor.SetProperty( Actor::Property::SIZE,Vector3::ZERO);
application.SendNotification();
application.Render(0);
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
- actor.SetSize(Vector3::ZERO);
+ actor.SetProperty( Actor::Property::SIZE,Vector3::ZERO);
application.SendNotification();
application.Render(0);
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
- actor.SetSize(Vector3::ZERO);
+ actor.SetProperty( Actor::Property::SIZE,Vector3::ZERO);
application.SendNotification();
application.Render(0);
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ), Vector3::ZERO, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
- actor.SetScale(Vector3::ONE);
+ actor.SetProperty( Actor::Property::SCALE,Vector3::ONE);
application.SendNotification();
application.Render(0);
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
// Reset everything
finishCheck.Reset();
- actor.SetScale(Vector3::ONE);
+ actor.SetProperty( Actor::Property::SCALE,Vector3::ONE);
application.SendNotification();
application.Render(0);
DALI_TEST_EQUALS( actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ), Vector3::ONE, TEST_LOCATION );
tet_infoline( "Same animation again but in a different order - should yield the same result" );
- actor.SetX( 0.0f );
+ actor.SetProperty( Actor::Property::POSITION_X, 0.0f );
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 );
tet_infoline( "Same animation again but in a different order - should end up at the same point" );
- actor.SetX( 0.0f );
+ actor.SetProperty( Actor::Property::POSITION_X, 0.0f );
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 );
TestApplication application;
auto actor = Actor::New();
- actor.SetPosition( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
Stage::GetCurrent().Add( actor );
auto animation = Animation::New( 1.0f );
TestApplication application;
auto actor = Actor::New();
- actor.SetPosition( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
Stage::GetCurrent().Add( actor );
auto animation = Animation::New( 1.0f );
Actor actor = Actor::New();
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 );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 240, 400 ));
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
Stage::GetCurrent().Add( actor );
BufferImage image = CreateBufferImage();
Actor actor = CreateRenderableActor(image);
- actor.SetSize( 100.0f, 100.0f );
- actor.SetPosition( 20.0f, 30.0f, 40.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ actor.SetProperty( Actor::Property::POSITION, Vector3( 20.0f, 30.0f, 40.0f ));
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( actor );
application.SendNotification();
Image image = CreateBufferImage();
Actor actor = CreateRenderableActor( image, RENDER_SHADOW_VERTEX_SOURCE, RENDER_SHADOW_FRAGMENT_SOURCE );
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
Stage::GetCurrent().Add( actor );
Matrix projectionMatrix;
CameraActor camera = Stage::GetCurrent().GetRenderTaskList().GetTask( 0u ).GetCameraActor();
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
Stage::GetCurrent().Add( actor );
Constraint constraint = Constraint::New<Dali::Vector3>( actor, Actor::Property::POSITION, EqualToConstraint() );
constraint.AddSource( Source( camera, Actor::Property::POSITION ) );
constraint.Apply();
- camera.SetPosition( 100.0f, 200.0f, 300.0f );
+ camera.SetProperty( Actor::Property::POSITION, Vector3( 100.0f, 200.0f, 300.0f ));
application.SendNotification();
application.Render();
Vector3 targetPosition( 30.0f, 240.0f, -256.0f );
Actor target = Actor::New();
target.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- target.SetPosition( targetPosition );
+ target.SetProperty( Actor::Property::POSITION, targetPosition );
Constraint cameraOrientationConstraint = Constraint::New<Quaternion> ( freeLookCameraActor, Actor::Property::ORIENTATION, &LookAt );
cameraOrientationConstraint.AddSource( Source( target, Actor::Property::WORLD_POSITION ) );
position.Normalize();
position *= 200.0f;
- freeLookCameraActor.SetPosition( position );
- lookAtCameraActor.SetPosition( position );
+ freeLookCameraActor.SetProperty( Actor::Property::POSITION, position );
+ lookAtCameraActor.SetProperty( Actor::Property::POSITION, position );
application.SendNotification();
application.Render();
Vector3 targetPosition( 30.0f, 240.0f, -256.0f );
Actor target = Actor::New();
target.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- target.SetPosition( targetPosition );
+ target.SetProperty( Actor::Property::POSITION, targetPosition );
Constraint cameraOrientationConstraint = Constraint::New<Quaternion> ( freeLookCameraActor, Actor::Property::ORIENTATION, &LookAt );
cameraOrientationConstraint.AddSource( Source( target, Actor::Property::WORLD_POSITION ) );
position.Normalize();
position *= 200.0f;
- freeLookCameraActor.SetPosition( position );
- lookAtCameraActor.SetPosition( position );
+ freeLookCameraActor.SetProperty( Actor::Property::POSITION, position );
+ lookAtCameraActor.SetProperty( Actor::Property::POSITION, position );
application.SendNotification();
application.Render();
freeLookCameraActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Quaternion cameraOrientation( Radian( Degree( 180.0f ) ), Vector3::YAXIS );
- freeLookCameraActor.SetPosition( cameraOffset );
+ freeLookCameraActor.SetProperty( Actor::Property::POSITION, cameraOffset );
freeLookCameraActor.SetProperty( Actor::Property::ORIENTATION, cameraOrientation );
Actor cameraAnchor = Actor::New();
{
Quaternion rotation( Radian( Degree( angle ) ), Vector3::YAXIS );
- freeLookCameraActor.SetPosition( rotation.Rotate( cameraOffset ) );
+ freeLookCameraActor.SetProperty( Actor::Property::POSITION, rotation.Rotate( cameraOffset ) );
cameraAnchor.SetProperty( Actor::Property::ORIENTATION, rotation );
application.SendNotification();
CameraActor freeLookCameraActor = stage.GetRenderTaskList().GetTask(0).GetCameraActor();
freeLookCameraActor.SetType(Camera::LOOK_AT_TARGET);
freeLookCameraActor.SetTargetPosition( targetPosition );
- freeLookCameraActor.SetPosition(cameraOffset);
+ freeLookCameraActor.SetProperty( Actor::Property::POSITION, cameraOffset );
- stage.GetRootLayer().SetPosition( 1, 0 );
+ stage.GetRootLayer().SetProperty( Actor::Property::POSITION, Vector2( 1, 0 ));
application.SendNotification();
application.Render();
Matrix matrixBefore, matrixAfter;
freeLookCameraActor.GetProperty( CameraActor::CameraActor::Property::VIEW_MATRIX ).Get( matrixBefore );
freeLookCameraActor.SetProperty( Dali::DevelCameraActor::Property::REFLECTION_PLANE, Vector4( 0.0f, 1.0f, 0.0f, 0.0f));
- stage.GetRootLayer().SetPosition( 0, 0 );
+ stage.GetRootLayer().SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
application.SendNotification();
application.Render();
application.SendNotification();
calledCount = 0;
// Change the position of both actors
- actor.SetPosition( 100.0f, 100.0f );
- clone.SetPosition( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
+ clone.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
application.SendNotification();
application.Render();
count = 0;
// Change the position property, apply again
- actor.SetPosition( 10.0f, 10.0f );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 10.0f, 10.0f ));
constraint.Apply();
application.SendNotification();
{
BufferImage image = BufferImage::New(4,4,Pixel::RGBA8888);
Actor actor = CreateRenderableActor( image );
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::NAME,"Test Image Rendering Actor");
return actor;
}
Test::TestCustomActor custom = Test::TestCustomActor::New();
DALI_TEST_EQUALS( 0, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
- custom.SetSize( Vector2( 9.0f, 10.0f ) );
- DALI_TEST_EQUALS( 1, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
+ custom.SetProperty( Actor::Property::SIZE, Vector2( 9.0f, 10.0f ) );
+ DALI_TEST_EQUALS( 2, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
DALI_TEST_EQUALS( "OnSizeSet", custom.GetMethodsCalled()[ 0 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", custom.GetMethodsCalled()[ 1 ], TEST_LOCATION );
DALI_TEST_EQUALS( 9.0f, custom.GetSize().width, TEST_LOCATION );
DALI_TEST_EQUALS( 10.0f, custom.GetSize().height, TEST_LOCATION );
- custom.SetSize( Vector3( 4.0f, 5.0f, 6.0f ) );
- DALI_TEST_EQUALS( 2, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnSizeSet", custom.GetMethodsCalled()[ 1 ], TEST_LOCATION );
+ custom.SetProperty( Actor::Property::SIZE, Vector3( 4.0f, 5.0f, 6.0f ) );
+ DALI_TEST_EQUALS( 4, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnSizeSet", custom.GetMethodsCalled()[ 2 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnPropertySet", custom.GetMethodsCalled()[ 3 ], TEST_LOCATION );
DALI_TEST_EQUALS( 4.0f, custom.GetSize().width, TEST_LOCATION );
DALI_TEST_EQUALS( 5.0f, custom.GetSize().height, TEST_LOCATION );
DALI_TEST_EQUALS( 6.0f, custom.GetSize().depth, TEST_LOCATION );
float intialWidth( 10.0f );
DALI_TEST_EQUALS( 0, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
- custom.SetSize( intialWidth, 10.0f); // First method
+ custom.SetProperty( Actor::Property::SIZE, Vector2( intialWidth, 10.0f) ); // First method
Animation anim = Animation::New( 1.0f );
- DALI_TEST_EQUALS( 1, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( 2, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
anim.AnimateTo( Property( custom, Actor::Property::SIZE_WIDTH ), 20.0f );
- DALI_TEST_EQUALS( 1, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( 2, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
anim.Play(); // Triggers second method ( OnSizeAnimation )
application.SendNotification();
application.Render( static_cast<unsigned int>( 1000.0f ) );
- DALI_TEST_EQUALS( 2, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
+ DALI_TEST_EQUALS( 3, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
- DALI_TEST_EQUALS( "OnSizeAnimation", custom.GetMethodsCalled()[ 1 ], TEST_LOCATION );
+ DALI_TEST_EQUALS( "OnSizeAnimation", custom.GetMethodsCalled()[ 2 ], TEST_LOCATION );
END_TEST;
DALI_TEST_EQUALS( 0, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
// set size for custom actor
- custom.SetSize( 100, 100 );
+ custom.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
// add the custom actor to stage
Stage::GetCurrent().Add( custom );
custom.ResetCallStack();
DALI_TEST_EQUALS( 0, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
// set size for custom actor
- custom.SetSize( 100, 100 );
+ custom.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
// add the custom actor to stage
Stage::GetCurrent().Add( custom );
custom.ResetCallStack();
DALI_TEST_EQUALS( 0, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
// set size for custom actor
- custom.SetSize( 100, 100 );
+ custom.SetProperty( Actor::Property::SIZE, Vector2( 100, 100 ) );
// add the custom actor to stage
Stage::GetCurrent().Add( custom );
custom.ResetCallStack();
Actor child = Actor::New();
child.SetResizePolicy(Dali::ResizePolicy::FIXED, Dali::Dimension::ALL_DIMENSIONS);
- child.SetSize(150, 150);
+ child.SetProperty( Actor::Property::SIZE, Vector2( 150, 150 ) );
application.SendNotification();
application.Render();
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- actor.SetSize( actorSize );
+ actor.SetProperty( Actor::Property::SIZE, actorSize );
actor.SetProperty( Actor::Property::COLOR, color );
- actor.SetPosition( position );
- actor.SetScale( scale );
+ actor.SetProperty( Actor::Property::POSITION, position );
+ actor.SetProperty( Actor::Property::SCALE, scale );
Stage stage = Stage::GetCurrent();
stage.Add( actor );
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- actor.SetSize( actorSize );
+ actor.SetProperty( Actor::Property::SIZE, actorSize );
Stage stage = Stage::GetCurrent();
stage.Add( actor );
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- actor.SetSize( actorSize );
+ actor.SetProperty( Actor::Property::SIZE, actorSize );
Stage stage = Stage::GetCurrent();
stage.Add( actor );
Actor actorA = Actor::New();
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'] );
+ actorA.SetProperty( Actor::Property::SIZE, sizes['A'] );
+ actorA.SetProperty( Actor::Property::POSITION, positions['A'] );
stage.Add( actorA );
Actor actorB = Actor::New();
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'] );
+ actorB.SetProperty( Actor::Property::SIZE, sizes['B'] );
+ actorB.SetProperty( Actor::Property::POSITION, positions['B'] );
actorA.Add( actorB );
Actor actorC = Actor::New();
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'] );
+ actorC.SetProperty( Actor::Property::SIZE, sizes['C'] );
+ actorC.SetProperty( Actor::Property::POSITION, positions['C'] );
actorB.Add( actorC );
Actor actorD = Actor::New();
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'] );
+ actorD.SetProperty( Actor::Property::SIZE, sizes['D'] );
+ actorD.SetProperty( Actor::Property::POSITION, positions['D'] );
actorA.Add( actorD );
Actor actorE = Actor::New();
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'] );
+ actorE.SetProperty( Actor::Property::SIZE, sizes['E'] );
+ actorE.SetProperty( Actor::Property::POSITION, positions['E'] );
stage.Add( actorE );
Actor actorF = Actor::New();
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'] );
+ actorF.SetProperty( Actor::Property::SIZE, sizes['F'] );
+ actorF.SetProperty( Actor::Property::POSITION, positions['F'] );
actorE.Add( actorF );
Actor actorG = Actor::New();
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'] );
+ actorG.SetProperty( Actor::Property::SIZE, sizes['G'] );
+ actorG.SetProperty( Actor::Property::POSITION, positions['G'] );
actorE.Add( actorG );
Actor actorH = Actor::New();
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'] );
+ actorH.SetProperty( Actor::Property::SIZE, sizes['H'] );
+ actorH.SetProperty( Actor::Property::POSITION, positions['H'] );
actorG.Add( actorH );
std::map< char, unsigned int > actorIds;
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- actor.SetSize( 200, 300 );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200, 300 ) );
Stage stage = Stage::GetCurrent();
FrameCallbackOneActor frameCallback( actor.GetId() );
Shader shader = CreateShader();
Renderer renderer = Renderer::New(geometry, shader);
Actor actor = Actor::New();
- actor.SetSize(Vector3::ONE * 100.f);
+ actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
actor.AddRenderer(renderer);
Stage::GetCurrent().Add(actor);
Shader shader = CreateShader();
Renderer renderer = Renderer::New(geometry, shader);
Actor actor = Actor::New();
- actor.SetSize(Vector3::ONE * 100.f);
+ actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
actor.AddRenderer(renderer);
Stage::GetCurrent().Add(actor);
Shader shader = CreateShader();
Renderer renderer = Renderer::New(geometry, shader);
Actor actor = Actor::New();
- actor.SetSize(Vector3::ONE * 100.f);
+ actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
actor.AddRenderer(renderer);
Stage::GetCurrent().Add(actor);
Shader shader = CreateShader();
Renderer renderer = Renderer::New(geometry, shader);
Actor actor = Actor::New();
- actor.SetSize(Vector3::ONE * 100.f);
+ actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
actor.AddRenderer(renderer);
Stage::GetCurrent().Add(actor);
Shader shader = CreateShader();
Renderer renderer = Renderer::New(geometry, shader);
Actor actor = Actor::New();
- actor.SetSize(Vector3::ONE * 100.f);
+ actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
actor.AddRenderer(renderer);
Stage::GetCurrent().Add(actor);
Stage stage = Stage::GetCurrent();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor.SetProperty( Actor::Property::NAME,"NonHittableActor");
stage.Add(actor);
Vector2 stageSize ( stage.GetSize() );
cameraActor.SetOrthographicProjection( stageSize );
- cameraActor.SetPosition(0.0f, 0.0f, 1600.0f);
+ cameraActor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 1600.0f));
Vector2 actorSize( stageSize * 0.5f );
// Create two actors with half the size of the stage and set them to be partially overlapping
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);
+ blue.SetProperty( Actor::Property::SIZE, actorSize );
+ blue.SetProperty( Actor::Property::POSITION_Z, 30.0f);
Actor green = Actor::New( );
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 );
+ green.SetProperty( Actor::Property::SIZE, actorSize );
// Add the actors to the view
stage.Add( blue );
cameraActor.SetOrthographicProjection(-stageSize.x * 0.3f, stageSize.x * 0.7f,
stageSize.y * 0.3f, -stageSize.y * 0.7f,
800.0f, 4895.0f);
- cameraActor.SetPosition(0.0f, 0.0f, 1600.0f);
+ cameraActor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 1600.0f));
Vector2 actorSize( stageSize * 0.5f );
// Create two actors with half the size of the stage and set them to be partially overlapping
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);
+ blue.SetProperty( Actor::Property::SIZE, actorSize );
+ blue.SetProperty( Actor::Property::POSITION_Z, 30.0f);
Actor green = Actor::New( );
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 );
+ green.SetProperty( Actor::Property::SIZE, actorSize );
// Add the actors to the view
stage.Add( blue );
Actor clippingActor = CreateRenderableActor( Dali::BufferImage::WHITE() );
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::SIZE, Vector2( 50.0f, 50.0f ) );
clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
childActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
childActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
childActor.SetProperty( Actor::Property::NAME, "childActor" );
Vector2 stageSize ( stage.GetSize() );
cameraActor.SetOrthographicProjection( stageSize );
- cameraActor.SetPosition(0.0f, 0.0f, 1600.0f);
+ cameraActor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 1600.0f));
Vector2 actorSize( stageSize * 0.5f );
// Create two actors with half the size of the stage and set them to be partially overlapping
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);
+ blue.SetProperty( Actor::Property::SIZE, actorSize );
+ blue.SetProperty( Actor::Property::POSITION_Z, 30.0f);
Actor green = Actor::New( );
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 );
+ green.SetProperty( Actor::Property::SIZE, actorSize );
// Add the actors to the view
stage.Add( blue );
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Vector2 stageSize = stage.GetSize();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
stage.Add(actor);
data.Reset();
// Emit a started signal where actor is just at the camera's near plane
- actor.SetZ(distance - nearPlane);
+ actor.SetProperty( Actor::Property::POSITION_Z, distance - nearPlane);
// Render and notify
application.SendNotification();
data.Reset();
// Emit a started signal where actor is closer than the camera's near plane
- actor.SetZ((distance - nearPlane) + 1.0f);
+ actor.SetProperty( Actor::Property::POSITION_Z, (distance - nearPlane) + 1.0f);
// Render and notify
application.SendNotification();
data.Reset();
// Emit a started signal where actor is just at the camera's far plane
- actor.SetZ(distance - farPlane);
+ actor.SetProperty( Actor::Property::POSITION_Z, distance - farPlane);
// Render and notify
application.SendNotification();
data.Reset();
// Emit a started signal where actor is further than the camera's far plane
- actor.SetZ((distance - farPlane) - 1.0f);
+ actor.SetProperty( Actor::Property::POSITION_Z, (distance - farPlane) - 1.0f);
// Render and notify
application.SendNotification();
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
HoverEventFunctor functor( data );
Layer layer1 ( Layer::New() );
- layer1.SetSize(100.0f, 100.0f);
+ layer1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer1 );
Actor actor1 ( Actor::New() );
- actor1.SetSize( 100.0f, 100.0f );
+ actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- actor1.SetZ( 1.0f ); // Should hit actor1 in this layer
+ actor1.SetProperty( Actor::Property::POSITION_Z, 1.0f ); // Should hit actor1 in this layer
layer1.Add( actor1 );
// Render and notify
// Add another layer
Layer layer2 ( Layer::New() );
- layer2.SetSize(100.0f, 100.0f );
+ layer2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- layer2.SetZ( 10.0f ); // Should hit layer2 in this layer rather than actor2
+ layer2.SetProperty( Actor::Property::POSITION_Z, 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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
layer2.Add( actor2 );
Vector2 stageSize ( stage.GetSize() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
Vector2 stageSize ( stage.GetSize() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
Layer layer = Layer::New();
- layer.SetSize(100.0f, 100.0f);
+ layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor.Add(layer);
// Create a renderable actor to display the FrameBufferImage
Actor renderableActor = CreateRenderableActor( frameBufferImage );
renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- renderableActor.SetSize( stageSize.x, stageSize.y );
+ renderableActor.SetProperty( Actor::Property::SIZE, Vector2( 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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add( actor );
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects
Vector2 stageSize ( stage.GetSize() );
Actor parent = CreateRenderableActor();
- parent.SetSize( 100.0f, 100.0f );
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(parent);
Actor actor = CreateRenderableActor();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Stage stage = Stage::GetCurrent();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
Stage stage = Stage::GetCurrent();
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
stage.Add( actor );
Actor clippingActor = Actor::New();
- clippingActor.SetSize( 50.0f, 50.0f );
+ clippingActor.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
stage.Add( clippingActor );
// Add a child to the clipped region.
Actor clippingChild = Actor::New();
- clippingChild.SetSize( 50.0f, 50.0f );
- clippingChild.SetPosition( 25.0f, 25.0f );
+ clippingChild.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
+ clippingChild.SetProperty( Actor::Property::POSITION, Vector2( 25.0f, 25.0f ));
clippingChild.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
clippingActor.Add( clippingChild );
// create two transparent actors so there is something to sort
Actor actor = CreateRenderableActor( img );
Actor actor2 = CreateRenderableActor( img );
- actor.SetSize(1,1);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 1, 1 ) );
actor.SetProperty( Actor::Property::COLOR, Vector4(1, 1, 1, 0.5f ) ); // 50% transparent
- actor2.SetSize(1,1);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2( 1, 1 ) );
actor2.SetProperty( Actor::Property::COLOR, Vector4(1, 1, 1, 0.5f ) ); // 50% transparent
// add to stage
// 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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Actor lifetime is scoped
{
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Dali::Degree(90.0f), Vector3::ZAXIS ) );
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
// Change rotation of child to be different from parent so that we can check if our local coordinate
// conversion of the parent actor is correct.
Actor child = Actor::New();
- child.SetSize(100.0f, 100.0f);
+ child.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
child.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
TestApplication application;
Actor first = Actor::New();
- first.SetSize(100.0f, 100.0f);
+ first.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ second.SetProperty( Actor::Property::POSITION_X, 100.0f);
second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(second);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
// Move actor somewhere else
- actor.SetPosition( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
// Render and notify
application.SendNotification();
DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
// Move actor in to the long press position.
- actor.SetPosition( 0.0f, 0.0f );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
// Render and notify
application.SendNotification();
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ dummyActor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummyActor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a layer to overlap the actor
Layer layer = Layer::New();
- layer.SetSize(100.0f, 100.0f);
+ layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
Integration::SetLongPressMinimumHoldingTime( kMinumumHolding1 );
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( actor );
LongPressGestureDetector detector = LongPressGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
LongPressGestureDetector detector = LongPressGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
LongPressGestureDetector detector = LongPressGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
detector.SetTouchesRequired(2,2);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
LongPressGestureDetector detector = LongPressGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
detector.SetTouchesRequired(2,2);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
detector.SetTouchesRequired(2,2);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor actor2 = Actor::New();
- actor2.SetSize(100.0f, 100.0f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- actor2.SetX(100.0f);
+ actor2.SetProperty( Actor::Property::POSITION_X, 100.0f);
Stage::GetCurrent().Add(actor2);
// Render and notify
drawTrace.Reset();
nativeImageInterface->SetGlExtensionCreateResult( true );
- actor.SetPosition( 0, 0, 1 );
+ actor.SetProperty( Actor::Property::POSITION, Vector3( 0, 0, 1 ));
application.SendNotification();
application.Render();
// 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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
detector.Attach(actor);
// Attach an actor and change the minimum touches
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Attach an actor and change the maximum touches
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Attach a temporary actor to stop detector being removed from PanGestureProcessor when main actor
// is destroyed.
Actor tempActor = Actor::New();
- tempActor.SetSize(100.0f, 100.0f);
+ tempActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
Stage::GetCurrent().Add(tempActor);
detector.Attach(tempActor);
// Actor lifetime is scoped
{
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
// Change rotation of child to be different from parent so that we can check if our local coordinate
// conversion of the parent actor is correct.
Actor child = Actor::New();
- child.SetSize(100.0f, 100.0f);
+ child.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
child.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
TestApplication application;
Actor first = Actor::New();
- first.SetSize(100.0f, 100.0f);
+ first.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ second.SetProperty( Actor::Property::POSITION_X, 100.0f);
second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(second);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor actor2 = Actor::New();
- actor2.SetSize(100.0f, 100.0f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
Stage::GetCurrent().Add(actor2);
TestApplication application;
Actor actor1 = Actor::New();
- actor1.SetSize(100.0f, 100.0f);
+ actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor1);
SignalData data1;
detector1.DetectedSignal().Connect(&application, functor1);
Actor actor2 = Actor::New();
- actor2.SetSize(100.0f, 100.0f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT);
Stage::GetCurrent().Add(actor2);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( parent );
Actor child = Actor::New();
- child.SetSize(100.0f, 100.0f);
+ child.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
parent.Add( child );
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
// Move actor somewhere else
- actor.SetPosition( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
// Render and notify
application.SendNotification();
DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
// Move actor in to the long press position.
- actor.SetPosition( 0.0f, 0.0f );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
// Render and notify
application.SendNotification();
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ dummyActor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummyActor);
TestApplication application;
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor child = Actor::New();
- child.SetSize(100.0f, 100.0f);
+ child.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(child);
TestApplication application;
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor child = Actor::New();
- child.SetSize(100.0f, 100.0f);
+ child.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(child);
Integration::SetPanGestureSmoothingMode(0);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Integration::SetPanGestureSmoothingMode(1);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Integration::SetPanGestureSmoothingMode(0);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Integration::SetPanGestureSmoothingMode(1);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Integration::SetPanGestureSmoothingAmount( 0.25f );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Integration::SetPanGestureMultitapSmoothingRange( 34 );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Integration::EnableProfiling( Integration::PROFILING_TYPE_PAN_GESTURE );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Integration::SetPanGestureMultitapSmoothingRange( 34 );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Integration::SetPanGestureSmoothingMode(0);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Integration::SetPanGesturePredictionMode(0);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a layer to overlap the actor
Layer layer = Layer::New();
- layer.SetSize(100.0f, 100.0f);
+ layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PanGestureDetector detector = PanGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PanGestureDetector detector = PanGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PanGestureDetector detector = PanGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PanGestureDetector detector = PanGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PanGestureDetector detector = PanGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PanGestureDetector detector = PanGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
detector.SetMinimumTouchesRequired(2);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
detector.SetMinimumTouchesRequired(2);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
detector.SetMinimumTouchesRequired(2);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
detector.SetMinimumTouchesRequired(2);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
detector.SetMinimumTouchesRequired(2);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
detector.SetMinimumTouchesRequired(2);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PanGestureDetector detector = PanGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PanGestureDetector detector = PanGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PanGestureDetector detector = PanGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PanGestureDetector detector = PanGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Attach a temporary actor to stop detector being removed from PinchGestureProcessor when main actor
// is destroyed.
Actor tempActor = Actor::New();
- tempActor.SetSize(100.0f, 100.0f);
+ tempActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
Stage::GetCurrent().Add(tempActor);
detector.Attach(tempActor);
// Actor lifetime is scoped
{
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
// Change rotation of child to be different from parent so that we can check if our local coordinate
// conversion of the parent actor is correct.
Actor child = Actor::New();
- child.SetSize(100.0f, 100.0f);
+ child.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
child.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
TestApplication application;
Actor first = Actor::New();
- first.SetSize(100.0f, 100.0f);
+ first.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ second.SetProperty( Actor::Property::POSITION_X, 100.0f);
second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(second);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor actor2 = Actor::New();
- actor2.SetSize(100.0f, 100.0f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
Stage::GetCurrent().Add(actor2);
TestApplication application;
Actor actor1 = Actor::New();
- actor1.SetSize(100.0f, 100.0f);
+ actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor1);
SignalData data1;
detector1.DetectedSignal().Connect(&application, functor1);
Actor actor2 = Actor::New();
- actor2.SetSize(100.0f, 100.0f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT);
Stage::GetCurrent().Add(actor2);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ dummyActor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummyActor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a layer to overlap the actor
Layer layer = Layer::New();
- layer.SetSize(100.0f, 100.0f);
+ layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor actor2 = Actor::New();
- actor2.SetSize(100.0f, 100.0f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- actor2.SetX(100.0f);
+ actor2.SetProperty( Actor::Property::POSITION_X, 100.0f);
Stage::GetCurrent().Add(actor2);
// Render and notify
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( actor );
PinchGestureDetector detector = PinchGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( actor );
Shader shader = CreateShader();
Renderer renderer = Renderer::New(geometry, shader);
Actor actor = Actor::New();
- actor.SetSize(Vector3::ONE * 100.f);
+ actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
actor.AddRenderer(renderer);
Stage::GetCurrent().Add(actor);
Shader shader = CreateShader();
Renderer renderer = Renderer::New(geometry, shader);
Actor actor = Actor::New();
- actor.SetSize(Vector3::ONE * 100.f);
+ actor.SetProperty( Actor::Property::SIZE,Vector3::ONE * 100.f);
actor.AddRenderer(renderer);
Stage::GetCurrent().Add(actor);
gCallBackCalled = false;
tet_infoline(" UtcDaliAddPropertyNotificationCallback - Forcing notification condition true, should receive a notification");
- object->mActor.SetPosition(Vector3(200.0f, 0.0f, 0.0f));
+ object->mActor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 0.0f, 0.0f));
application.Render(RENDER_FRAME_INTERVAL);
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
gCallBackCalled = false;
tet_infoline(" UtcDaliAddPropertyNotificationCallback - Forcing notification condition false, should not receive a notification");
- object->mActor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ object->mActor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f));
application.Render(RENDER_FRAME_INTERVAL);
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
gCallBackCalled = false;
tet_infoline(" UtcDaliAddPropertyNotificationCallback - Deleting notification and it's owning object, should not receive a notification");
- object->mActor.SetPosition(Vector3(200.0f, 0.0f, 0.0f));
+ object->mActor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 0.0f, 0.0f));
application.Render(RENDER_FRAME_INTERVAL);
application.SendNotification();
object->Terminate();
object->RemovePropertyNotification();
- object->mActor.SetPosition(Vector3(200.0f, 0.0f, 0.0f));
+ object->mActor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 0.0f, 0.0f));
application.Render(RENDER_FRAME_INTERVAL);
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
object->RemovePropertyNotifications();
- object->mActor.SetPosition(Vector3(200.0f, 0.0f, 0.0f));
+ object->mActor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 0.0f, 0.0f));
application.Render(RENDER_FRAME_INTERVAL);
application.SendNotification();
application.Render(RENDER_FRAME_INTERVAL);
gCallBackCalled = false;
notification.NotifySignal().Connect( &TestCallback );
- actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f));
application.Render(RENDER_FRAME_INTERVAL);
application.SendNotification();
PropertyNotification notification = actor.AddPropertyNotification( Actor::Property::POSITION_X, GreaterThanCondition(100.0f) );
notification.NotifySignal().Connect( &TestCallback );
- actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
// Move right to satisfy condition
gCallBackCalled = false;
- actor.SetPosition(Vector3(200.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
// Move left to un-satisfy condition
gCallBackCalled = false;
- actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( !gCallBackCalled );
// Move right to satisfy condition again.
gCallBackCalled = false;
Wait(application, DEFAULT_WAIT_PERIOD);
- actor.SetPosition(Vector3(200.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
END_TEST;
PropertyNotification notification = actor.AddPropertyNotification( Actor::Property::POSITION_X, LessThanCondition(100.0f ) );
notification.NotifySignal().Connect( &TestCallback );
- actor.SetPosition(Vector3(200.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
// Move left to satisfy condition
gCallBackCalled = false;
- actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
// Move right to un-satisfy condition
gCallBackCalled = false;
- actor.SetPosition(Vector3(200.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( !gCallBackCalled );
// Move left to satisfy condition again.
gCallBackCalled = false;
Wait(application, DEFAULT_WAIT_PERIOD);
- actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
END_TEST;
PropertyNotification notification = actor.AddPropertyNotification( Actor::Property::POSITION_X, InsideCondition(100.0f, 200.0f) );
notification.NotifySignal().Connect( &TestCallback );
- actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
// Move inside to satisfy condition
gCallBackCalled = false;
- actor.SetPosition(Vector3(150.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(150.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
// Move outside (right) to un-satisfy condition
gCallBackCalled = false;
- actor.SetPosition(Vector3(300.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(300.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( !gCallBackCalled );
// Move inside to satisfy condition again.
gCallBackCalled = false;
Wait(application, DEFAULT_WAIT_PERIOD);
- actor.SetPosition(Vector3(150.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(150.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
END_TEST;
PropertyNotification notification = actor.AddPropertyNotification( Actor::Property::POSITION_X, OutsideCondition(100.0f, 200.0f) );
notification.NotifySignal().Connect( &TestCallback );
- actor.SetPosition(Vector3(150.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(150.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
// Move outside (left) to satisfy condition
gCallBackCalled = false;
- actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
// Move inside to un-satisfy condition
gCallBackCalled = false;
- actor.SetPosition(Vector3(150.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(150.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( !gCallBackCalled );
// Move outside (right) to satisfy condition again.
gCallBackCalled = false;
Wait(application, DEFAULT_WAIT_PERIOD);
- actor.SetPosition(Vector3(300.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(300.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
END_TEST;
notification = actor.AddPropertyNotification( Actor::Property::COLOR, 3, GreaterThanCondition(0.5f) );
notification.NotifySignal().Connect( &TestCallback );
- actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(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
gCallBackCalled = false;
- actor.SetPosition(Vector3(200.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
// Move down to satisfy YAxis condition
gCallBackCalled = false;
- actor.SetPosition(Vector3(200.0f, 200.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 200.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
// Move forward to satisfy ZAxis
gCallBackCalled = false;
Wait(application, DEFAULT_WAIT_PERIOD);
- actor.SetPosition(Vector3(200.0f, 200.0f, 200.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 200.0f, 200.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
notification = actor.AddPropertyNotification( Actor::Property::COLOR, 3, LessThanCondition(0.5f) );
notification.NotifySignal().Connect( &TestCallback );
- actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.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
gCallBackCalled = false;
- actor.SetPosition(Vector3(-200.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(-200.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
// Move up to satisfy YAxis condition
gCallBackCalled = false;
- actor.SetPosition(Vector3(-200.0f, -200.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(-200.0f, -200.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
// Move back to satisfy ZAxis
gCallBackCalled = false;
Wait(application, DEFAULT_WAIT_PERIOD);
- actor.SetPosition(Vector3(-200.0f, -200.0f, -200.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(-200.0f, -200.0f, -200.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
notification.NotifySignal().Connect( &TestCallback );
// set outside all conditions
- actor.SetPosition(Vector3(200.0f, 200.0f, 200.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 200.0f, 200.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
gCallBackCalled = false;
- actor.SetPosition(Vector3(0.0f, 200.0f, 200.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 200.0f, 200.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
// Move y to inside condition
gCallBackCalled = false;
- actor.SetPosition(Vector3(0.0f, 0.0f, 200.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 200.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
// Move z to inside condition
gCallBackCalled = false;
Wait(application, DEFAULT_WAIT_PERIOD);
- actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
notification.NotifySignal().Connect( &TestCallback );
// set inside all conditions
- actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f));
actor.SetProperty( Actor::Property::COLOR,Vector4(0.0f, 0.0f, 0.0f, 0.5f));
Wait(application, DEFAULT_WAIT_PERIOD);
// Move x to outside condition
gCallBackCalled = false;
- actor.SetPosition(Vector3(200.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
// Move y to outside condition
gCallBackCalled = false;
- actor.SetPosition(Vector3(200.0f, 200.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 200.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
// Move z to outside condition
gCallBackCalled = false;
Wait(application, DEFAULT_WAIT_PERIOD);
- actor.SetPosition(Vector3(200.0f, 200.0f, 200.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(200.0f, 200.0f, 200.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
gCallBackCalled = false;
notification.NotifySignal().Connect( &TestCallback );
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f) );
application.Render(RENDER_FRAME_INTERVAL);
application.SendNotification();
gCallBackCalled = false;
- actor.SetSize(200.0f, 200.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
application.Render(RENDER_FRAME_INTERVAL);
application.SendNotification();
notification.NotifySignal().Connect( &TestCallback );
// set initial position
- actor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
// test both directions
{
// Move x to negative position
gCallBackCalled = false;
- actor.SetPosition(Vector3((i * step), 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3((i * step), 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
}
{
// Move x to negative position
gCallBackCalled = false;
- actor.SetPosition(Vector3(-(i * step), 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(-(i * step), 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
}
notification.NotifySignal().Connect( &TestCallback );
// set initial position lower than first position in list
- actor.SetPosition(Vector3(values[0] - averageStep, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(values[0] - averageStep, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
for( unsigned int i = 0 ; i < values.Count() - 1 ; ++i )
gCallBackCalled = false;
// set position half way between the current values
float position = values[i] + (0.5f * (values[i + 1] - values[i]));
- actor.SetPosition(Vector3(position, 0.0f, 0.0f));
+ actor.SetProperty( Actor::Property::POSITION, Vector3(position, 0.0f, 0.0f));
Wait(application, DEFAULT_WAIT_PERIOD);
DALI_TEST_CHECK( gCallBackCalled );
}
PrepareResourceImage( application, 80u, 80u, Pixel::RGBA8888 );
Image image = ResourceImage::New(filename);
Actor actor = CreateRenderableActor(image);
- actor.SetSize( 80, 80 );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 80.0f, 80.0f ) );
return actor;
}
Image image = ResourceImage::New(filename);
DALI_TEST_CHECK( image );
Actor actor = CreateRenderableActor(image);
- actor.SetSize( 80, 80 );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 80.0f, 80.0f ) );
return actor;
}
BufferImage img = BufferImage::New( 1,1 );
Actor newActor = CreateRenderableActor( img );
- newActor.SetSize(1,1);
+ newActor.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
stage.Add( newActor );
Actor nonRenderableActor = Actor::New();
BufferImage img = BufferImage::New( 1,1 );
Actor newActor = CreateRenderableActor( img );
- newActor.SetSize(1,1);
+ newActor.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
stage.Add( newActor );
Actor nonRenderableActor = Actor::New();
BufferImage img = BufferImage::New( 1,1 );
Actor newActor = CreateRenderableActor( img );
- newActor.SetSize(1,1);
+ newActor.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
task.SetSourceActor( newActor );
// Don't add newActor to stage yet //'
BufferImage img = BufferImage::New( 1,1 );
Actor newActor = CreateRenderableActor( img );
- newActor.SetSize(1,1);
+ newActor.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
stage.Add( newActor );
Actor nonRenderableActor = Actor::New();
BufferImage img = BufferImage::New( 1,1 );
Actor newActor = CreateRenderableActor( img );
- newActor.SetSize(1,1);
+ newActor.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
stage.Add( newActor );
task.SetSourceActor( newActor );
BufferImage img1 = BufferImage::New( 1,1 );
Actor actor1 = CreateRenderableActor( img1 );
- actor1.SetSize(1,1);
+ actor1.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
Stage::GetCurrent().Add( actor1 );
// Update & Render actor1
BufferImage img2 = BufferImage::New( 1,1 );
Actor actor2 = CreateRenderableActor( img2 );
- actor2.SetSize(1,1);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
// Force actor2 to be rendered before actor1
Layer layer = Layer::New();
BufferImage img3 = BufferImage::New( 1,1 );
Actor actor3 = CreateRenderableActor( img3 );
- actor3.SetSize(1,1);
+ actor3.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
// Force actor3 to be rendered before actor2
layer = Layer::New();
BufferImage img1 = BufferImage::New( 1,1 );
Actor actor1 = CreateRenderableActor( img1 );
- actor1.SetSize(1,1);
+ actor1.SetProperty( Actor::Property::SIZE, Vector2( 1.0f, 1.0f ) );
Stage::GetCurrent().Add( actor1 );
RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
BufferImage image = BufferImage::New( 10, 10 );
image.Update();
Actor rootActor = CreateRenderableActor( image );
- rootActor.SetSize( 10, 10 );
+ rootActor.SetProperty( Actor::Property::SIZE, Vector2( 10.0f, 10.0f ) );
Stage::GetCurrent().Add( rootActor );
RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
renderer.SetTextures( textureSet );
Actor secondRootActor = Actor::New();
secondRootActor.AddRenderer(renderer);
- secondRootActor.SetSize(100, 100);
+ secondRootActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
Stage::GetCurrent().Add(secondRootActor);
RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ONCE, true);
renderer.SetTextures( textureSet );
Actor secondRootActor = Actor::New();
secondRootActor.AddRenderer(renderer);
- secondRootActor.SetSize(100, 100);
+ secondRootActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
Stage::GetCurrent().Add(secondRootActor);
RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ALWAYS, true);
renderer.SetTextures( textureSet );
Actor secondRootActor = Actor::New();
secondRootActor.AddRenderer(renderer);
- secondRootActor.SetSize(100, 100);
+ secondRootActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
Stage::GetCurrent().Add(secondRootActor);
RenderTask newTask = CreateRenderTask(application, offscreenCameraActor, rootActor, secondRootActor, RenderTask::REFRESH_ONCE, false);
renderer.SetTextures( textureSet );
Actor secondRootActor = Actor::New();
secondRootActor.AddRenderer(renderer);
- secondRootActor.SetSize(100, 100);
+ secondRootActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
Stage::GetCurrent().Add(secondRootActor);
BufferImage image = BufferImage::New( 10, 10 );
Actor rootActor = CreateRenderableActor( image );
- rootActor.SetSize( 10, 10 );
+ rootActor.SetProperty( Actor::Property::SIZE, Vector2( 10.0f, 10.0f ) );
rootActor.SetProperty( Actor::Property::VISIBLE,false);
Stage::GetCurrent().Add( rootActor );
BufferImage image = BufferImage::New( 10, 10 );
Actor rootActor = CreateRenderableActor( image );
- rootActor.SetSize( 10, 10 );
+ rootActor.SetProperty( Actor::Property::SIZE, Vector2( 10.0f, 10.0f ) );
stage.Add( rootActor );
Actor actorWithMissingImage = CreateRenderableActor( Image() );
- actorWithMissingImage.SetSize( 10, 10 );
+ actorWithMissingImage.SetProperty( Actor::Property::SIZE, Vector2( 10.0f, 10.0f ) );
stage.Add( actorWithMissingImage );
RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
- actor.SetPosition( Vector3(0.0, 0.0, 0.0) );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ actor.SetProperty( Actor::Property::POSITION, Vector3(0.0, 0.0, 0.0) );
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) );
Actor actor2 = Actor::New();
float actor2Size = 100.f;
- actor2.SetSize( actor2Size, actor2Size );
- actor2.SetPosition( Vector3(0.0, 0.0, 0.0) );
+ actor2.SetProperty( Actor::Property::SIZE, Vector2( actor2Size, actor2Size ) );
+ actor2.SetProperty( Actor::Property::POSITION, Vector3(0.0, 0.0, 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 );
TestApplication application;
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- actor.SetSize(100.0f, 100.0f);
- actor.SetPosition(10.0f, 10.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ actor.SetProperty( Actor::Property::POSITION, Vector2(10.0f, 10.0f));
Stage::GetCurrent().Add(actor);
RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
TestApplication application;
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- actor.SetSize( 100.0f, 100.0f );
- actor.SetPosition( 10.0f, 10.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 10.0f, 10.0f ));
Stage::GetCurrent().Add( actor );
RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
Renderer renderer = Renderer::New(geometry1, shader);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
application.SendNotification();
Renderer renderer = Renderer::New(geometry, shader1);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
TestGlAbstraction& gl = application.GetGlAbstraction();
Renderer renderer = Renderer::New(geometry, shader);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
application.SendNotification();
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
// By default, none of the faces should be culled
// set a transparent actor color so that blending is enabled
actor.SetProperty( DevelActor::Property::OPACITY, 0.5f );
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_RGB, BlendFactor::ONE_MINUS_SRC_COLOR );
Actor actor = Actor::New();
actor.SetProperty( DevelActor::Property::OPACITY, 0.5f ); // enable blending
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
renderer.SetProperty( Renderer::Property::BLEND_FACTOR_SRC_RGB, BlendFactor::CONSTANT_COLOR );
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
// Test the defaults as documented in blending.h
Actor actor = Actor::New();
actor.SetProperty( DevelActor::Property::OPACITY, 0.1f );
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
// Test the single blending equation setting
Actor actor = Actor::New();
actor.SetProperty( DevelActor::Property::OPACITY, 0.98f );
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON);
Actor actor = Actor::New();
actor.SetProperty( DevelActor::Property::OPACITY, 0.0f );
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON);
Actor actor = Actor::New();
actor.SetProperty( DevelActor::Property::OPACITY, 0.15f );
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::OFF);
Actor actor = Actor::New();
actor.SetProperty( DevelActor::Property::OPACITY, 0.75f );
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
actor.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 0.0f, 1.0f, 0.5f) );
Stage::GetCurrent().Add(actor);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
actor.SetProperty( Actor::Property::COLOR, Color::MAGENTA );
Stage::GetCurrent().Add(actor);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::AUTO);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
TestGlAbstraction& glAbstraction = application.GetGlAbstraction();
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
actor.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 0.0f, 1.0f, 0.5f) );
Stage::GetCurrent().Add(actor);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
Vector4 initialColor = Color::WHITE;
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
Vector4 initialColor = Color::WHITE;
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
Actor actor = Actor::New();
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);
+ actor.SetProperty( Actor::Property::POSITION, Vector2(0.0f,0.0f));
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.Add(actor);
actor.SetProperty( Dali::DevelActor::Property::SIBLING_ORDER, siblingOrder );
DALI_TEST_EQUALS( actor.GetProperty<int>( Dali::DevelActor::Property::SIBLING_ORDER), siblingOrder, TEST_INNER_LOCATION(location) );
gl.EnableDrawCallTrace( true );
Actor actor = Actor::New();
- actor.SetSize( 100, 100 );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
// create geometry
Geometry geometry = Geometry::New();
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage stage = Stage::GetCurrent();
stage.GetRootLayer().SetBehavior( Layer::LAYER_3D );
stage.Add(actor);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
/*
Actor actor = Actor::New();
actor.AddRenderer( renderer );
- actor.SetSize( 400.0f, 400.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage stage = Stage::GetCurrent();
stage.GetRootLayer().SetBehavior( Layer::LAYER_3D );
stage.Add( actor );
Actor actor= Actor::New();
actor.AddRenderer(renderer);
- actor.SetPosition(0.0f,0.0f);
- actor.SetSize(100, 100);
+ actor.SetProperty( Actor::Property::POSITION, Vector2(0.0f,0.0f));
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
Stage::GetCurrent().Add(actor);
TestGlAbstraction& gl = application.GetGlAbstraction();
Actor actor = Actor::New();
actor.AddRenderer( renderer );
- actor.SetSize( 400, 400 );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
Stage::GetCurrent().Add( actor );
Actor actor = Actor::New();
actor.AddRenderer( renderer );
- actor.SetSize( 400, 400 );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
Stage::GetCurrent().Add( actor );
Actor actor = Actor::New();
actor.AddRenderer( renderer );
- actor.SetSize( 400, 400 );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add( actor );
application.SendNotification();
Actor actor = Actor::New();
actor.AddRenderer( renderer );
- actor.SetSize( 400, 400 );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
Stage::GetCurrent().Add( actor );
Actor actor = Actor::New();
actor.AddRenderer( renderer );
- actor.SetSize( 400, 400 );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
actor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 0.0f, 1.0f, 1.0f ) );
Stage::GetCurrent().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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Attach a temporary actor to stop detector being removed from RotationGestureProcessor when main actor
// is destroyed.
Actor tempActor = Actor::New();
- tempActor.SetSize(100.0f, 100.0f);
+ tempActor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
tempActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
Stage::GetCurrent().Add(tempActor);
detector.Attach(tempActor);
// Actor lifetime is scoped
{
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
// Change rotation of child to be different from parent so that we can check if our local coordinate
// conversion of the parent actor is correct.
Actor child = Actor::New();
- child.SetSize(100.0f, 100.0f);
+ child.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
child.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
TestApplication application;
Actor first = Actor::New();
- first.SetSize(100.0f, 100.0f);
+ first.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ second.SetProperty( Actor::Property::POSITION_X, 100.0f);
second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(second);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor actor2 = Actor::New();
- actor2.SetSize(100.0f, 100.0f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
Stage::GetCurrent().Add(actor2);
TestApplication application;
Actor actor1 = Actor::New();
- actor1.SetSize(100.0f, 100.0f);
+ actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor1);
SignalData data1;
detector1.DetectedSignal().Connect(&application, functor1);
Actor actor2 = Actor::New();
- actor2.SetSize(100.0f, 100.0f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
actor2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT);
Stage::GetCurrent().Add(actor2);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ dummyActor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
dummyActor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(dummyActor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a layer to overlap the actor
Layer layer = Layer::New();
- layer.SetSize(100.0f, 100.0f);
+ layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( actor );
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
Stage::GetCurrent().Add( actor );
Actor actor = Actor::New();
actor.AddRenderer(renderer);
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add( actor );
Actor actor = Actor::New();
actor.AddRenderer(renderer);
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add( actor );
TestGlAbstraction& gl = application.GetGlAbstraction();
Actor actor = Actor::New();
actor.AddRenderer(renderer);
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actor.SetSize( 400, 400 );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add( actor );
TestGlAbstraction& gl = application.GetGlAbstraction();
// Add an actor to the scene.
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.TouchedSignal().Connect( &DummyTouchCallback );
// Add an actor to the scene.
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.TouchedSignal().Connect( &DummyTouchCallback );
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
// Render before resizing surface
actor.AddRenderer(renderer);
int testWidth = 400;
int testHeight = 400;
- actor.SetSize(testWidth, testHeight);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( testWidth, testHeight) );
stage.Add(actor);
CameraActor offscreenCameraActor = CameraActor::New( Size( testWidth, testHeight ) );
Actor actor = Actor::New();
actor.AddRenderer( renderer );
- actor.SetSize( 400, 400 );
+
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400, 400 ) );
Stage::GetCurrent().Add( actor );
// Render
// Default properties
{
Actor actor = Actor::New();
- actor.SetSize( Vector3::ONE );
- actor.SetPosition( Vector3::XAXIS );
- actor.SetScale( Vector3::ZAXIS );
+ actor.SetProperty( Actor::Property::SIZE, Vector3::ONE );
+ actor.SetProperty( Actor::Property::POSITION, Vector3::XAXIS );
+ actor.SetProperty( Actor::Property::SCALE, Vector3::ZAXIS );
actor.SetProperty( Actor::Property::VISIBLE, false );
actor.SetProperty( Actor::Property::COLOR, Color::MAGENTA );
actor.SetProperty( Actor::Property::NAME, "MyActor" );
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
Vector4 initialColor = Color::WHITE;
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
Vector4 initialColor = Color::WHITE;
Actor actor = Actor::New();
actor.AddRenderer(renderer);
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add(actor);
application.SendNotification();
application.Render(0);
// Add an actor to the scene.
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.TouchedSignal().Connect( &DummyTouchCallback );
// Add an actor to the scene.
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.TouchedSignal().Connect( &DummyTouchCallback );
// Add an actor to the scene.
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.TouchedSignal().Connect( &DummyTouchCallback );
// Add an actor to the scene.
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
actor.TouchedSignal().Connect( &DummyTouchCallback );
// 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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Attach an actor and change the required touches
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Actor lifetime is scoped
{
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
// Change rotation of child to be different from parent so that we can check if our local coordinate
// conversion of the parent actor is correct.
Actor child = Actor::New();
- child.SetSize(100.0f, 100.0f);
+ child.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
child.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
child.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
child.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
TestApplication application;
Actor first = Actor::New();
- first.SetSize(100.0f, 100.0f);
+ first.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
+ second.SetProperty( Actor::Property::POSITION_X, 100.0f);
second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(second);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor first = Actor::New();
- first.SetSize(100.0f, 100.0f);
+ first.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
first.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(first);
Actor second = Actor::New();
- second.SetSize(100.0f, 100.0f);
+ second.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
second.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- second.SetX(100.0f);
+ second.SetProperty( Actor::Property::POSITION_X, 100.0f);
first.Add(second);
// Render and notify
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
// Move actor somewhere else
- actor.SetPosition( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 100.0f, 100.0f ));
// Render and notify
application.SendNotification();
DALI_TEST_EQUALS(false, data.functorCalled, TEST_LOCATION);
// Move actor in to the tap position.
- actor.SetPosition( 0.0f, 0.0f );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
// Render and notify
application.SendNotification();
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a layer to overlap the actor
Layer layer = Layer::New();
- layer.SetSize(100.0f, 100.0f);
+ layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
TapGestureDetector detector = TapGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TapGestureDetector detector = TapGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TapGestureDetector detector = TapGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TapGestureDetector detector = TapGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TapGestureDetector detector = TapGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TapGestureDetector detector = TapGestureDetector::New();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TapGestureDetector detector = TapGestureDetector::New(2);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TapGestureDetector detector = TapGestureDetector::New(2);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TapGestureDetector detector = TapGestureDetector::New(2);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor actor2 = Actor::New();
- actor2.SetSize(100.0f, 100.0f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- actor2.SetX(100.0f);
+ actor2.SetProperty( Actor::Property::POSITION_X, 100.0f);
Stage::GetCurrent().Add(actor2);
// Render and notify
Actor actor = Actor::New();
actor.AddRenderer(renderer);
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
return actor;
}
Actor actor = Actor::New();
actor.AddRenderer(renderer);
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actor.SetSize(400, 400);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
Stage::GetCurrent().Add( actor );
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Vector2 stageSize = stage.GetSize();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
stage.Add(actor);
data.Reset();
// Emit a down signal where actor is just at the camera's near plane
- actor.SetZ(distance - nearPlane);
+ actor.SetProperty( Actor::Property::POSITION_Z, distance - nearPlane);
// Render and notify
application.SendNotification();
data.Reset();
// Emit a down signal where actor is closer than the camera's near plane
- actor.SetZ((distance - nearPlane) + 1.0f);
+ actor.SetProperty( Actor::Property::POSITION_Z, (distance - nearPlane) + 1.0f);
// Render and notify
application.SendNotification();
data.Reset();
// Emit a down signal where actor is just at the camera's far plane
- actor.SetZ(distance - farPlane);
+ actor.SetProperty( Actor::Property::POSITION_Z, distance - farPlane);
// Render and notify
application.SendNotification();
data.Reset();
// Emit a down signal where actor is further than the camera's far plane
- actor.SetZ((distance - farPlane) - 1.0f);
+ actor.SetProperty( Actor::Property::POSITION_Z, (distance - farPlane) - 1.0f);
// Render and notify
application.SendNotification();
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TouchDataFunctor functor( data );
Layer layer1 ( Layer::New() );
- layer1.SetSize(100.0f, 100.0f);
+ layer1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer1 );
Actor actor1 ( Actor::New() );
- actor1.SetSize( 100.0f, 100.0f );
+ actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- actor1.SetZ( 1.0f ); // Should hit actor1 in this layer
+ actor1.SetProperty( Actor::Property::POSITION_Z, 1.0f ); // Should hit actor1 in this layer
layer1.Add( actor1 );
// Render and notify
// Add another layer
Layer layer2 ( Layer::New() );
- layer2.SetSize(100.0f, 100.0f );
+ layer2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- layer2.SetZ( 10.0f ); // Should hit layer2 in this layer rather than actor2
+ layer2.SetProperty( Actor::Property::POSITION_Z, 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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
layer2.Add( actor2 );
Vector2 stageSize ( stage.GetSize() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
Vector2 stageSize ( stage.GetSize() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
Layer layer = Layer::New();
- layer.SetSize(100.0f, 100.0f);
+ layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor.Add(layer);
// Create a renderable actor to display the FrameBufferImage
Actor renderableActor = CreateRenderableActor( frameBufferImage );
renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- renderableActor.SetSize( stageSize.x, stageSize.y );
+ renderableActor.SetProperty( Actor::Property::SIZE, Vector2( 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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add( actor );
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects
Vector2 stageSize ( stage.GetSize() );
Actor parent = CreateRenderableActor();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(parent);
Actor actor = CreateRenderableActor();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a layer to overlap the actor
Layer layer = Layer::New();
- layer.SetSize(100.0f, 100.0f);
+ layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
Stage stage = Stage::GetCurrent();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
Stage stage = Stage::GetCurrent();
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
stage.Add( actor );
Actor clippingActor = Actor::New();
- clippingActor.SetSize( 50.0f, 50.0f );
+ clippingActor.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
stage.Add( clippingActor );
// Add a child to the clipped region.
Actor clippingChild = Actor::New();
- clippingChild.SetSize( 50.0f, 50.0f );
- clippingChild.SetPosition( 25.0f, 25.0f );
+ clippingChild.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
+ clippingChild.SetProperty( Actor::Property::POSITION, Vector2( 25.0f, 25.0f ));
clippingChild.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
clippingActor.Add( clippingChild );
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
TestApplication application;
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Vector2 stageSize = stage.GetSize();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
stage.Add(actor);
data.Reset();
// Emit a down signal where actor is just at the camera's near plane
- actor.SetZ(distance - nearPlane);
+ actor.SetProperty( Actor::Property::POSITION_Z, distance - nearPlane);
// Render and notify
application.SendNotification();
data.Reset();
// Emit a down signal where actor is closer than the camera's near plane
- actor.SetZ((distance - nearPlane) + 1.0f);
+ actor.SetProperty( Actor::Property::POSITION_Z, (distance - nearPlane) + 1.0f);
// Render and notify
application.SendNotification();
data.Reset();
// Emit a down signal where actor is just at the camera's far plane
- actor.SetZ(distance - farPlane);
+ actor.SetProperty( Actor::Property::POSITION_Z, distance - farPlane);
// Render and notify
application.SendNotification();
data.Reset();
// Emit a down signal where actor is further than the camera's far plane
- actor.SetZ((distance - farPlane) - 1.0f);
+ actor.SetProperty( Actor::Property::POSITION_Z, (distance - farPlane) - 1.0f);
// Render and notify
application.SendNotification();
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TouchEventFunctor functor( data );
Layer layer1 ( Layer::New() );
- layer1.SetSize(100.0f, 100.0f);
+ layer1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer1 );
Actor actor1 ( Actor::New() );
- actor1.SetSize( 100.0f, 100.0f );
+ actor1.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- actor1.SetZ( 1.0f ); // Should hit actor1 in this layer
+ actor1.SetProperty( Actor::Property::POSITION_Z, 1.0f ); // Should hit actor1 in this layer
layer1.Add( actor1 );
// Render and notify
// Add another layer
Layer layer2 ( Layer::New() );
- layer2.SetSize(100.0f, 100.0f );
+ layer2.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- layer2.SetZ( 10.0f ); // Should hit layer2 in this layer rather than actor2
+ layer2.SetProperty( Actor::Property::POSITION_Z, 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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
layer2.Add( actor2 );
Vector2 stageSize ( stage.GetSize() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
Vector2 stageSize ( stage.GetSize() );
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
Layer layer = Layer::New();
- layer.SetSize(100.0f, 100.0f);
+ layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
actor.Add(layer);
// Create a renderable actor to display the FrameBufferImage
Actor renderableActor = CreateRenderableActor( frameBufferImage );
renderableActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- renderableActor.SetSize( stageSize.x, stageSize.y );
+ renderableActor.SetProperty( Actor::Property::SIZE, Vector2( 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.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add( actor );
application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE ); // Ensure framebuffer connects
auto stageSize( stage.GetSize() );
auto actor = CreateRenderableActor();
- actor.SetSize( stageSize.x, stageSize.y );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, stageSize.y ) );
stage.Add( actor );
auto renderTask = stage.GetRenderTaskList().CreateTask();
Vector2 stageSize ( stage.GetSize() );
Actor parent = CreateRenderableActor();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(parent);
Actor actor = CreateRenderableActor();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
// Add a layer to overlap the actor
Layer layer = Layer::New();
- layer.SetSize(100.0f, 100.0f);
+ layer.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add( layer );
layer.RaiseToTop();
Stage stage = Stage::GetCurrent();
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
stage.Add(actor);
Stage stage = Stage::GetCurrent();
Actor actor = Actor::New();
- actor.SetSize( 100.0f, 100.0f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
stage.Add( actor );
Actor clippingActor = Actor::New();
- clippingActor.SetSize( 50.0f, 50.0f );
+ clippingActor.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
clippingActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
clippingActor.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
stage.Add( clippingActor );
// Add a child to the clipped region.
Actor clippingChild = Actor::New();
- clippingChild.SetSize( 50.0f, 50.0f );
- clippingChild.SetPosition( 25.0f, 25.0f );
+ clippingChild.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
+ clippingChild.SetProperty( Actor::Property::POSITION, Vector2( 25.0f, 25.0f ));
clippingChild.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
clippingActor.Add( clippingChild );
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
TestApplication application;
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
Actor rootActor( Stage::GetCurrent().GetRootLayer() );
Actor parent = Actor::New();
- parent.SetSize(100.0f, 100.0f);
+ parent.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
parent.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(parent);
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
parent.Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application;
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
TestApplication application; // Reset all test adapter return codes
Actor actor = Actor::New();
- actor.SetSize(100.0f, 100.0f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
actor.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
Stage::GetCurrent().Add(actor);
case Dali::Actor::Property::SIZE:
{
- SetSize( property.Get< Vector3 >() );
+ Property::Type type = property.GetType();
+ if( type == Property::VECTOR2 )
+ {
+ SetSize( property.Get< Vector2 >() );
+ }
+ else if ( type == Property::VECTOR3 )
+ {
+ SetSize( property.Get< Vector3 >() );
+ }
break;
}
case Dali::Actor::Property::POSITION:
{
- SetPosition( property.Get< Vector3 >() );
+ Property::Type type = property.GetType();
+ if( type == Property::VECTOR2 )
+ {
+ Vector2 position = property.Get< Vector2 >();
+ SetPosition( Vector3( position.x, position.y, 0.0f ) );
+ }
+ else if ( type == Property::VECTOR3 )
+ {
+ SetPosition( property.Get< Vector3 >() );
+ }
break;
}
case Dali::Actor::Property::SCALE:
{
- SetScale( property.Get< Vector3 >() );
+ Property::Type type = property.GetType();
+ if( type == Property::FLOAT )
+ {
+ float scale = property.Get< float >();
+ SetScale( scale, scale, scale );
+ }
+ else if ( type == Property::VECTOR3 )
+ {
+ SetScale( property.Get< Vector3 >() );
+ }
break;
}
return Actor(parent);
}
-void Actor::SetSize(float width, float height)
-{
- GetImplementation(*this).SetSize(width, height);
-}
-
-void Actor::SetSize(float width, float height, float depth)
-{
- GetImplementation(*this).SetSize(width, height, depth);
-}
-
-void Actor::SetSize(const Vector2& size)
-{
- GetImplementation(*this).SetSize( size );
-}
-
-void Actor::SetSize(const Vector3& size)
-{
- GetImplementation(*this).SetSize( size );
-}
-
Vector3 Actor::GetTargetSize() const
{
return GetImplementation(*this).GetTargetSize();
return GetImplementation(*this).GetNaturalSize();
}
-void Actor::SetPosition(float x, float y)
-{
- GetImplementation(*this).SetPosition(x, y);
-}
-
-void Actor::SetPosition(float x, float y, float z)
-{
- GetImplementation(*this).SetPosition(x, y, z);
-}
-
-void Actor::SetPosition(const Vector3& position)
-{
- GetImplementation(*this).SetPosition(position);
-}
-
-void Actor::SetX(float x)
-{
- GetImplementation(*this).SetX(x);
-}
-
-void Actor::SetY(float y)
-{
- GetImplementation(*this).SetY(y);
-}
-
-void Actor::SetZ(float z)
-{
- GetImplementation(*this).SetZ(z);
-}
-
void Actor::TranslateBy(const Vector3& distance)
{
GetImplementation(*this).TranslateBy(distance);
GetImplementation(*this).RotateBy(relativeRotation);
}
-void Actor::SetScale(float scale)
-{
- GetImplementation(*this).SetScale(scale);
-}
-
-void Actor::SetScale(float scaleX, float scaleY, float scaleZ)
-{
- GetImplementation(*this).SetScale(scaleX, scaleY, scaleZ);
-}
-
-void Actor::SetScale(const Vector3& scale)
-{
- GetImplementation(*this).SetScale(scale);
-}
-
void Actor::ScaleBy(const Vector3& relativeScale)
{
GetImplementation(*this).ScaleBy(relativeScale);
/**
* @brief The size of an actor.
- * @details Name "size", type Property::VECTOR3, animatable / constraint-input
+ * @details Name "size", type Property::VECTOR3 or Property::VECTOR2, animatable / constraint-input
+ * @note Only Property::VECTOR3 can be animated or used as constraint-input
* @SINCE_1_0.0
- * @see Actor::SetSize()
*/
SIZE,
* @brief The width of an actor.
* @details Name "sizeWidth", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetSize()
*/
SIZE_WIDTH,
* @brief The height of an actor.
* @details Name "sizeHeight", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetSize()
*/
SIZE_HEIGHT,
* @brief The depth of an actor.
* @details Name "sizeDepth", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetSize()
*/
SIZE_DEPTH,
/**
* @brief The position of an actor.
- * @details Name "position", type Property::VECTOR3, animatable / constraint-input
+ * @details Name "position", type Property::VECTOR3 or Property::VECTOR2, animatable / constraint-input
+ * @note Only Property::VECTOR3 can be animated or used as constraint-input
* @SINCE_1_0.0
- * @see Actor::SetPosition()
*/
POSITION,
* @brief The x position of an actor.
* @details Name "positionX", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetX()
*/
POSITION_X,
* @brief The y position of an actor.
* @details Name "positionY", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetY()
*/
POSITION_Y,
* @brief The z position of an actor.
* @details Name "positionZ", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetZ()
*/
POSITION_Z,
/**
* @brief The scale factor applied to an actor.
- * @details Name "scale", type Property::VECTOR3, animatable / constraint-input
+ * @details Name "scale", type Property::VECTOR3 or Property::FLOAT, animatable / constraint-input
+ * @note Only Property::VECTOR3 can be animated or used as constraint-input
* @SINCE_1_0.0
- * @see Actor::SetScale()
*/
SCALE,
* @brief The x scale factor applied to an actor.
* @details Name "scaleX", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetScale()
*/
SCALE_X,
* @brief The y scale factor applied to an actor.
* @details Name "scaleY", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetScale()
*/
SCALE_Y,
* @brief The x scale factor applied to an actor.
* @details Name "scaleZ", type Property::FLOAT, animatable / constraint-input
* @SINCE_1_0.0
- * @see Actor::SetScale()
*/
SCALE_Z,
// Positioning
/**
- * @brief Sets the size of an actor.
- *
- * Geometry can be scaled to fit within this area.
- * This does not interfere with the actors scale factor.
- * The actors default depth is the minimum of width & height.
- * @SINCE_1_0.0
- * @param [in] width The new width
- * @param [in] height The new height
- * @pre The actor has been initialized.
- */
- void SetSize(float width, float height);
-
- /**
- * @brief Sets the size of an actor.
- *
- * Geometry can be scaled to fit within this area.
- * This does not interfere with the actors scale factor.
- * @SINCE_1_0.0
- * @param[in] width The size of the actor along the x-axis
- * @param[in] height The size of the actor along the y-axis
- * @param[in] depth The size of the actor along the z-axis
- * @pre The actor has been initialized.
- */
- void SetSize(float width, float height, float depth);
-
- /**
- * @brief Sets the size of an actor.
- *
- * Geometry can be scaled to fit within this area.
- * This does not interfere with the actors scale factor.
- * The actors default depth is the minimum of width & height.
- * @SINCE_1_0.0
- * @param[in] size The new size
- * @pre The actor has been initialized.
- */
- void SetSize(const Vector2& size);
-
- /**
- * @brief Sets the size of an actor.
- *
- * Geometry can be scaled to fit within this area.
- * This does not interfere with the actors scale factor.
- * @SINCE_1_0.0
- * @param [in] size The new size
- * @pre The actor has been initialized.
- */
- void SetSize(const Vector3& size);
-
- /**
* @brief Retrieves the actor's size.
*
* @SINCE_1_0.0
Vector3 GetNaturalSize() const;
/**
- * @brief Sets the position of the Actor.
- *
- * By default, sets the position vector between the parent origin and anchor point (default).
- *
- * 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.
- * @SINCE_1_0.0
- * @param[in] x The new x position
- * @param[in] y The new y position
- * @pre The Actor has been initialized.
- */
- void SetPosition(float x, float y);
-
- /**
- * @brief Sets the position of the Actor.
- *
- * By default, sets the position vector between the parent origin and anchor point (default).
- *
- * If Position inheritance if disabled, sets the world position. @see Actor::Property::INHERIT_POSITION
- *
- * @image html actor-position.png
- * @SINCE_1_0.0
- * @param[in] x The new x position
- * @param[in] y The new y position
- * @param[in] z The new z position
- * @pre The Actor has been initialized.
- */
- void SetPosition(float x, float y, float z);
-
- /**
- * @brief Sets the position of the Actor.
- *
- * By default, sets the position vector between the parent origin and anchor point (default).
- *
- * If Position inheritance if disabled, sets the world position. @see Actor::Property::INHERIT_POSITION
- *
- * @image html actor-position.png
- * @SINCE_1_0.0
- * @param[in] position The new position
- * @pre The Actor has been initialized.
- */
- void SetPosition(const Vector3& position);
-
- /**
- * @brief Sets the position of an actor along the X-axis.
- *
- * @SINCE_1_0.0
- * @param[in] x The new x position
- * @pre The Actor has been initialized.
- */
- void SetX(float x);
-
- /**
- * @brief Sets the position of an actor along the Y-axis.
- *
- * @SINCE_1_0.0
- * @param[in] y The new y position
- * @pre The Actor has been initialized.
- */
- void SetY(float y);
-
- /**
- * @brief Sets the position of an actor along the Z-axis.
- *
- * @SINCE_1_0.0
- * @param[in] z The new z position
- * @pre The Actor has been initialized.
- */
- void SetZ(float z);
-
- /**
* @brief Translates an actor relative to its existing position.
*
* @SINCE_1_0.0
void RotateBy(const Quaternion& relativeRotation);
/**
- * @brief Sets the scale factor applied to an actor.
- *
- * @SINCE_1_0.0
- * @param[in] scale The scale factor applied on all axes
- * @pre The Actor has been initialized.
- * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentScale().
- */
- void SetScale(float scale);
-
- /**
- * @brief Sets the scale factor applied to an actor.
- *
- * @SINCE_1_0.0
- * @param[in] scaleX The scale factor applied along the x-axis
- * @param[in] scaleY The scale factor applied along the y-axis
- * @param[in] scaleZ The scale factor applied along the z-axis
- * @pre The Actor has been initialized.
- * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentScale().
- */
- void SetScale(float scaleX, float scaleY, float scaleZ);
-
- /**
- * @brief Sets the scale factor applied to an actor.
- *
- * @SINCE_1_0.0
- * @param[in] scale A vector representing the scale factor for each axis
- * @pre The Actor has been initialized.
- * @note This is an asynchronous method; the value written may not match a value subsequently read with GetCurrentScale().
- */
- void SetScale(const Vector3& scale);
-
- /**
* @brief Applies a relative scale to an actor.
*
* @SINCE_1_0.0