Added TEXT_COLOR, UNDERLINE_ENABLED and UNDERLINE_COLOR to properties and atlas renderer
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / visual-model-impl.cpp
index 0c056ad..ec94ecc 100644 (file)
@@ -370,6 +370,16 @@ const Vector2& VisualModel::GetActualSize() const
   return mActualSize;
 }
 
+void VisualModel::SetTextColor( const Vector4& textColor )
+{
+  mTextColor = textColor;
+
+  if ( !mUnderlineColorSet )
+  {
+    mUnderlineColor = textColor;
+  }
+}
+
 void VisualModel::SetShadowOffset( const Vector2& shadowOffset )
 {
   mShadowOffset = shadowOffset;
@@ -380,6 +390,22 @@ void VisualModel::SetShadowColor( const Vector4& shadowColor )
   mShadowColor = shadowColor;
 }
 
+void VisualModel::SetUnderlineColor( const Vector4& color )
+{
+  mUnderlineColor = color;
+  mUnderlineColorSet = true;
+}
+
+void VisualModel::SetUnderlineEnabled( bool enabled )
+{
+  mUnderlineEnabled = enabled;
+}
+
+const Vector4& VisualModel::GetTextColor() const
+{
+  return mTextColor;
+}
+
 const Vector2& VisualModel::GetShadowOffset() const
 {
   return mShadowOffset;
@@ -390,12 +416,22 @@ const Vector4& VisualModel::GetShadowColor() const
   return mShadowColor;
 }
 
+const Vector4& VisualModel::GetUnderlineColor() const
+{
+  return mUnderlineColor;
+}
+
+bool VisualModel::IsUnderlineEnabled() const
+{
+  return mUnderlineEnabled;
+}
 
 VisualModel::~VisualModel()
 {
 }
 
 VisualModel::VisualModel()
+: mUnderlineColorSet( false )
 {
 }