[dali_2.3.24] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-model.cpp
index b158459..bbe126b 100644 (file)
@@ -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.
  *
  * 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();
 }
 
   return mLogicalModel->mScriptRuns.Begin();
 }
 
+Length Model::GetNumberOfCharacters() const
+{
+  return mLogicalModel->mText.Count();
+}
+
 Length Model::GetNumberOfGlyphs() const
 {
   return mVisualModel->mGlyphs.Count();
 Length Model::GetNumberOfGlyphs() const
 {
   return mVisualModel->mGlyphs.Count();
@@ -222,6 +227,11 @@ void Model::GetUnderlineRuns(UnderlinedGlyphRun* underlineRuns, UnderlineRunInde
   mVisualModel->GetUnderlineRuns(underlineRuns, index, numberOfRuns);
 }
 
   mVisualModel->GetUnderlineRuns(underlineRuns, index, numberOfRuns);
 }
 
+const Vector2& Model::GetOutlineOffset() const
+{
+  return mVisualModel->GetOutlineOffset();
+}
+
 const Vector4& Model::GetOutlineColor() const
 {
   return mVisualModel->GetOutlineColor();
 const Vector4& Model::GetOutlineColor() const
 {
   return mVisualModel->GetOutlineColor();
@@ -232,6 +242,11 @@ uint16_t Model::GetOutlineWidth() const
   return mVisualModel->GetOutlineWidth();
 }
 
   return mVisualModel->GetOutlineWidth();
 }
 
+const float& Model::GetOutlineBlurRadius() const
+{
+  return mVisualModel->mOutlineBlurRadius;
+}
+
 const Vector4& Model::GetBackgroundColor() const
 {
   return mVisualModel->GetBackgroundColor();
 const Vector4& Model::GetBackgroundColor() const
 {
   return mVisualModel->GetBackgroundColor();
@@ -341,6 +356,31 @@ const Vector<FontDescriptionRun>& Model::GetFontDescriptionRuns() const
   return mLogicalModel->mFontDescriptionRuns;
 }
 
   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(),
 Model::Model()
 : mLogicalModel(),
   mVisualModel(),
@@ -353,6 +393,8 @@ Model::Model()
   mAlignmentOffset(0.0f),
   mElideEnabled(false),
   mIgnoreSpacesAfterText(true),
   mAlignmentOffset(0.0f),
   mElideEnabled(false),
   mIgnoreSpacesAfterText(true),
+  mRemoveFrontInset(true),
+  mRemoveBackInset(true),
   mMatchLayoutDirection(DevelText::MatchLayoutDirection::INHERIT),
   mEllipsisPosition(DevelText::EllipsisPosition::END)
 {
   mMatchLayoutDirection(DevelText::MatchLayoutDirection::INHERIT),
   mEllipsisPosition(DevelText::EllipsisPosition::END)
 {