+ // Check Property Indices are correct
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_RENDERING_BACKEND ) == TextLabel::Property::RENDERING_BACKEND );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_TEXT ) == TextLabel::Property::TEXT );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_FONT_FAMILY ) == TextLabel::Property::FONT_FAMILY );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_FONT_STYLE ) == TextLabel::Property::FONT_STYLE );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_POINT_SIZE ) == TextLabel::Property::POINT_SIZE );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_MULTI_LINE ) == TextLabel::Property::MULTI_LINE );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_HORIZONTAL_ALIGNMENT ) == TextLabel::Property::HORIZONTAL_ALIGNMENT );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_VERTICAL_ALIGNMENT ) == TextLabel::Property::VERTICAL_ALIGNMENT );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_TEXT_COLOR ) == TextLabel::Property::TEXT_COLOR );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_ENABLE_MARKUP) == TextLabel::Property::ENABLE_MARKUP );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_ENABLE_AUTO_SCROLL ) == TextLabel::Property::ENABLE_AUTO_SCROLL );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_ENABLE_AUTO_SCROLL_SPEED ) == TextLabel::Property::AUTO_SCROLL_SPEED );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_ENABLE_AUTO_SCROLL_LOOPS ) == TextLabel::Property::AUTO_SCROLL_LOOP_COUNT );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_ENABLE_AUTO_SCROLL_GAP ) == TextLabel::Property::AUTO_SCROLL_GAP );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_LINE_SPACING ) == TextLabel::Property::LINE_SPACING );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_UNDERLINE ) == TextLabel::Property::UNDERLINE );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_SHADOW ) == TextLabel::Property::SHADOW );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_EMBOSS ) == TextLabel::Property::EMBOSS );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_OUTLINE ) == TextLabel::Property::OUTLINE );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_BACKGROUND ) == DevelTextLabel::Property::BACKGROUND );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_PIXEL_SIZE ) == TextLabel::Property::PIXEL_SIZE );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_ELLIPSIS ) == TextLabel::Property::ELLIPSIS );
+ DALI_TEST_CHECK( label.GetPropertyIndex( PROPERTY_NAME_AUTO_SCROLL_LOOP_DELAY ) == TextLabel::Property::AUTO_SCROLL_LOOP_DELAY );
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextLabelSetPropertyP(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextLabelSetPropertyP");
+ TextLabel label = TextLabel::New();
+ DALI_TEST_CHECK( label );
+
+ Stage::GetCurrent().Add( label );
+
+ // Note - we can't check the defaults since the stylesheets are platform-specific
+ label.SetProperty( TextLabel::Property::RENDERING_BACKEND, Text::RENDERING_SHARED_ATLAS );
+ DALI_TEST_EQUALS( (Text::RenderingType)label.GetProperty<int>( TextLabel::Property::RENDERING_BACKEND ), Text::RENDERING_SHARED_ATLAS, TEST_LOCATION );
+
+ // Check that text can be correctly reset
+ label.SetProperty( TextLabel::Property::TEXT, "Setting Text" );
+ DALI_TEST_EQUALS( label.GetProperty<std::string>( TextLabel::Property::TEXT ), std::string("Setting Text"), TEST_LOCATION );
+
+ // Check font properties.
+ label.SetProperty( TextLabel::Property::FONT_FAMILY, "Setting font family" );
+ DALI_TEST_EQUALS( label.GetProperty<std::string>( TextLabel::Property::FONT_FAMILY ), std::string("Setting font family"), TEST_LOCATION );
+
+ Property::Map fontStyleMapSet;
+ Property::Map fontStyleMapGet;
+
+ fontStyleMapSet.Insert( "weight", "bold" );
+ fontStyleMapSet.Insert( "width", "condensed" );
+ fontStyleMapSet.Insert( "slant", "italic" );
+ label.SetProperty( TextLabel::Property::FONT_STYLE, fontStyleMapSet );
+
+ fontStyleMapGet = label.GetProperty<Property::Map>( TextLabel::Property::FONT_STYLE );
+ DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+
+ // Check the old font style format.
+ fontStyleMapSet.Clear();
+ fontStyleMapSet.Insert( "weight", "thin" );
+ fontStyleMapSet.Insert( "width", "expanded" );
+ fontStyleMapSet.Insert( "slant", "oblique" );
+ const std::string strFontStyle = "{\"weight\":\"thin\",\"width\":\"expanded\",\"slant\":\"oblique\"}";
+
+ label.SetProperty( TextLabel::Property::FONT_STYLE, "{\"weight\":\"thin\",\"width\":\"expanded\",\"slant\":\"oblique\"}" );
+ std::string getFontStyle = label.GetProperty<std::string>( TextLabel::Property::FONT_STYLE );
+ DALI_TEST_EQUALS( getFontStyle, strFontStyle, TEST_LOCATION );
+
+ label.SetProperty( TextLabel::Property::POINT_SIZE, 10.f );
+ DALI_TEST_EQUALS( label.GetProperty<float>( TextLabel::Property::POINT_SIZE ), 10.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+
+ // Reset font style.
+ fontStyleMapSet.Clear();
+ fontStyleMapSet.Insert( "weight", "normal" );
+ fontStyleMapSet.Insert( "slant", "oblique" );
+
+ label.SetProperty( TextLabel::Property::FONT_STYLE, fontStyleMapSet );
+ fontStyleMapGet = label.GetProperty<Property::Map>( TextLabel::Property::FONT_STYLE );
+ DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+
+ fontStyleMapSet.Clear();
+ fontStyleMapSet.Insert( "slant", "roman" );
+
+ label.SetProperty( TextLabel::Property::FONT_STYLE, fontStyleMapSet );
+ fontStyleMapGet = label.GetProperty<Property::Map>( TextLabel::Property::FONT_STYLE );
+ DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
+
+ // Replace 'roman' for 'normal'.
+ Property::Value* slantValue = fontStyleMapGet.Find( "slant" );
+ if( NULL != slantValue )
+ {
+ if( "normal" == slantValue->Get<std::string>() )
+ {
+ fontStyleMapGet["slant"] = "roman";
+ }
+ }
+ DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+
+ fontStyleMapSet.Clear();
+
+ label.SetProperty( TextLabel::Property::FONT_STYLE, fontStyleMapSet );
+ fontStyleMapGet = label.GetProperty<Property::Map>( TextLabel::Property::FONT_STYLE );
+ DALI_TEST_EQUALS( fontStyleMapGet.Count(), fontStyleMapSet.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( DaliTestCheckMaps( fontStyleMapGet, fontStyleMapSet ), true, TEST_LOCATION );
+
+ // Toggle multi-line
+ label.SetProperty( TextLabel::Property::MULTI_LINE, true );
+ DALI_TEST_EQUALS( label.GetProperty<bool>( TextLabel::Property::MULTI_LINE ), true, TEST_LOCATION );
+
+ // Check that the Alignment properties can be correctly set
+ label.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
+ DALI_TEST_EQUALS( label.GetProperty<std::string>( TextLabel::Property::HORIZONTAL_ALIGNMENT ), "CENTER", TEST_LOCATION );
+ label.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
+ DALI_TEST_EQUALS( label.GetProperty<std::string>( TextLabel::Property::VERTICAL_ALIGNMENT ), "CENTER", TEST_LOCATION );
+
+ // Check that text color can be properly set
+ label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLUE );
+ DALI_TEST_EQUALS( label.GetProperty<Vector4>( TextLabel::Property::TEXT_COLOR ), Color::BLUE, TEST_LOCATION );
+
+ Property::Map underlineMapSet;
+ Property::Map underlineMapGet;
+
+ underlineMapSet.Insert( "enable", false );
+ underlineMapSet.Insert( "color", Color::BLUE );
+ underlineMapSet.Insert( "height", 0 );
+
+ underlineMapGet = label.GetProperty<Property::Map>( TextLabel::Property::UNDERLINE );
+ DALI_TEST_EQUALS( underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( DaliTestCheckMaps( underlineMapGet, underlineMapSet ), true, TEST_LOCATION );
+
+ TextLabel label2 = TextLabel::New( "New text" );
+ DALI_TEST_CHECK( label2 );
+ DALI_TEST_EQUALS( label2.GetProperty<std::string>( TextLabel::Property::TEXT ), std::string("New text"), TEST_LOCATION );
+
+ // Check the enable markup property.
+ DALI_TEST_CHECK( !label.GetProperty<bool>( TextLabel::Property::ENABLE_MARKUP ) );
+ label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true );
+ DALI_TEST_CHECK( label.GetProperty<bool>( TextLabel::Property::ENABLE_MARKUP ) );
+
+ // Check the text property when markup is enabled
+ label.SetProperty( TextLabel::Property::TEXT, "<color value='white'>Markup</color><color value='cyan'>Text</color>" );
+ DALI_TEST_EQUALS( label.GetProperty<std::string>( TextLabel::Property::TEXT ), std::string("MarkupText"), TEST_LOCATION );
+
+ application.SendNotification();
+ application.Render();
+
+ // Check autoscroll properties
+ const int SCROLL_SPEED = 80;
+ const int SCROLL_LOOPS = 4;
+ const float SCROLL_GAP = 50.0f;
+ const float SCROLL_LOOP_DELAY = 0.3f;
+ const std::string STOP_IMMEDIATE = std::string( "IMMEDIATE" );
+ const std::string STOP_FINISH_LOOP = std::string( "FINISH_LOOP" );
+
+ label.SetProperty( TextLabel::Property::MULTI_LINE, false ); // Autoscroll only supported in single line
+ DALI_TEST_CHECK( !label.GetProperty<bool>( TextLabel::Property::ENABLE_AUTO_SCROLL ) );
+ label.SetProperty( TextLabel::Property::ENABLE_AUTO_SCROLL, true );
+ DALI_TEST_CHECK( label.GetProperty<bool>( TextLabel::Property::ENABLE_AUTO_SCROLL ) );
+ label.SetProperty( TextLabel::Property::AUTO_SCROLL_SPEED, SCROLL_SPEED );
+ DALI_TEST_EQUALS( SCROLL_SPEED, label.GetProperty<int>( TextLabel::Property::AUTO_SCROLL_SPEED ), TEST_LOCATION );
+ label.SetProperty( TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, SCROLL_LOOPS );
+ DALI_TEST_EQUALS( SCROLL_LOOPS, label.GetProperty<int>( TextLabel::Property::AUTO_SCROLL_LOOP_COUNT ), TEST_LOCATION );
+ label.SetProperty( TextLabel::Property::AUTO_SCROLL_GAP, SCROLL_GAP );
+ DALI_TEST_EQUALS( SCROLL_GAP, label.GetProperty<float>( TextLabel::Property::AUTO_SCROLL_GAP ), TEST_LOCATION );
+ label.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_DELAY, SCROLL_LOOP_DELAY );
+ DALI_TEST_EQUALS( SCROLL_LOOP_DELAY, label.GetProperty<float>( TextLabel::Property::AUTO_SCROLL_LOOP_DELAY ), TEST_LOCATION );
+
+ //Check autoscroll stop type property
+ label.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::IMMEDIATE );
+ DALI_TEST_EQUALS( STOP_IMMEDIATE, label.GetProperty<std::string>( TextLabel::Property::AUTO_SCROLL_STOP_MODE ), TEST_LOCATION );
+
+ label.SetProperty( TextLabel::Property::AUTO_SCROLL_STOP_MODE, TextLabel::AutoScrollStopMode::FINISH_LOOP );
+ DALI_TEST_EQUALS( STOP_FINISH_LOOP, label.GetProperty<std::string>( TextLabel::Property::AUTO_SCROLL_STOP_MODE ), TEST_LOCATION );
+
+ // test natural size with multi-line and line spacing
+ {
+ TextLabel label3 = TextLabel::New("Some text here\nend there\nend here");
+ Vector3 oneLineNaturalSize = label3.GetNaturalSize();
+ label3.SetProperty(TextLabel::Property::MULTI_LINE, true);
+ label3.SetProperty(TextLabel::Property::LINE_SPACING, 0);
+ Vector3 multiLineNaturalSize = label3.GetNaturalSize();
+
+ // The width of the text when multi-line is enabled will be smaller (lines separated on '\n')
+ // The height of the text when multi-line is enabled will be larger
+ DALI_TEST_CHECK( oneLineNaturalSize.width > multiLineNaturalSize.width );
+ DALI_TEST_CHECK( oneLineNaturalSize.height < multiLineNaturalSize.height );
+
+ // Change line spacing, meaning height will increase by 3 times the amount specified as we have three lines
+ // Everything else will remain the same
+ int lineSpacing = 20;
+ label3.SetProperty( TextLabel::Property::LINE_SPACING, lineSpacing );
+ Vector3 expectedAfterLineSpacingApplied( multiLineNaturalSize );
+ expectedAfterLineSpacingApplied.height += 3 * lineSpacing;
+ DALI_TEST_EQUALS( expectedAfterLineSpacingApplied, label3.GetNaturalSize(), TEST_LOCATION );
+ }
+
+ // single line, line spacing must not affect natural size of the text, only add the spacing to the height
+ {
+ TextLabel label3 = TextLabel::New("Some text here end there end here");
+ label3.SetProperty(TextLabel::Property::MULTI_LINE, false);
+ label3.SetProperty(TextLabel::Property::LINE_SPACING, 0);
+ Vector3 textNaturalSize = label3.GetNaturalSize();
+ int lineSpacing = 20;
+ label3.SetProperty( TextLabel::Property::LINE_SPACING, lineSpacing );
+ Vector3 expectedNaturalSizeWithLineSpacing( textNaturalSize );
+ expectedNaturalSizeWithLineSpacing.height += lineSpacing;
+ DALI_TEST_EQUALS( expectedNaturalSizeWithLineSpacing, label3.GetNaturalSize(), TEST_LOCATION );
+ }
+ // Check the line spacing property
+ DALI_TEST_EQUALS( label.GetProperty<float>( TextLabel::Property::LINE_SPACING ), 0.0f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+ label.SetProperty( TextLabel::Property::LINE_SPACING, 10.f );
+ DALI_TEST_EQUALS( label.GetProperty<float>( TextLabel::Property::LINE_SPACING ), 10.0f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+
+ // Check the underline property
+ underlineMapSet.Clear();
+ underlineMapSet.Insert( "enable", true );
+ underlineMapSet.Insert( "color", Color::RED );
+ underlineMapSet.Insert( "height", 1 );
+
+ label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
+
+ application.SendNotification();
+ application.Render();
+
+ underlineMapGet = label.GetProperty<Property::Map>( TextLabel::Property::UNDERLINE );
+ DALI_TEST_EQUALS( underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( DaliTestCheckMaps( underlineMapGet, underlineMapSet ), true, TEST_LOCATION );
+
+ underlineMapSet.Clear();
+ underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::ENABLE, true );
+ underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::COLOR, Color::GREEN );
+ underlineMapSet.Insert( Toolkit::DevelText::Underline::Property::HEIGHT, 2 );
+
+ label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
+
+ application.SendNotification();
+ application.Render();
+
+ underlineMapGet = label.GetProperty<Property::Map>( TextLabel::Property::UNDERLINE );
+ DALI_TEST_EQUALS( underlineMapGet.Count(), underlineMapSet.Count(), TEST_LOCATION );
+ std::vector<std::string> underlineIndicesConversionTable = { "enable", "color", "height" };
+ DALI_TEST_EQUALS( DaliTestCheckMaps( underlineMapGet, underlineMapSet, underlineIndicesConversionTable ), true, TEST_LOCATION );
+
+ underlineMapSet.Clear();
+
+ Property::Map underlineDisabledMapGet;
+ underlineDisabledMapGet.Insert( "enable", false );
+ underlineDisabledMapGet.Insert( "color", Color::GREEN );
+ underlineDisabledMapGet.Insert( "height", 2 );
+
+ label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
+
+ application.SendNotification();
+ application.Render();
+
+ underlineMapGet = label.GetProperty<Property::Map>( TextLabel::Property::UNDERLINE );
+ DALI_TEST_EQUALS( underlineMapGet.Count(), underlineDisabledMapGet.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( DaliTestCheckMaps( underlineMapGet, underlineDisabledMapGet ), true, TEST_LOCATION );
+
+ // Check the shadow property
+
+ Property::Map shadowMapSet;
+ Property::Map shadowMapGet;
+
+ shadowMapSet.Insert( "color", Color::GREEN );
+ shadowMapSet.Insert( "offset", Vector2(2.0f, 2.0f) );
+ shadowMapSet.Insert( "blurRadius", 5.0f );
+
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMapSet );
+
+ shadowMapGet = label.GetProperty<Property::Map>( TextLabel::Property::SHADOW );
+ DALI_TEST_EQUALS( shadowMapGet.Count(), shadowMapSet.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( DaliTestCheckMaps( shadowMapGet, shadowMapSet ), true, TEST_LOCATION );
+
+ shadowMapSet.Clear();
+
+ shadowMapSet.Insert( Toolkit::DevelText::Shadow::Property::COLOR, Color::BLUE );
+ shadowMapSet.Insert( Toolkit::DevelText::Shadow::Property::OFFSET, "3.0 3.0" );
+ shadowMapSet.Insert( Toolkit::DevelText::Shadow::Property::BLUR_RADIUS, 3.0f );
+
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMapSet );
+
+ // Replace the offset (string) by a vector2
+ shadowMapSet.Clear();
+ shadowMapSet.Insert( Toolkit::DevelText::Shadow::Property::COLOR, Color::BLUE );
+ shadowMapSet.Insert( Toolkit::DevelText::Shadow::Property::OFFSET, Vector2( 3.0, 3.0 ) );
+ shadowMapSet.Insert( Toolkit::DevelText::Shadow::Property::BLUR_RADIUS, 3.0f );
+
+ shadowMapGet = label.GetProperty<Property::Map>( TextLabel::Property::SHADOW );
+ DALI_TEST_EQUALS( shadowMapGet.Count(), shadowMapSet.Count(), TEST_LOCATION );
+ std::vector<std::string> shadowIndicesConversionTable = { "color", "offset", "blurRadius" };
+ DALI_TEST_EQUALS( DaliTestCheckMaps( shadowMapGet, shadowMapSet, shadowIndicesConversionTable ), true, TEST_LOCATION );
+
+ shadowMapSet.Clear();
+ Property::Map shadowDisabledMapGet;
+ shadowDisabledMapGet.Insert( "color", Color::BLUE );
+ shadowDisabledMapGet.Insert( "offset", Vector2(0.0f, 0.0f) );
+ shadowDisabledMapGet.Insert( "blurRadius", 3.0f );
+
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMapSet );
+
+ shadowMapGet = label.GetProperty<Property::Map>( TextLabel::Property::SHADOW );
+ DALI_TEST_EQUALS( shadowMapGet.Count(), shadowDisabledMapGet.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( DaliTestCheckMaps( shadowMapGet, shadowDisabledMapGet ), true, TEST_LOCATION );
+
+ // Check the emboss property
+ label.SetProperty( TextLabel::Property::EMBOSS, "Emboss properties" );
+ DALI_TEST_EQUALS( label.GetProperty<std::string>( TextLabel::Property::EMBOSS ), std::string("Emboss properties"), TEST_LOCATION );
+
+ // Check the outline property
+
+ // Test string type first
+ // This is purely to maintain backward compatibility, but we don't support string as the outline property type.
+ label.SetProperty( TextLabel::Property::OUTLINE, "Outline properties" );
+ DALI_TEST_EQUALS( label.GetProperty<std::string>( TextLabel::Property::OUTLINE ), std::string("Outline properties"), TEST_LOCATION );
+
+ // Then test the property map type
+ Property::Map outlineMapSet;
+ Property::Map outlineMapGet;
+
+ outlineMapSet["color"] = Color::RED;
+ outlineMapSet["width"] = 2.0f;
+ label.SetProperty( TextLabel::Property::OUTLINE, outlineMapSet );
+
+ outlineMapGet = label.GetProperty<Property::Map>( TextLabel::Property::OUTLINE );
+ DALI_TEST_EQUALS( outlineMapGet.Count(), outlineMapSet.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( DaliTestCheckMaps( outlineMapGet, outlineMapSet ), true, TEST_LOCATION );
+
+ outlineMapSet.Clear();
+ outlineMapSet[Toolkit::DevelText::Outline::Property::COLOR] = Color::BLUE;
+ outlineMapSet[Toolkit::DevelText::Outline::Property::WIDTH] = 3.0f;
+ label.SetProperty( TextLabel::Property::OUTLINE, outlineMapSet );
+
+ outlineMapGet = label.GetProperty<Property::Map>( TextLabel::Property::OUTLINE );
+ DALI_TEST_EQUALS( outlineMapGet.Count(), outlineMapSet.Count(), TEST_LOCATION );
+ std::vector<std::string> outlineIndicesConversionTable = { "color", "width" };
+ DALI_TEST_EQUALS( DaliTestCheckMaps( outlineMapGet, outlineMapSet, outlineIndicesConversionTable ), true, TEST_LOCATION );
+
+ // Check the background property
+ Property::Map backgroundMapSet;
+ Property::Map backgroundMapGet;
+
+ backgroundMapSet["enable"] = true;
+ backgroundMapSet["color"] = Color::RED;
+ label.SetProperty( DevelTextLabel::Property::BACKGROUND, backgroundMapSet );
+
+ backgroundMapGet = label.GetProperty<Property::Map>( DevelTextLabel::Property::BACKGROUND );
+ DALI_TEST_EQUALS( backgroundMapGet.Count(), backgroundMapSet.Count(), TEST_LOCATION );
+ DALI_TEST_EQUALS( DaliTestCheckMaps( backgroundMapGet, backgroundMapSet ), true, TEST_LOCATION );
+
+ backgroundMapSet.Clear();
+ backgroundMapSet[Toolkit::DevelText::Background::Property::ENABLE] = true;
+ backgroundMapSet[Toolkit::DevelText::Background::Property::COLOR] = Color::GREEN;
+ label.SetProperty( DevelTextLabel::Property::BACKGROUND, backgroundMapSet );
+
+ backgroundMapGet = label.GetProperty<Property::Map>( DevelTextLabel::Property::BACKGROUND );
+ DALI_TEST_EQUALS( backgroundMapGet.Count(), backgroundMapSet.Count(), TEST_LOCATION );
+ std::vector<std::string> backgroundIndicesConversionTable = { "enable", "color" };
+ DALI_TEST_EQUALS( DaliTestCheckMaps( backgroundMapGet, backgroundMapSet, backgroundIndicesConversionTable ), true, TEST_LOCATION );
+
+ // Check the pixel size of font
+ label.SetProperty( TextLabel::Property::PIXEL_SIZE, 20.f );
+ DALI_TEST_EQUALS( label.GetProperty<float>( TextLabel::Property::PIXEL_SIZE ), 20.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+
+ // Check the ellipsis property
+ DALI_TEST_CHECK( label.GetProperty<bool>( TextLabel::Property::ELLIPSIS ) );
+ label.SetProperty( TextLabel::Property::ELLIPSIS, false );
+ DALI_TEST_CHECK( !label.GetProperty<bool>( TextLabel::Property::ELLIPSIS ) );
+
+ // Check the layout direction property
+ label.SetProperty( Actor::Property::LAYOUT_DIRECTION, LayoutDirection::RIGHT_TO_LEFT );
+ DALI_TEST_EQUALS( label.GetProperty< int >( Actor::Property::LAYOUT_DIRECTION ), static_cast< int >( LayoutDirection::RIGHT_TO_LEFT ), TEST_LOCATION );
+
+ application.SendNotification();
+ application.Render();
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextlabelAtlasRenderP(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextLabelAtlasRenderP");
+ TextLabel label = TextLabel::New("Test Text");
+ DALI_TEST_CHECK( label );
+
+ // Avoid a crash when core load gl resources.
+ application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
+
+ Stage::GetCurrent().Add( label );
+
+ // Turn on all the effects
+ label.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
+ label.SetProperty( TextLabel::Property::MULTI_LINE, true );
+
+ Property::Map underlineMap;
+ underlineMap.Insert( "enable", true );
+ underlineMap.Insert( "color", Color::RED );
+ label.SetProperty( TextLabel::Property::UNDERLINE, underlineMap );
+
+ Property::Map shadowMap;
+ shadowMap.Insert( "color", Color::BLUE );
+ shadowMap.Insert( "offset", Vector2( 1.0f, 1.0f ) );
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
+