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=c79dbd40e37b6762db61d9ffac72becd303a9634;hp=4d87891d30949ff366a4b80496045f5012e74588;hb=41d36118a13932bcf1db39b780ac437fcda8aa08;hpb=2ef1ec2dc06370b206f95db44c0a59259ce2f7d1 diff --git a/dali-toolkit/internal/text/rendering/view-model.cpp b/dali-toolkit/internal/text/rendering/view-model.cpp index 4d87891..c79dbd4 100755 --- a/dali-toolkit/internal/text/rendering/view-model.cpp +++ b/dali-toolkit/internal/text/rendering/view-model.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -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(); @@ -203,11 +213,21 @@ const Vector4& ViewModel::GetOutlineColor() const return mModel->GetOutlineColor(); } -float ViewModel::GetOutlineWidth() const +uint16_t ViewModel::GetOutlineWidth() const { return mModel->GetOutlineWidth(); } +const Vector4& ViewModel::GetBackgroundColor() const +{ + return mModel->GetBackgroundColor(); +} + +bool ViewModel::IsBackgroundEnabled() const +{ + return mModel->IsBackgroundEnabled(); +} + void ViewModel::ElideGlyphs() { mIsTextElided = false; @@ -287,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 || glyphToRemove.advance == 0.f ) { const Vector2& position = *( elidedPositionsBuffer + index ); @@ -322,7 +342,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;