X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-model.cpp;h=2d60854e0fc65416de16519d30d5f04f0d9f01af;hp=b158459c92861354baf78037b9c6f1165bd65830;hb=HEAD;hpb=a1d6238d1bb9d8ca13d9bca6a4d58b633b0eb906 diff --git a/dali-toolkit/internal/text/text-model.cpp b/dali-toolkit/internal/text/text-model.cpp index b158459..bbe126b 100644 --- a/dali-toolkit/internal/text/text-model.cpp +++ b/dali-toolkit/internal/text/text-model.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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. @@ -97,6 +97,11 @@ const ScriptRun* Model::GetScriptRuns() const return mLogicalModel->mScriptRuns.Begin(); } +Length Model::GetNumberOfCharacters() const +{ + return mLogicalModel->mText.Count(); +} + Length Model::GetNumberOfGlyphs() const { return mVisualModel->mGlyphs.Count(); @@ -222,6 +227,11 @@ void Model::GetUnderlineRuns(UnderlinedGlyphRun* underlineRuns, UnderlineRunInde mVisualModel->GetUnderlineRuns(underlineRuns, index, numberOfRuns); } +const Vector2& Model::GetOutlineOffset() const +{ + return mVisualModel->GetOutlineOffset(); +} + const Vector4& Model::GetOutlineColor() const { return mVisualModel->GetOutlineColor(); @@ -232,6 +242,11 @@ uint16_t Model::GetOutlineWidth() const return mVisualModel->GetOutlineWidth(); } +const float& Model::GetOutlineBlurRadius() const +{ + return mVisualModel->mOutlineBlurRadius; +} + const Vector4& Model::GetBackgroundColor() const { return mVisualModel->GetBackgroundColor(); @@ -341,6 +356,31 @@ const Vector& Model::GetFontDescriptionRuns() const return mLogicalModel->mFontDescriptionRuns; } +bool Model::IsRemoveFrontInset() const +{ + return mRemoveFrontInset; +} + +bool Model::IsRemoveBackInset() const +{ + return mRemoveBackInset; +} + +bool Model::IsCutoutEnabled() const +{ + return mVisualModel->IsCutoutEnabled(); +} + +const bool Model::IsBackgroundWithCutoutEnabled() const +{ + return mVisualModel->IsBackgroundWithCutoutEnabled(); +} + +const Vector4& Model::GetBackgroundColorWithCutout() const +{ + return mVisualModel->GetBackgroundColorWithCutout(); +} + Model::Model() : mLogicalModel(), mVisualModel(), @@ -353,6 +393,8 @@ Model::Model() mAlignmentOffset(0.0f), mElideEnabled(false), mIgnoreSpacesAfterText(true), + mRemoveFrontInset(true), + mRemoveBackInset(true), mMatchLayoutDirection(DevelText::MatchLayoutDirection::INHERIT), mEllipsisPosition(DevelText::EllipsisPosition::END) {