[dali_2.1.15] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / rendering / styles / strikethrough-helper-functions.h
index b3df7ef..d9c86e4 100644 (file)
@@ -23,7 +23,7 @@
 #include <dali/public-api/common/dali-vector.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/internal/text/underlined-glyph-run.h>
+#include <dali-toolkit/internal/text/strikethrough-glyph-run.h>
 #include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
 
 namespace Dali
@@ -33,7 +33,37 @@ namespace Toolkit
 namespace Text
 {
 /**
- * @brief Calculate the current underline height and update maximum underline height
+ * @brief Whether the glyph at index is strikethrough or not. If true then return iterator to the run containes index.
+ *
+ * @param[in] index the index of glyph.
+ * @param[in] strikethroughRuns the strikethrough runs.
+ * @param[out] currentStrikethroughGlyphRunIt the iterator of current strikethrough glyph run.
+ *
+ * @return true if glyph at index is strikethrough
+ */
+bool IsGlyphStrikethrough(GlyphIndex                                    index,
+                          const Vector<StrikethroughGlyphRun>&          strikethroughRuns,
+                          Vector<StrikethroughGlyphRun>::ConstIterator& currentStrikethroughGlyphRunIt);
+
+/**
+ * @brief Check the current strikethrough glyph run iterator if not empty and isGlyphStrikethrough is true then return its StrikethroughProperties. Otherwise return the common strikethrough properties.
+ *
+ * @param[in] index the index of glyph.
+ * @param[in] isGlyphStrikethrough whether the glyph is strikethrough.
+ * @param[in] strikethroughRuns the strikethrough runs.
+ * @param[in] currentStrikethroughGlyphRunIt the iterator of current strikethrough glyph run.
+ * @param[in] commonStrikethroughProperties the common strikethrough properties.
+ *
+ * @return the determined strikethrough properties
+ */
+StrikethroughStyleProperties GetCurrentStrikethroughProperties(GlyphIndex                                    index,
+                                                               const bool&                                   isGlyphStrikethrough,
+                                                               const Vector<StrikethroughGlyphRun>&          strikethroughRuns,
+                                                               Vector<StrikethroughGlyphRun>::ConstIterator& currentStrikethroughGlyphRunIt,
+                                                               const StrikethroughStyleProperties&           commonStrikethroughProperties);
+
+/**
+ * @brief Calculate the current strikethrough height and update maximum strikethrough height
  *
  * @param[inout] currentStrikethroughHeight the current strikethrough height.
  * @param[inout] maxStrikethroughHeight the maximum strikethrough height.