support strikethrough markup tag
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / visual-model-impl.cpp
index 6ac00cd..6c4ff9b 100644 (file)
@@ -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.
@@ -585,6 +585,20 @@ float VisualModel::GetStrikethroughHeight() const
   return mStrikethroughHeight;
 }
 
+void VisualModel::GetStrikethroughRuns(StrikethroughGlyphRun* strikethroughRuns,
+                                       StrikethroughRunIndex  index,
+                                       Length                 numberOfRuns) const
+{
+  memcpy(strikethroughRuns,
+         mStrikethroughRuns.Begin() + index,
+         numberOfRuns * sizeof(StrikethroughGlyphRun));
+}
+
+Length VisualModel::GetNumberOfStrikethroughRuns() const
+{
+  return mStrikethroughRuns.Count();
+}
+
 void VisualModel::ClearCaches()
 {
   mCachedLineIndex = 0u;