Merge "add minLineSize at text-utils-devel" into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / devel-api / text / text-utils-devel.h
index 83c6ea9..3440621 100755 (executable)
@@ -19,6 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
+#include <dali/public-api/object/property-array.h>
 #include <dali-toolkit/public-api/dali-toolkit-common.h>
 #include <dali/devel-api/adaptor-framework/pixel-buffer.h>
 #include <dali/devel-api/text-abstraction/text-abstraction-definitions.h>
@@ -56,7 +57,8 @@ struct DALI_TOOLKIT_API RendererParameters
     incrementAngle{ 0.f },
     ellipsisEnabled{ true },
     markupEnabled{ false },
-    isTextColorSet{ false }
+    isTextColorSet{ false },
+    minLineSize{ 0.f }
   {}
 
   std::string text;                ///< The text to be rendered encoded in utf8.
@@ -85,6 +87,8 @@ struct DALI_TOOLKIT_API RendererParameters
   bool ellipsisEnabled:1;          ///< Whether the ellipsis layout option is enabled.
   bool markupEnabled:1;            ///< Whether the mark-up processor is enabled.
   bool isTextColorSet:1;           ///< Whether a default color has been set.
+
+  float minLineSize;               ///< The line's minimum size (in points).
 };
 
 /**
@@ -192,6 +196,14 @@ DALI_TOOLKIT_API Devel::PixelBuffer ConvertToRgba8888( Devel::PixelBuffer pixelB
 */
 DALI_TOOLKIT_API void UpdateBuffer( Devel::PixelBuffer src, Devel::PixelBuffer dst, unsigned int x, unsigned int y, bool blend);
 
+/**
+ * @brief Splits the text in pages of the size given in @p textParameters
+ *
+ * @note The returned indices are indices to utf32 characters. The input text is encoded in utf8.
+ * @return An array with the indices of the last character of each page
+ */
+DALI_TOOLKIT_API Dali::Property::Array GetLastCharacterIndex( RendererParameters& textParameters );
+
 } // namespace DevelText
 
 } // namespace Toolkit