const char * const SHADOW_PROPERTY( "shadow" );
const char * const UNDERLINE_PROPERTY( "underline" );
const char * const OUTLINE_PROPERTY( "outline" );
+const char * const BACKGROUND_PROPERTY( "textBackground" );
const Vector4 FULL_TEXTURE_RECT( 0.f, 0.f, 1.f, 1.f );
{
result = Toolkit::DevelTextVisual::Property::OUTLINE;
}
+ else if( stringKey == BACKGROUND_PROPERTY )
+ {
+ result = Toolkit::DevelTextVisual::Property::BACKGROUND;
+ }
return result;
}
GetOutlineProperties( mController, value, Text::EffectStyle::DEFAULT );
map.Insert( Toolkit::DevelTextVisual::Property::OUTLINE, value );
+
+ GetBackgroundProperties( mController, value, Text::EffectStyle::DEFAULT );
+ map.Insert( Toolkit::DevelTextVisual::Property::BACKGROUND, value );
}
void TextVisual::DoCreateInstancePropertyMap( Property::Map& map ) const
SetOutlineProperties( mController, propertyValue, Text::EffectStyle::DEFAULT );
break;
}
+ case Toolkit::DevelTextVisual::Property::BACKGROUND:
+ {
+ SetBackgroundProperties( mController, propertyValue, Text::EffectStyle::DEFAULT );
+ break;
+ }
}
}
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, containsColorGlyph, styleEnabled );
mImpl->mRenderer.SetTextures( textureSet );