Visual::Base visual = factory.CreateVisual( map );
DALI_TEST_CHECK( visual );
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
return actor;
}
application.GetPlatform().SetClosestImageSize( Vector2(imageDimensions.GetWidth(), imageDimensions.GetHeight()) );
}
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& newDummyImpl = static_cast< DummyControlImpl& >( newActor.GetImplementation() );
newDummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, newVisual );
- newActor.SetSize( 200.f, 200.f );
+ newActor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( newActor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( newActor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControl actor = DummyControl::New();
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add( actor );
DummyControl actor = DummyControl::New();
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
Stage::GetCurrent().Add( actor );
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- actor.SetSize(2000, 2000);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(2000, 2000) );
actor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
actor.SetProperty( Actor::Property::COLOR,Color::BLACK);
Stage::GetCurrent().Add(actor);
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
Stage::GetCurrent().Add( actor );
DummyControlImpl& dummyImpl = static_cast<DummyControlImpl&>(actor.GetImplementation());
dummyImpl.RegisterVisual( Control::CONTROL_PROPERTY_END_INDEX + 1, visual );
- actor.SetSize( 200.f, 200.f );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
DALI_TEST_EQUALS( actor.GetRendererCount(), 0u, TEST_LOCATION );
DALI_TEST_EQUALS( actor.IsResourceReady(), false, TEST_LOCATION );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
imageVisual.Reset();
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
application.SendNotification();
application.Render(0);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
application.SendNotification();
application.Render(0);
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
application.SendNotification();
application.Render(0);
imageVisualNever.Reset(); // reduce ref count so only the control keeps the visual alive.
imageVisualDestroyed.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
// Test initially zero renderers
application.SendNotification();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
application.SendNotification();
application.Render(0);
imageVisualDestroyed.Reset(); // reduce ref count so only the control keeps the visual alive.
imageVisualDetached.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
// Test initially zero renderers
application.SendNotification();
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
Stage::GetCurrent().Add( actor );
tet_infoline( "Ensure nothing triggers another load as texure already loaded" );
const unsigned int TIME_OUT_3_SECONDS = 3;
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual );
imageVisual.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
Stage::GetCurrent().Add( actor );
tet_infoline( "Allow image time to load" );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 1 ), true, TEST_LOCATION );
DummyControl actor = DummyControl::New(true);
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
tet_infoline( "Create visual with IMMEDIATE load policy" );
Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
DummyControl actor = DummyControl::New(true);
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
tet_infoline( "Create visual with IMMEDIATE load policy" );
Visual::Base imageVisual = CreateVisualWithPolicy( TEST_IMAGE_FILE_NAME, ImageVisual::Property::LOAD_POLICY, ImageVisual::LoadPolicy::IMMEDIATE );
tet_infoline( "Registering visual this should trigger the loading signal as is already image loaded for previous control" );
dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual2 );
imageVisual2.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor2.SetSize(200.f, 200.f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 0 ), true, TEST_LOCATION ); // Not expecting any further loading as texture is being reused.
DALI_TEST_EQUALS( gResourceReadySignalFired, true, TEST_LOCATION );
DummyControl actor = DummyControl::New(true);
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
Stage::GetCurrent().Add( actor );
tet_infoline( "Create visual with ATTACHED load policy" );
tet_infoline( "Registering visual this should trigger the loading signal as is already image loaded for previous control" );
dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual2 );
imageVisual2.Reset(); // reduce ref count so only the control keeps the visual alive.
- actor2.SetSize(200.f, 200.f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
DALI_TEST_EQUALS( Test::WaitForEventThreadTrigger( 0 ), true, TEST_LOCATION ); // Not expecting any further loading as texture is being reused.
DALI_TEST_EQUALS( gResourceReadySignalFired, true, TEST_LOCATION );
Impl::DummyControl& dummyImpl = static_cast< Impl::DummyControl& >( dummy.GetImplementation() );
dummyImpl.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual );
- dummy.SetSize( 200.f, 200.f );
+ dummy.SetProperty( Actor::Property::SIZE, Vector2( 200.f, 200.f ) );
dummy.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy );
DummyControl dummy1 = DummyControl::New( true );
Impl::DummyControl& dummyImpl1 = static_cast< Impl::DummyControl& >( dummy1.GetImplementation() );
dummyImpl1.RegisterVisual( DummyControl::Property::TEST_VISUAL, visual1 );
- dummy1.SetSize( 200, 200 );
+ dummy1.SetProperty( Actor::Property::SIZE, Vector2( 200, 200 ) );
dummy1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
Stage::GetCurrent().Add( dummy1 );
int actor1Id = actor.GetId();
actor.ResourceReadySignal().Connect( &ResourceReadySignal);
Impl::DummyControl& dummyImpl = static_cast<Impl::DummyControl&>(actor.GetImplementation());
- actor.SetSize(200.f, 200.f);
+ actor.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
Stage::GetCurrent().Add(actor);
tet_infoline( "Create visual with IMMEDIATE load policy" );
tet_infoline( "Registering visual this should trigger the ready signal when the image fails to load" );
dummyImpl2.RegisterVisual( DummyControl::Property::TEST_VISUAL, imageVisual2 );
- actor2.SetSize(200.f, 200.f);
+ actor2.SetProperty( Actor::Property::SIZE, Vector2(200.f, 200.f) );
Stage::GetCurrent().Add(actor2);
tet_infoline( "Wait for loading thread to finish");