X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Frendering%2Fview-model.cpp;h=27932b247adcb4e70a6a78770c80f511c1edc85d;hb=refs%2Ftags%2Fsubmit%2Ftizen_5.0%2F20181221.010732;hp=1721a1c8943d11750da511891bbf058da65bcdc5;hpb=48d13d45cb7f363d3cf8da048ce6cef074c55060;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/rendering/view-model.cpp b/dali-toolkit/internal/text/rendering/view-model.cpp index 1721a1c..27932b2 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) 2018 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. @@ -71,6 +71,11 @@ VerticalAlignment::Type ViewModel::GetVerticalAlignment() const return mModel->GetVerticalAlignment(); } +DevelText::VerticalLineAlignment::Type ViewModel::GetVerticalLineAlignment() const +{ + return mModel->GetVerticalLineAlignment(); +} + bool ViewModel::IsTextElideEnabled() const { return mModel->IsTextElideEnabled(); @@ -203,6 +208,16 @@ float 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; @@ -334,6 +349,11 @@ void ViewModel::ElideGlyphs() { if( index > 0u ) { + // If the index decreases to the previous line, firstPenX must be recalculated. + if( numberOfLaidOutGlyphs - index == lastLine.glyphRun.numberOfGlyphs) + { + firstPenSet = false; + } --index; } else