{
MONO,
STEREO_HORIZONTAL,
- STEREO_VERTICAL,
- STEREO_INTERLACED
+ STEREO_VERTICAL
};
void ITs_application_startup(void)
{ "inheritOrientation", Actor::Property::INHERIT_ORIENTATION, Property::BOOLEAN },
{ "inheritScale", Actor::Property::INHERIT_SCALE, Property::BOOLEAN },
{ "colorMode", Actor::Property::COLOR_MODE, Property::STRING },
- { "positionInheritance", Actor::Property::POSITION_INHERITANCE, Property::STRING },
{ "drawMode", Actor::Property::DRAW_MODE, Property::STRING },
{ "sizeModeFactor", Actor::Property::SIZE_MODE_FACTOR, Property::VECTOR3 },
{ "widthResizePolicy", Actor::Property::WIDTH_RESIZE_POLICY, Property::STRING },
DaliLog::PrintPass();
}
-void ActorSetGetDrawModeSTENCIL()
-{
- Vector3 vec3Position( 1.0f, 2.0f, 3.0f );
- DrawMode::Type eSetDrawMode = DrawMode::STENCIL;
-
- Actor actor = Actor::New();
- DALI_CHECK_FAIL(!actor, "Actor::New() is failed ");
-
- actor.SetDrawMode(eSetDrawMode);
-
- actor.SetPosition( vec3Position );
- actor.SetParentOrigin( ParentOrigin::CENTER );
- actor.SetAnchorPoint( AnchorPoint::CENTER );
- actor.SetSize(vec3Position);
- Stage::GetCurrent().Add(actor);
-
- DrawMode::Type getDrawModeType = actor.GetDrawMode();
- DALI_CHECK_FAIL(getDrawModeType!=eSetDrawMode, "getDrawModeType mismatched with setDrawmode");
-
- Stage::GetCurrent().Remove(actor);
-
- DaliLog::PrintPass();
-}
-
void ActorSetGetDrawModeNORMAL()
{
Vector3 vec3Position( 1.0f, 2.0f, 3.0f );
{
Actor parentActor = Actor::New();
DALI_CHECK_FAIL(!parentActor, "Actor::New() is failed ");
-
+
parentActor.SetPosition(ACTOR_SET_POSITION);
parentActor.SetParentOrigin( ParentOrigin::CENTER );
parentActor.SetAnchorPoint( AnchorPoint::CENTER );
Stage::GetCurrent().Add(parentActor);
-
+
Actor childActor = Actor::New();
DALI_CHECK_FAIL(!childActor, "Actor::New() is failed ");
childActor.SetParentOrigin( ParentOrigin::CENTER );
childActor.SetAnchorPoint( AnchorPoint::CENTER );
childActor.SetPosition(ACTOR_CHILD_SET_POSITION);
- childActor.SetPositionInheritanceMode(INHERIT_PARENT_POSITION);
parentActor.Add(childActor);
- PositionInheritanceMode ePositionMode = childActor.GetPositionInheritanceMode();
-
- if(ePositionMode != INHERIT_PARENT_POSITION)
- {
- LOG_E("ePositionMode should be INHERIT_PARENT_POSITION");
- parentActor.Remove(childActor);
- test_return_value=TC_FAIL;
- return;
- }
+
g_Actor = parentActor;
}
void VTActorGetWorldPositionParent001()
Actor childActor = g_Actor.GetChildAt(0);
Vector3 vec3WorldPosition = childActor.GetCurrentWorldPosition();
if(vec3WorldPosition != (ACTOR_SET_POSITION+ACTOR_CHILD_SET_POSITION))
- {
- LOG_E("vec3WorldPosition should be sum of parent and child position");
- g_Actor.Remove(childActor);
- test_return_value=TC_FAIL;
- return;
+ {
+ LOG_E("vec3WorldPosition should be sum of parent and child position");
+ g_Actor.Remove(childActor);
+ test_return_value=TC_FAIL;
+ return;
}
- g_Actor.Remove(childActor);
+ g_Actor.Remove(childActor);
Stage::GetCurrent().Remove(g_Actor);
DaliLog::PrintPass();
{
Actor parentActor = Actor::New();
DALI_CHECK_FAIL(!parentActor, " Actor::New() is failed ");
-
+
parentActor.SetPosition(ACTOR_SET_POSITION);
parentActor.SetParentOrigin( ParentOrigin::CENTER );
parentActor.SetAnchorPoint( AnchorPoint::CENTER );
Stage::GetCurrent().Add(parentActor);
-
+
Actor childActor = Actor::New();
DALI_CHECK_FAIL(!childActor, "Actor::New() is failed ");
-
+
childActor.SetParentOrigin( ParentOrigin::CENTER );
childActor.SetAnchorPoint( AnchorPoint::CENTER );
- childActor.SetPosition(ACTOR_CHILD_SET_POSITION);
+ childActor.SetPosition(ACTOR_CHILD_SET_POSITION);
parentActor.Add(childActor);
- PositionInheritanceMode ePositionMode = childActor.GetPositionInheritanceMode();
-
- if(ePositionMode != INHERIT_PARENT_POSITION)
- {
- LOG_E("ePositionMode should be INHERIT_PARENT_POSITION");
- parentActor.Remove(childActor);
- test_return_value=TC_FAIL;
- return;
- }
+
g_Actor = parentActor;
}
void VTActorGetWorldPositionParent002()
Actor childActor = g_Actor.GetChildAt(0);
Vector3 vec3WorldPosition = childActor.GetCurrentWorldPosition();
if(vec3WorldPosition != (ACTOR_SET_POSITION+ACTOR_CHILD_SET_POSITION))
- {
- LOG_E("vec3WorldPosition should be sum of parent and child position");
- g_Actor.Remove(childActor);
- test_return_value=TC_FAIL;
- return;
+ {
+ LOG_E("vec3WorldPosition should be sum of parent and child position");
+ g_Actor.Remove(childActor);
+ test_return_value=TC_FAIL;
+ return;
}
childActor.SetInheritPosition( false );
{
Actor childActor = g_Actor.GetChildAt(0);
DALI_CHECK_FAIL(childActor.GetCurrentWorldPosition() != ACTOR_CHILD_SET_POSITION, "vec3WorldPosition should be parent position");
- g_Actor.Remove(childActor);
+ g_Actor.Remove(childActor);
Stage::GetCurrent().Remove(g_Actor);
-
+
DaliLog::PrintPass();
}
{
Actor parentActor = Actor::New();
DALI_CHECK_FAIL(!parentActor, " Actor::New() is failed ");
-
+
parentActor.SetPosition(ACTOR_SET_POSITION);
parentActor.SetParentOrigin( ParentOrigin::CENTER );
parentActor.SetAnchorPoint( AnchorPoint::CENTER );
Stage::GetCurrent().Add(parentActor);
-
+
Actor childActor = Actor::New();
DALI_CHECK_FAIL(!childActor, "Actor::New() is failed ");
childActor.SetParentOrigin( ParentOrigin::CENTER );
childActor.SetAnchorPoint( AnchorPoint::CENTER );
- childActor.SetPosition(ACTOR_CHILD_SET_POSITION);
+ childActor.SetPosition(ACTOR_CHILD_SET_POSITION);
parentActor.Add(childActor);
- PositionInheritanceMode ePositionMode = childActor.GetPositionInheritanceMode();
-
- if(ePositionMode != INHERIT_PARENT_POSITION)
- {
- LOG_E("ePositionMode should be INHERIT_PARENT_POSITION ");
- parentActor.Remove(childActor);
- test_return_value=TC_FAIL;
- return;
- }
-
+
g_Actor = parentActor;
}
void VTActorGetWorldPositionParentLocal001()
Vector3 vec3WorldPosition = childActor.GetCurrentWorldPosition();
if(vec3WorldPosition != (ACTOR_SET_POSITION+ACTOR_CHILD_SET_POSITION))
{
- LOG_E("vec3WorldPosition should be sum of parent and child position ");
- g_Actor.Remove(childActor);
- test_return_value=TC_FAIL;
- return;
+ LOG_E("vec3WorldPosition should be sum of parent and child position ");
+ g_Actor.Remove(childActor);
+ test_return_value=TC_FAIL;
+ return;
}
childActor.SetInheritPosition( false );
{
Actor childActor = g_Actor.GetChildAt(0);
DALI_CHECK_FAIL(childActor.GetCurrentWorldPosition() != ACTOR_CHILD_SET_OFFSET, "vec3WorldPosition should be sum of parent position and child offset");
- g_Actor.Remove(childActor);
+ g_Actor.Remove(childActor);
Stage::GetCurrent().Remove(g_Actor);
DaliLog::PrintPass();
Actor childActor = Actor::New();
DALI_CHECK_FAIL(!childActor, "Actor::New() is failed ");
-
+
childActor.SetParentOrigin( ParentOrigin::CENTER );
childActor.SetAnchorPoint( AnchorPoint::CENTER );
- childActor.SetPosition(ACTOR_CHILD_SET_POSITION);
+ childActor.SetPosition(ACTOR_CHILD_SET_POSITION);
parentActor.Add(childActor);
- PositionInheritanceMode ePositionMode = childActor.GetPositionInheritanceMode();
-
- if(ePositionMode != INHERIT_PARENT_POSITION)
- {
- LOG_E("ePositionMode should be INHERIT_PARENT_POSITION");
- parentActor.Remove(childActor);
- test_return_value=TC_FAIL;
- return;
- }
g_Actor = parentActor;
}
void VTActorGetWorldPositionNotInherited001()
{
Actor childActor = g_Actor.GetChildAt(0);
- Vector3 vec3WorldPosition = childActor.GetCurrentWorldPosition();
+ Vector3 vec3WorldPosition = childActor.GetCurrentWorldPosition();
if(vec3WorldPosition != (ACTOR_SET_POSITION+ACTOR_CHILD_SET_POSITION))
{
- LOG_E("vec3WorldPosition should be sum of parent and child position");
- g_Actor.Remove(childActor);
- test_return_value=TC_FAIL;
- return;
- }
-
- childActor.SetPositionInheritanceMode(DONT_INHERIT_POSITION);
- PositionInheritanceMode ePosMode = childActor.GetPositionInheritanceMode();
-
- if(ePosMode != DONT_INHERIT_POSITION)
- {
- LOG_E("ePositionMode should be DONT_INHERIT_POSITION");
- g_Actor.Remove(childActor);
- test_return_value=TC_FAIL;
- return;
+ LOG_E("vec3WorldPosition should be sum of parent and child position");
+ g_Actor.Remove(childActor);
+ test_return_value=TC_FAIL;
+ return;
}
+ childActor.SetInheritPosition( false );
childActor.SetPosition(ACTOR_CHILD_SET_OFFSET);
}
void VTActorGetWorldPositionNotInherited002()
{
Actor childActor = g_Actor.GetChildAt(0);
- DALI_CHECK_FAIL(childActor.GetCurrentWorldPosition() != ACTOR_CHILD_SET_OFFSET, "vec3WorldPosition should be child offset");
+ DALI_CHECK_FAIL(childActor.GetCurrentWorldPosition() != ACTOR_CHILD_SET_OFFSET, "vec3WorldPosition should be child offset");
Stage::GetCurrent().Remove(g_Actor);
-
+
DaliLog::PrintPass();
}
ACTOR_GET_PARENT,
ACTOR_FIND_CHILD_BY_NAME_ID,
ACTOR_ADD_UNPARENT,
- ACTOR_SET_GET_DRAWMODE_STENCIL,
ACTOR_SET_GET_DRAWMODE_NORMAL,
ACTOR_SET_IS_KEYBOARD_FOCUSABLE,
ACTOR_SET_IS_VISIBLE,
ActorAddUnparent();
break;
- case ACTOR_SET_GET_DRAWMODE_STENCIL:
- ActorSetGetDrawModeSTENCIL();
- break;
-
case ACTOR_SET_GET_DRAWMODE_NORMAL:
ActorSetGetDrawModeNORMAL();
break;
break;
}
break;
-
+
case ACTOR_GET_WORLDPOSITION_SET_GET_POSITION_INHERITANCE_MODE_INHERIT_PARENT_POSITION:
VTActorGetWorldPositionParent001();
mTimer.Stop();
VTActorGetWorldPositionParent002();
g_nRenderCount++;
break;
-
+
case 1:
VTActorGetWorldPositionParent003();
mTimer.Stop();
VTActorGetWorldPositionParentLocal001();
g_nRenderCount++;
break;
-
+
case 1:
VTActorGetWorldPositionParentLocal002();
mTimer.Stop();
VTActorGetWorldPositionNotInherited001();
g_nRenderCount++;
break;
-
+
case 1:
VTActorGetWorldPositionNotInherited002();
mTimer.Stop();
return test_return_value;
}
-//& purpose: Set and get the Actor's DrawMode for STENCIL
-//& type: auto
-/**
-* @testcase ITcActorSetGetDrawModeSTENCIL
-* @type Positive
-* @since_tizen 2.4
-* @description Set and get the Actor's DrawMode for STENCIL
-* @scenario Create an initialized Actor \n
-* Set the Actor's DrawMode to STENCIL \n
-* Get the Actor's DrawMode to STENCIL \n
-* Check the Actor's DrawMode \n
-* @apicovered Actor::New(), SetDrawMode, GetDrawMode
-* @passcase if set and get value is matched.
-* @failcase if set and get value is not matched.
-* @precondition NA
-* @postcondition NA
-*/
-
-int ITcActorSetGetDrawModeSTENCIL(void)
-{
- DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
- Application application = Application::New( &gArgc, &gArgv );
- CHECK_OPEN_GL(SUITE_NAME,__LINE__)
- Actor_TestApp testApp( application, ACTOR_SET_GET_DRAWMODE_STENCIL);
- application.MainLoop();
- return test_return_value;
-}
-
//& purpose: Set and get the Actor's DrawMode for NORMAL
//& type: auto
/**
* Get the world-position of the Actor \n
* Check the world-position of the Actor \n
* Remove child from it's parent \n
-* @apicovered Actor::New(),SetPosition, Add, GetPositionInheritanceMode,GetCurrentWorldPosition,SetPositionInheritanceMode
+* @apicovered Actor::New(),SetPosition, Add, GetCurrentWorldPosition
* @passcase if set and get value is matched.
* @failcase if set and get value is not matched.
* @precondition NA
* Get the world-position of the Actor \n
* Check the world-position of the Actor \n
* Remove child from it's parent
-* @apicovered Actor::New(),SetPosition, Add, GetPositionInheritanceMode,GetCurrentWorldPosition,SetPositionInheritanceMode
+* @apicovered Actor::New(),SetPosition, Add, GetCurrentWorldPosition
* @passcase if set and get value is matched.
* @failcase if set and get value is not matched.
* @precondition NA
* Get the world-position of the Actor \n
* Check the world-position of the Actor \n
* Remove child from it's parent
-* @apicovered Actor::New(),SetPosition, Add, GetPositionInheritanceMode,GetCurrentWorldPosition,SetPositionInheritanceMode
+* @apicovered Actor::New(),SetPosition, Add, GetCurrentWorldPosition
* @passcase if set and get value is matched.
* @failcase if set and get value is not matched.
* @precondition NA
* Get the world-position of the Actor \n
* Check the world-position of the Actor \n
* Remove child from it's parent \n
-* @apicovered Actor::New(),SetPosition, Add, GetPositionInheritanceMode,GetCurrentWorldPosition,SetPositionInheritanceMode
+* @apicovered Actor::New(),SetPosition, Add, GetCurrentWorldPosition
* @passcase if set and get value is matched.
* @failcase if set and get value is not matched.
* @precondition NA
Layer layer1 = Layer::New();
- DALI_CHECK_FAIL( layer1.GetBehavior() != Dali::Layer::LAYER_2D, "Layer Behavior Mismatch" );
+ DALI_CHECK_FAIL( layer1.GetBehavior() != Dali::Layer::LAYER_UI, "Layer Behavior Mismatch" );
layer1.SetBehavior( Dali::Layer::LAYER_3D );
DALI_CHECK_FAIL( layer1.GetBehavior() != Dali::Layer::LAYER_3D, "Layer Behavior Mismatch" );
extern int ITcActorGetParent(void);
extern int ITcActorFindChildByNameId(void);
extern int ITcActorAddUnparent(void);
-extern int ITcActorSetGetDrawModeSTENCIL(void);
extern int ITcActorSetGetDrawModeNORMAL(void);
extern int ITcActorSetIsKeyboardFocusable(void);
extern int ITcActorSetIsVisible(void);
{"ITcActorGetParent",ITcActorGetParent,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorFindChildByNameId",ITcActorFindChildByNameId,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorAddUnparent",ITcActorAddUnparent,ITs_actor_startup,ITs_actor_cleanup},
- {"ITcActorSetGetDrawModeSTENCIL",ITcActorSetGetDrawModeSTENCIL,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorSetGetDrawModeNORMAL",ITcActorSetGetDrawModeNORMAL,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorSetIsKeyboardFocusable",ITcActorSetIsKeyboardFocusable,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorSetIsVisible",ITcActorSetIsVisible,ITs_actor_startup,ITs_actor_cleanup},
extern int ITcActorGetParent(void);
extern int ITcActorFindChildByNameId(void);
extern int ITcActorAddUnparent(void);
-extern int ITcActorSetGetDrawModeSTENCIL(void);
extern int ITcActorSetGetDrawModeNORMAL(void);
extern int ITcActorSetIsKeyboardFocusable(void);
extern int ITcActorSetIsVisible(void);
{"ITcActorGetParent",ITcActorGetParent,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorFindChildByNameId",ITcActorFindChildByNameId,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorAddUnparent",ITcActorAddUnparent,ITs_actor_startup,ITs_actor_cleanup},
- {"ITcActorSetGetDrawModeSTENCIL",ITcActorSetGetDrawModeSTENCIL,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorSetGetDrawModeNORMAL",ITcActorSetGetDrawModeNORMAL,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorSetIsKeyboardFocusable",ITcActorSetIsKeyboardFocusable,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorSetIsVisible",ITcActorSetIsVisible,ITs_actor_startup,ITs_actor_cleanup},
extern int ITcActorGetParent(void);
extern int ITcActorFindChildByNameId(void);
extern int ITcActorAddUnparent(void);
-extern int ITcActorSetGetDrawModeSTENCIL(void);
extern int ITcActorSetGetDrawModeNORMAL(void);
extern int ITcActorSetIsKeyboardFocusable(void);
extern int ITcActorSetIsVisible(void);
{"ITcActorGetParent",ITcActorGetParent,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorFindChildByNameId",ITcActorFindChildByNameId,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorAddUnparent",ITcActorAddUnparent,ITs_actor_startup,ITs_actor_cleanup},
- {"ITcActorSetGetDrawModeSTENCIL",ITcActorSetGetDrawModeSTENCIL,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorSetGetDrawModeNORMAL",ITcActorSetGetDrawModeNORMAL,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorSetIsKeyboardFocusable",ITcActorSetIsKeyboardFocusable,ITs_actor_startup,ITs_actor_cleanup},
{"ITcActorSetIsVisible",ITcActorSetIsVisible,ITs_actor_startup,ITs_actor_cleanup},
const Vector2 VEC2_SET_SIZE(2.0f,5.0f);
ScrollView scrollview = ScrollView::New();
DALI_CHECK_FAIL(!scrollview, "Scrollview::New is failed");
- scrollview.SetDrawMode(Dali::DrawMode::STENCIL);
+ scrollview.SetDrawMode(Dali::DrawMode::OVERLAY_2D);
//Assignment
Scrollable scrollable = scrollview;
DALI_CHECK_FAIL(scrollable != scrollview, "Scrollable::Assignment is failed ");
- DALI_CHECK_FAIL(scrollable.GetDrawMode() != Dali::DrawMode::STENCIL, "Scrolable::Assignment property mismatched");
+ DALI_CHECK_FAIL(scrollable.GetDrawMode() != Dali::DrawMode::OVERLAY_2D, "Scrolable::Assignment property mismatched");
//CopyConstructor
scrollable.SetMinimumSize(VEC2_SET_SIZE);
const char* const PROPERTY_NAME_VERTICAL_ALIGNMENT = "verticalAlignment";
const char* const PROPERTY_NAME_TEXT_COLOR = "textColor";
const char* const PROPERTY_NAME_PLACEHOLDER_TEXT_COLOR = "placeholderTextColor";
-const char* const PROPERTY_NAME_SHADOW_OFFSET = "shadowOffset";
-const char* const PROPERTY_NAME_SHADOW_COLOR = "shadowColor";
const char* const PROPERTY_NAME_PRIMARY_CURSOR_COLOR = "primaryCursorColor";
const char* const PROPERTY_NAME_SECONDARY_CURSOR_COLOR = "secondaryCursorColor";
const char* const PROPERTY_NAME_ENABLE_CURSOR_BLINK = "enableCursorBlink";
DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_VERTICAL_ALIGNMENT ) != TextField::Property::VERTICAL_ALIGNMENT ,"Property index not match for VERTICAL_ALIGNMENT");
DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_TEXT_COLOR ) != TextField::Property::TEXT_COLOR ,"Property index not match for TEXT_COLOR");
DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER_TEXT_COLOR ) != TextField::Property::PLACEHOLDER_TEXT_COLOR ,"Property index not match for PLACEHOLDER_TEXT_COLOR");
- DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SHADOW_OFFSET ) != TextField::Property::SHADOW_OFFSET ,"Property index not match for SHADOW_OFFSET");
- DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SHADOW_COLOR ) != TextField::Property::SHADOW_COLOR ,"Property index not match for SHADOW_COLOR");
DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_PRIMARY_CURSOR_COLOR ) != TextField::Property::PRIMARY_CURSOR_COLOR ,"Property index not match for PRIMARY_CURSOR_COLOR");
DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SECONDARY_CURSOR_COLOR ) != TextField::Property::SECONDARY_CURSOR_COLOR ,"Property index not match for SECONDARY_CURSOR_COLOR");
DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_ENABLE_CURSOR_BLINK ) != TextField::Property::ENABLE_CURSOR_BLINK ,"Property index not match for ENABLE_CURSOR_BLINK");
textField.SetProperty( TextField::Property::PLACEHOLDER_TEXT_COLOR, Color::RED );
DALI_CHECK_FAIL( textField.GetProperty<Vector4>( TextField::Property::PLACEHOLDER_TEXT_COLOR ) != Color::RED, "Property value not match." );
- textField.SetProperty( TextField::Property::SHADOW_OFFSET, Vector2( 1.f, 1.f ) );
- DALI_CHECK_FAIL( textField.GetProperty<Vector2>( TextField::Property::SHADOW_OFFSET ) != Vector2( 1.f, 1.f ), "Property value not match." );
- textField.SetProperty( TextField::Property::SHADOW_COLOR, Color::GREEN );
- DALI_CHECK_FAIL( textField.GetProperty<Vector4>( TextField::Property::SHADOW_COLOR ) != Color::GREEN, "Property value not match." );
-
textField.SetProperty( TextField::Property::PRIMARY_CURSOR_COLOR, Color::RED );
DALI_CHECK_FAIL( textField.GetProperty<Vector4>( TextField::Property::PRIMARY_CURSOR_COLOR ) != Color::RED, "Property value not match." );
textField.SetProperty( TextField::Property::SECONDARY_CURSOR_COLOR, Color::BLUE );
label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLUE );
DALI_CHECK_FAIL( label.GetProperty<Vector4>( TextLabel::Property::TEXT_COLOR ) != Color::BLUE, "TextLabel color set/get failed." );
- DALI_CHECK_FAIL( label.GetProperty<Vector4>( TextLabel::Property::UNDERLINE_COLOR ) != Color::BLUE, "TextLabel color set/get failed." );
- label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 3.0f, 3.0f ) );
- DALI_CHECK_FAIL( label.GetProperty<Vector2>( TextLabel::Property::SHADOW_OFFSET ) != Vector2( 3.0f, 3.0f ), "TextLabel shadoe offset set/get failed." );
- label.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLUE );
- DALI_CHECK_FAIL( label.GetProperty<Vector4>( TextLabel::Property::SHADOW_COLOR ) != Color::BLUE, "TextLabel shadow color set/get failed." );
+ Property::Map shadowMapSet;
+ Property::Map shadowMapGet;
+ shadowMapSet.Insert( "color", Color::BLUE );
+ shadowMapSet.Insert( "offset", Vector2( 3.0f, 3.0f ) );
+ shadowMapSet.Insert( "blurRadius", 5.0f );
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMapSet );
- label.SetProperty( TextLabel::Property::UNDERLINE_ENABLED, true );
- DALI_CHECK_FAIL( !label.GetProperty<bool>( TextLabel::Property::UNDERLINE_ENABLED ), "TextLabel underline enable set/get failed." );
- label.SetProperty( TextLabel::Property::UNDERLINE_COLOR, Color::RED );
- DALI_CHECK_FAIL( label.GetProperty<Vector4>( TextLabel::Property::UNDERLINE_COLOR ) != Color::RED, "TextLabel underline color set/get failed." );
- label.SetProperty( TextLabel::Property::UNDERLINE_HEIGHT, 1.0f );
- DALI_CHECK_FAIL( label.GetProperty<float>( TextLabel::Property::UNDERLINE_HEIGHT ) != 1.0f, "TextLabel underline height set/get failed." );
+ shadowMapGet = label.GetProperty<Property::Map>( TextLabel::Property::SHADOW );
+ DALI_CHECK_FAIL( shadowMapGet.Count() != shadowMapSet.Count(), "TextLabel shadow set/get failed." );
+
+ Property::Map underlineMapSet;
+ Property::Map underlineMapGet;
+ underlineMapSet.Insert( "enable", "true" );
+ underlineMapSet.Insert( "color", "red" );
+ underlineMapSet.Insert( "height", "1.0" );
+ label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
+
+ underlineMapGet = label.GetProperty<Property::Map>( TextLabel::Property::UNDERLINE );
+ DALI_CHECK_FAIL( underlineMapGet.Count() != underlineMapSet.Count(), "TextLabel underline set/get failed." );
TextLabel label2 = TextLabel::New( "New text" );
DALI_CHECK_FAIL( !label2,"TextLabel TextLabel::New(const string) failed.");
const string STR_LABEL_TEXT = "Label Text";
const Vector2 VEC2_SHADOW_OFFSET( Vector2::ONE );
const float F_UNDERLINE_HEIGHT = 5.0f;
- float fGetUnderLineHeight = 0.0f;
-
- bool bEnableUnderLine = true, bCheckEnableUnderLine = false;
- Vector4 vec4ShadowColorGet, vec4UnderLineColorGet;
- Vector2 vec2ShadowOffSetGet;
+
+ bool bEnableUnderLine = true;
string strLabelTextGet = "";
TextLabel textLabel = TextLabel::New( STR_LABEL_TEXT );
DALI_CHECK_INSTANCE( textLabel, "TextLabel::New() is failed." );
-
- textLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, VEC2_SHADOW_OFFSET );
- textLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::CYAN );
- textLabel.SetProperty( TextLabel::Property::UNDERLINE_ENABLED, bEnableUnderLine );
- textLabel.SetProperty( TextLabel::Property::UNDERLINE_COLOR, Color::RED );
- textLabel.SetProperty( TextLabel::Property::UNDERLINE_HEIGHT, F_UNDERLINE_HEIGHT );
-
+
+
+ Property::Map shadowMapSet;
+ Property::Map shadowMapGet;
+ shadowMapSet.Insert( "color", Color::CYAN );
+ shadowMapSet.Insert( "offset", VEC2_SHADOW_OFFSET );
+ shadowMapSet.Insert( "blurRadius", 5.0f );
+ textLabel.SetProperty( TextLabel::Property::SHADOW, shadowMapSet );
+
+ Property::Map underlineMapSet;
+ Property::Map underlineMapGet;
+ underlineMapSet.Insert( "enable", bEnableUnderLine );
+ underlineMapSet.Insert( "color", Color::RED );
+ underlineMapSet.Insert( "height", F_UNDERLINE_HEIGHT );
+ textLabel.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
+
TextLabel textLabelCopy( textLabel );
DALI_CHECK_INSTANCE( textLabelCopy, "TextLabel handle is empty after copying." );
strLabelTextGet = textLabelCopy.GetProperty<string>( TextLabel::Property::TEXT );
DALI_CHECK_FAIL( strLabelTextGet != STR_LABEL_TEXT, "TextLabel::TextLabel(const TextLabel&) is failed along with set text." );
-
- vec2ShadowOffSetGet = textLabelCopy.GetProperty<Vector2>( TextLabel::Property::SHADOW_OFFSET );
- DALI_CHECK_FAIL( vec2ShadowOffSetGet != VEC2_SHADOW_OFFSET, "TextLabel::TextLabel(const TextLabel&) is failed along with set shadow offset." );
-
- vec4ShadowColorGet = textLabelCopy.GetProperty<Vector4>( TextLabel::Property::SHADOW_COLOR );
- DALI_CHECK_FAIL( vec4ShadowColorGet != Color::CYAN, "TextLabel::TextLabel(const TextLabel&) is failed along with set shadow color." );
-
- bCheckEnableUnderLine = textLabelCopy.GetProperty<bool>( TextLabel::Property::UNDERLINE_ENABLED );
- DALI_CHECK_FAIL( bCheckEnableUnderLine != bEnableUnderLine, "TextLabel::TextLabel(const TextLabel&) is failed along with set underline flag." );
-
- vec4UnderLineColorGet = textLabelCopy.GetProperty<Vector4>( TextLabel::Property::UNDERLINE_COLOR );
- DALI_CHECK_FAIL( vec4UnderLineColorGet != Color::RED, "TextLabel::TextLabel(const TextLabel&) is failed along with set underline color." );
-
- fGetUnderLineHeight = textLabelCopy.GetProperty<float>( TextLabel::Property::UNDERLINE_HEIGHT );
- DALI_CHECK_FAIL( fGetUnderLineHeight != F_UNDERLINE_HEIGHT, "TextLabel::TextLabel(const TextLabel&) is failed along with set underline height." );
-
+
+ shadowMapGet = textLabelCopy.GetProperty<Property::Map>( TextLabel::Property::SHADOW );
+ DALI_CHECK_FAIL( shadowMapGet.Count() != shadowMapSet.Count(), "TextLabel::TextLabel(const TextLabel&) is failed along with set shadow." );
+
+ underlineMapGet = textLabelCopy.GetProperty<Property::Map>( TextLabel::Property::UNDERLINE );
+ DALI_CHECK_FAIL( underlineMapGet.Count() != underlineMapSet.Count(), "TextLabel::TextLabel(const TextLabel&) is failed along with set underline." );
+
DaliLog::PrintPass();
}
mApplication.SetViewMode(STEREO_HORIZONTAL);
mApplication.SetViewMode(STEREO_VERTICAL);
-
- mApplication.SetViewMode(STEREO_INTERLACED);
}
void TestStereoBase()
{ "inheritOrientation", Actor::Property::INHERIT_ORIENTATION, Property::BOOLEAN },
{ "inheritScale", Actor::Property::INHERIT_SCALE, Property::BOOLEAN },
{ "colorMode", Actor::Property::COLOR_MODE, Property::STRING },
- { "positionInheritance", Actor::Property::POSITION_INHERITANCE, Property::STRING },
{ "drawMode", Actor::Property::DRAW_MODE, Property::STRING },
{ "sizeModeFactor", Actor::Property::SIZE_MODE_FACTOR, Property::VECTOR3 },
{ "widthResizePolicy", Actor::Property::WIDTH_RESIZE_POLICY, Property::STRING },
childActor.SetParentOrigin( ParentOrigin::CENTER );
childActor.SetAnchorPoint( AnchorPoint::CENTER );
childActor.SetPosition(ACTOR_CHILD_SET_POSITION);
- childActor.SetPositionInheritanceMode(INHERIT_PARENT_POSITION);
parentActor.Add(childActor);
- PositionInheritanceMode ePositionMode = childActor.GetPositionInheritanceMode();
- if(ePositionMode != INHERIT_PARENT_POSITION)
- {
- LOG_E("ePositionMode should be INHERIT_PARENT_POSITION");
- parentActor.Remove(childActor);
- test_return_value=TC_FAIL;
- return;
- }
gActor = parentActor;
}
DaliLog::PrintPass();
}
-void ActorSetPositionInheritanceModeP()
-{
- Actor parentActor = Actor::New();
- DALI_CHECK_FAIL(!parentActor, "Actor::New() is failed ");
-
- parentActor.SetPosition(ACTOR_SET_POSITION);
- parentActor.SetParentOrigin( ParentOrigin::CENTER );
- parentActor.SetAnchorPoint( AnchorPoint::CENTER );
- Stage::GetCurrent().Add(parentActor);
-
- Actor childActor = Actor::New();
- DALI_CHECK_FAIL(!childActor, "Actor::New() is failed ");
- childActor.SetParentOrigin( ParentOrigin::CENTER );
- childActor.SetAnchorPoint( AnchorPoint::CENTER );
- childActor.SetPosition(ACTOR_CHILD_SET_POSITION);
- childActor.SetPositionInheritanceMode(INHERIT_PARENT_POSITION);
- parentActor.Add(childActor);
- PositionInheritanceMode ePositionMode = childActor.GetPositionInheritanceMode();
-
- if(ePositionMode != INHERIT_PARENT_POSITION)
- {
- LOG_E("ePositionMode should be INHERIT_PARENT_POSITION");
- parentActor.Remove(childActor);
- test_return_value=TC_FAIL;
- return;
- }
- gActor = parentActor;
-}
-
-void ActorGetPositionInheritanceModeP()
-{
- Actor parentActor = Actor::New();
- DALI_CHECK_FAIL(!parentActor, "Actor::New() is failed ");
-
- parentActor.SetPosition(ACTOR_SET_POSITION);
- parentActor.SetParentOrigin( ParentOrigin::CENTER );
- parentActor.SetAnchorPoint( AnchorPoint::CENTER );
- Stage::GetCurrent().Add(parentActor);
-
- Actor childActor = Actor::New();
- DALI_CHECK_FAIL(!childActor, "Actor::New() is failed ");
- childActor.SetParentOrigin( ParentOrigin::CENTER );
- childActor.SetAnchorPoint( AnchorPoint::CENTER );
- childActor.SetPosition(ACTOR_CHILD_SET_POSITION);
- childActor.SetPositionInheritanceMode(INHERIT_PARENT_POSITION);
- parentActor.Add(childActor);
- PositionInheritanceMode ePositionMode = childActor.GetPositionInheritanceMode();
-
- if(ePositionMode != INHERIT_PARENT_POSITION)
- {
- LOG_E("ePositionMode should be INHERIT_PARENT_POSITION");
- parentActor.Remove(childActor);
- test_return_value=TC_FAIL;
- return;
- }
- gActor = parentActor;
-}
-
void ActorSetPositionP()
{
gActor = Actor::New();
ACTOR_SET_PARENT_ORIGIN_P,
ACTOR_GET_CURRENT_PARENT_ORIGIN_P,
ACTOR_GET_CURRENT_WORLD_POSITION_P,
- ACTOR_SET_POSITION_INHERITANCE_MODE_P,
- ACTOR_GET_POSITION_INHERITANCE_MODE_P,
ACTOR_SET_POSITION_P,
ACTOR_SET_POSITION_P2,
ACTOR_SET_POSITION_P3,
ActorGetCurrentWorldPositionP();
break;
- case ACTOR_SET_POSITION_INHERITANCE_MODE_P:
- ActorSetPositionInheritanceModeP();
- break;
-
- case ACTOR_GET_POSITION_INHERITANCE_MODE_P:
- ActorGetPositionInheritanceModeP();
- break;
-
case ACTOR_SET_POSITION_P:
ActorSetPositionP();
break;
mApplication.Quit();
break;
- case ACTOR_SET_POSITION_INHERITANCE_MODE_P:
- VTActorGetWorldPositionParent001();
- mTimer.Stop();
- mApplication.Quit();
- break;
-
- case ACTOR_GET_POSITION_INHERITANCE_MODE_P:
- VTActorGetWorldPositionParent001();
- mTimer.Stop();
- mApplication.Quit();
- break;
-
case ACTOR_SET_INHERIT_SCALE_P:
switch (gRenderCount)
{
return test_return_value;
}
-/**
- * @testcase UtcDaliActorSetPositionInheritanceModeP
- * @since_tizen 2.4
- * @description check if SetPositionInheritanceMode api works or not.
- */
-
-int UtcDaliActorSetPositionInheritanceModeP(void)
-{
- DaliLog::PrintExecStarted( SUITE_NAME, __FUNCTION__ );
-
- Application application = Application::New( &gArgc, &gArgv);
- CHECK_GL;
- Actor_TestApp testApp(application, ACTOR_SET_POSITION_INHERITANCE_MODE_P );
- application.MainLoop();
-
- return test_return_value;
-}
-
-/**
- * @testcase UtcDaliActorGetPositionInheritanceModeP
- * @since_tizen 2.4
- * @description check if GetPositionInheritanceMode api works or not.
- */
-
-int UtcDaliActorGetPositionInheritanceModeP(void)
-{
- DaliLog::PrintExecStarted( SUITE_NAME, __FUNCTION__ );
-
- Application application = Application::New( &gArgc, &gArgv);
- CHECK_GL;
- Actor_TestApp testApp(application, ACTOR_GET_POSITION_INHERITANCE_MODE_P );
- application.MainLoop();
-
- return test_return_value;
-}
-
/**
* @testcase UtcDaliActorSetPositionP
* @since_tizen 2.4
{
Layer layer = Layer::New();
- DALI_CHECK_FAIL(layer.GetBehavior() != Dali::Layer::LAYER_2D, "setbehavior and getbehavior mismatch" );
+ DALI_CHECK_FAIL(layer.GetBehavior() != Dali::Layer::LAYER_UI, "setbehavior and getbehavior mismatch" );
layer.SetBehavior(Dali::Layer::LAYER_3D );
DALI_CHECK_FAIL(layer.GetBehavior() != Dali::Layer::LAYER_3D, "setbehavior and getbehavior mismatch" );
DaliLog::PrintPass();
{
Layer layer = Layer::New();
- DALI_CHECK_FAIL(layer.GetBehavior() != Dali::Layer::LAYER_2D, "setbehavior and getbehavior mismatch" );
+ DALI_CHECK_FAIL(layer.GetBehavior() != Dali::Layer::LAYER_UI, "setbehavior and getbehavior mismatch" );
layer.SetBehavior(Dali::Layer::LAYER_3D );
DALI_CHECK_FAIL(layer.GetBehavior() != Dali::Layer::LAYER_3D, "setbehavior and getbehavior mismatch" );
DaliLog::PrintPass();
extern int UtcDaliActorSetParentOriginP(void);
extern int UtcDaliActorGetCurrentParentOriginP(void);
extern int UtcDaliActorGetCurrentWorldPositionP(void);
-extern int UtcDaliActorSetPositionInheritanceModeP(void);
-extern int UtcDaliActorGetPositionInheritanceModeP(void);
extern int UtcDaliActorSetPositionP(void);
extern int UtcDaliActorSetPositionP2(void);
extern int UtcDaliActorSetPositionP3(void);
{"UtcDaliActorSetParentOriginP",UtcDaliActorSetParentOriginP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorGetCurrentParentOriginP",UtcDaliActorGetCurrentParentOriginP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorGetCurrentWorldPositionP",UtcDaliActorGetCurrentWorldPositionP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
- {"UtcDaliActorSetPositionInheritanceModeP",UtcDaliActorSetPositionInheritanceModeP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
- {"UtcDaliActorGetPositionInheritanceModeP",UtcDaliActorGetPositionInheritanceModeP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorSetPositionP",UtcDaliActorSetPositionP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorSetPositionP2",UtcDaliActorSetPositionP2,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorSetPositionP3",UtcDaliActorSetPositionP3,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
extern int UtcDaliActorSetParentOriginP(void);
extern int UtcDaliActorGetCurrentParentOriginP(void);
extern int UtcDaliActorGetCurrentWorldPositionP(void);
-extern int UtcDaliActorSetPositionInheritanceModeP(void);
-extern int UtcDaliActorGetPositionInheritanceModeP(void);
extern int UtcDaliActorSetPositionP(void);
extern int UtcDaliActorSetPositionP2(void);
extern int UtcDaliActorSetPositionP3(void);
{"UtcDaliActorSetParentOriginP",UtcDaliActorSetParentOriginP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorGetCurrentParentOriginP",UtcDaliActorGetCurrentParentOriginP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorGetCurrentWorldPositionP",UtcDaliActorGetCurrentWorldPositionP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
- {"UtcDaliActorSetPositionInheritanceModeP",UtcDaliActorSetPositionInheritanceModeP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
- {"UtcDaliActorGetPositionInheritanceModeP",UtcDaliActorGetPositionInheritanceModeP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorSetPositionP",UtcDaliActorSetPositionP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorSetPositionP2",UtcDaliActorSetPositionP2,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorSetPositionP3",UtcDaliActorSetPositionP3,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
extern int UtcDaliActorSetParentOriginP(void);
extern int UtcDaliActorGetCurrentParentOriginP(void);
extern int UtcDaliActorGetCurrentWorldPositionP(void);
-extern int UtcDaliActorSetPositionInheritanceModeP(void);
-extern int UtcDaliActorGetPositionInheritanceModeP(void);
extern int UtcDaliActorSetPositionP(void);
extern int UtcDaliActorSetPositionP2(void);
extern int UtcDaliActorSetPositionP3(void);
{"UtcDaliActorSetParentOriginP",UtcDaliActorSetParentOriginP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorGetCurrentParentOriginP",UtcDaliActorGetCurrentParentOriginP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorGetCurrentWorldPositionP",UtcDaliActorGetCurrentWorldPositionP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
- {"UtcDaliActorSetPositionInheritanceModeP",UtcDaliActorSetPositionInheritanceModeP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
- {"UtcDaliActorGetPositionInheritanceModeP",UtcDaliActorGetPositionInheritanceModeP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorSetPositionP",UtcDaliActorSetPositionP,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorSetPositionP2",UtcDaliActorSetPositionP2,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
{"UtcDaliActorSetPositionP3",UtcDaliActorSetPositionP3,utc_Dali_Actor_startup,utc_Dali_Actor_cleanup},
const Vector2 VEC2_SET_SIZE(2.0f,5.0f);
ScrollView scrollview = ScrollView::New();
DALI_CHECK_FAIL(!scrollview, "Scrollview::New is failed");
- scrollview.SetDrawMode(Dali::DrawMode::STENCIL);
Scrollable scrollable = scrollview;
Scrollable scrollablenew (scrollable);
const Vector2 VEC2_SET_SIZE(2.0f,5.0f);
ScrollView scrollview = ScrollView::New();
DALI_CHECK_FAIL(!scrollview, "Scrollview::New is failed");
- scrollview.SetDrawMode(Dali::DrawMode::STENCIL);
+ scrollview.SetDrawMode(Dali::DrawMode::OVERLAY_2D);
//Assignment
Scrollable scrollable = scrollview;
DALI_CHECK_FAIL(scrollable != scrollview, "Scrollable::Assignment is failed ");
- DALI_CHECK_FAIL(scrollable.GetDrawMode() != Dali::DrawMode::STENCIL, "Scrolable::Assignment property mismatched");
+ DALI_CHECK_FAIL(scrollable.GetDrawMode() != Dali::DrawMode::OVERLAY_2D, "Scrolable::Assignment property mismatched");
DaliLog::PrintPass();
}