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=27932b247adcb4e70a6a78770c80f511c1edc85d;hp=fe3c4519b8037e0237474c71491d833893e08cc0;hb=30758c617dee3352070497133b24818674d5d646;hpb=7a2feca016bee8fcdff261678f31d82c477a2051 diff --git a/dali-toolkit/internal/text/rendering/view-model.cpp b/dali-toolkit/internal/text/rendering/view-model.cpp index fe3c451..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. @@ -61,16 +61,21 @@ const Vector2& ViewModel::GetScrollPosition() const return mModel->GetScrollPosition(); } -Layout::HorizontalAlignment ViewModel::GetHorizontalAlignment() const +HorizontalAlignment::Type ViewModel::GetHorizontalAlignment() const { return mModel->GetHorizontalAlignment(); } -Layout::VerticalAlignment ViewModel::GetVerticalAlignment() const +VerticalAlignment::Type ViewModel::GetVerticalAlignment() const { return mModel->GetVerticalAlignment(); } +DevelText::VerticalLineAlignment::Type ViewModel::GetVerticalLineAlignment() const +{ + return mModel->GetVerticalLineAlignment(); +} + bool ViewModel::IsTextElideEnabled() const { return mModel->IsTextElideEnabled(); @@ -163,6 +168,11 @@ const Vector4& ViewModel::GetShadowColor() const return mModel->GetShadowColor(); } +const float& ViewModel::GetShadowBlurRadius() const +{ + return mModel->GetShadowBlurRadius(); +} + const Vector4& ViewModel::GetUnderlineColor() const { return mModel->GetUnderlineColor(); @@ -198,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; @@ -329,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