Fixed an error adding duplicate primary position.y
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / decorator / text-decorator.cpp
index da49940..e9e0b1a 100644 (file)
@@ -164,7 +164,8 @@ struct Decorator::Impl : public ConnectionTracker
     : color( Dali::Color::BLACK ),
       position(),
       cursorHeight( 0.0f ),
-      lineHeight( 0.0f )
+      lineHeight( 0.0f ),
+      glyphOffset( 0.0f )
     {
     }
 
@@ -172,6 +173,7 @@ struct Decorator::Impl : public ConnectionTracker
     Vector2 position;
     float cursorHeight;
     float lineHeight;
+    float glyphOffset;
   };
 
   struct HandleImpl
@@ -2006,6 +2008,18 @@ const Vector2& Decorator::GetPosition( Cursor cursor ) const
   return mImpl->mCursor[cursor].position;
 }
 
+void Decorator::SetGlyphOffset( Cursor cursor, float glyphOffset )
+{
+  Impl::CursorImpl& cursorImpl = mImpl->mCursor[cursor];
+
+  cursorImpl.glyphOffset = glyphOffset;
+}
+
+const float Decorator::GetGlyphOffset( Cursor cursor) const
+{
+  return mImpl->mCursor[cursor].glyphOffset;
+}
+
 void Decorator::SetCursorColor( Cursor cursor, const Dali::Vector4& color )
 {
   mImpl->mCursor[cursor].color = color;