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=e446294545ae462882c66b34bca2dea9ad3aa794;hp=35c0a8724f4e71f20260faaca1ebe27b28b8b9cd;hb=04194fd795542d80b5cf7c1b954ca14593e536d4;hpb=2d59f0b716ea7f7c06de0732d3e4e78aea127de6 diff --git a/dali-toolkit/internal/text/rendering/view-model.cpp b/dali-toolkit/internal/text/rendering/view-model.cpp index 35c0a87..e446294 100644 --- a/dali-toolkit/internal/text/rendering/view-model.cpp +++ b/dali-toolkit/internal/text/rendering/view-model.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 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. @@ -249,6 +249,21 @@ float ViewModel::GetUnderlineHeight() const return mModel->GetUnderlineHeight(); } +Text::Underline::Type ViewModel::GetUnderlineType() const +{ + return mModel->GetUnderlineType(); +} + +float ViewModel::GetDashedUnderlineWidth() const +{ + return mModel->GetDashedUnderlineWidth(); +} + +float ViewModel::GetDashedUnderlineGap() const +{ + return mModel->GetDashedUnderlineGap(); +} + Length ViewModel::GetNumberOfUnderlineRuns() const { return mModel->GetNumberOfUnderlineRuns(); @@ -449,7 +464,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 + indexOfEllipsis); @@ -583,6 +598,31 @@ void ViewModel::ElideGlyphs() } } +float ViewModel::GetStrikethroughHeight() const +{ + return mModel->GetStrikethroughHeight(); +} + +const Vector4& ViewModel::GetStrikethroughColor() const +{ + return mModel->GetStrikethroughColor(); +} + +bool ViewModel::IsStrikethroughEnabled() const +{ + return mModel->IsStrikethroughEnabled(); +} + +Length ViewModel::GetNumberOfStrikethroughRuns() const +{ + return mModel->GetNumberOfStrikethroughRuns(); +} + +void ViewModel::GetStrikethroughRuns(StrikethroughGlyphRun* strikethroughRuns, StrikethroughRunIndex index, Length numberOfRuns) const +{ + mModel->GetStrikethroughRuns(strikethroughRuns, index, numberOfRuns); +} + } // namespace Text } // namespace Toolkit