Merge "Text background support for TextLabel" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 16 Feb 2018 15:30:21 +0000 (15:30 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Fri, 16 Feb 2018 15:30:21 +0000 (15:30 +0000)
1  2 
dali-toolkit/internal/visuals/text/text-visual.cpp

@@@ -702,13 -711,14 +715,14 @@@ void TextVisual::UpdateRenderer(
  
        const bool underlineEnabled = mController->GetTextModel()->IsUnderlineEnabled();
        const bool outlineEnabled = ( mController->GetTextModel()->GetOutlineWidth() > Math::MACHINE_EPSILON_1 );
+       const bool backgroundEnabled = mController->GetTextModel()->IsBackgroundEnabled();;
  
-       const bool styleEnabled = ( shadowEnabled || underlineEnabled || outlineEnabled );
+       const bool styleEnabled = ( shadowEnabled || underlineEnabled || outlineEnabled || backgroundEnabled );
  
 -      TextureSet textureSet = GetTextTexture( relayoutSize, hasMultipleTextColors, containsEmoji, styleEnabled );
 +      TextureSet textureSet = GetTextTexture( relayoutSize, hasMultipleTextColors, containsColorGlyph, styleEnabled );
        mImpl->mRenderer.SetTextures( textureSet );
  
 -      Shader shader = GetTextShader( mFactoryCache, hasMultipleTextColors, containsEmoji, styleEnabled );
 +      Shader shader = GetTextShader( mFactoryCache, hasMultipleTextColors, containsColorGlyph, styleEnabled );
        mImpl->mRenderer.SetShader(shader);
  
        mImpl->mFlags &= ~Impl::IS_ATLASING_APPLIED;