X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Frendering%2Fview-model.cpp;h=3046f455d3710b77b048a73af95dc5ba4b9ec199;hp=9be821572a8881aeeaab3b0ef8f19bcdb2688f92;hb=f0297c0a6b916f97737e3e1b46b6368cfb59b997;hpb=d82494a77e405d5924cf1af3fe55b2d9b9577e3f diff --git a/dali-toolkit/internal/text/rendering/view-model.cpp b/dali-toolkit/internal/text/rendering/view-model.cpp index 9be8215..3046f45 100755 --- a/dali-toolkit/internal/text/rendering/view-model.cpp +++ b/dali-toolkit/internal/text/rendering/view-model.cpp @@ -153,6 +153,16 @@ const ColorIndex* const ViewModel::GetColorIndices() const return mModel->GetColorIndices(); } +const Vector4* const ViewModel::GetBackgroundColors() const +{ + return mModel->GetBackgroundColors(); +} + +const ColorIndex* const ViewModel::GetBackgroundColorIndices() const +{ + return mModel->GetBackgroundColorIndices(); +} + const Vector4& ViewModel::GetDefaultColor() const { return mModel->GetDefaultColor(); @@ -297,7 +307,7 @@ void ViewModel::ElideGlyphs() // Need to reshape the glyph as the font may be different in size. const GlyphInfo& ellipsisGlyph = fontClient.GetEllipsisGlyph( fontClient.GetPointSize( glyphToRemove.fontId ) ); - if( !firstPenSet ) + if( !firstPenSet || EqualsZero( glyphToRemove.advance ) ) { const Vector2& position = *( elidedPositionsBuffer + index ); @@ -314,7 +324,10 @@ void ViewModel::ElideGlyphs() removedGlypsWidth = -ellipsisGlyph.xBearing; - firstPenSet = true; + if( !EqualsZero( firstPenX ) ) + { + firstPenSet = true; + } } removedGlypsWidth += std::min( glyphToRemove.advance, ( glyphToRemove.xBearing + glyphToRemove.width ) ); @@ -332,7 +345,6 @@ void ViewModel::ElideGlyphs() glyphInfo = ellipsisGlyph; // Change the 'x' and 'y' position of the ellipsis glyph. - if( position.x > firstPenX ) { position.x = firstPenX + removedGlypsWidth - ellipsisGlyphWidth;