// 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.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
+ 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);
// Render and notify a couple of times
DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.screenCenterPoint, 0.01f, TEST_LOCATION);
// Rotate actor again and render and notify
- actor.SetOrientation(Dali::Degree(180.0f), Vector3::ZAXIS);
+ actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(180.0f), Vector3::ZAXIS) );
application.SendNotification();
application.Render();
DALI_TEST_EQUALS(Vector2(20.0f, 20.0f), data.receivedGesture.screenCenterPoint, 0.01f, TEST_LOCATION);
// Rotate actor again and render and notify
- actor.SetOrientation(Dali::Degree(270.0f), Vector3::ZAXIS);
+ actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(270.0f), Vector3::ZAXIS) );
application.SendNotification();
application.Render();
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.SetOrientation(Dali::Degree(90.0f), Vector3::ZAXIS);
+ child.SetProperty( Actor::Property::ORIENTATION, Quaternion(Dali::Degree(90.0f), Vector3::ZAXIS) );
parent.Add(child);
TouchEventFunctor touchFunctor;
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();