X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Ftext%2Ftext-geometry-devel.h;h=8872cfe06048ec5c6b0a14aba5b92c2c0d299b16;hb=e4025736c4d5e85ab7408f9d6932cc7b3e9c9fef;hp=b63f337148e06f4ebd13ae8f0600725e98d1c9a5;hpb=4b79dd131ba61d94518e4ab89d41eaf634d305c6;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/text/text-geometry-devel.h b/dali-toolkit/devel-api/text/text-geometry-devel.h index b63f337..8872cfe 100644 --- a/dali-toolkit/devel-api/text/text-geometry-devel.h +++ b/dali-toolkit/devel-api/text/text-geometry-devel.h @@ -62,6 +62,70 @@ namespace TextGeometry */ DALI_TOOLKIT_API Rect GetLineBoundingRectangle(TextField field, const uint32_t lineIndex); + /** + * @brief Get the character bounding rectangle. + * If the text is not yet rendered or the index > text.Count(); a rect of {0, 0, 0, 0} is returned. + * + * @param[in] label text model containing text info. + * @param[in] charIndex character index to which we want to calculate the geometry for. + * @return bounding rectangle. + */ + DALI_TOOLKIT_API Rect GetCharacterBoundingRectangle(TextLabel label, const uint32_t charIndex); + + /** + * @brief Get the character bounding rectangle. + * If the text is not yet rendered or the index > text.Count(); a rect of {0, 0, 0, 0} is returned. + * + * @param[in] field text model containing text info. + * @param[in] charIndex character index to which we want to calculate the geometry for. + * @return bounding rectangle. + */ + DALI_TOOLKIT_API Rect GetCharacterBoundingRectangle(TextField field, const uint32_t charIndex); + + /** + * @brief Get the character bounding rectangle. + * If the text is not yet rendered or the index > text.Count(); a rect of {0, 0, 0, 0} is returned. + * + * @param[in] editor text model containing text info. + * @param[in] charIndex character index to which we want to calculate the geometry for. + * @return bounding rectangle. + */ + DALI_TOOLKIT_API Rect GetCharacterBoundingRectangle(TextEditor editor, const uint32_t charIndex); + + /** + * @brief Get the character index. + * If the text is not yet rendered or the text is empty, -1 is returned. + * + * @param[in] label text model containing text info. + * @param[in] visualX visual x position. + * @param[in] visualY visual y position. + * @return character index. + */ + DALI_TOOLKIT_API int GetCharacterIndexAtPosition(TextLabel label, float visualX, float visualY); + + /** + * @brief Get the character index. + * If the text is not yet rendered or the text is empty, -1 is returned. + * + * @param[in] field text model containing text info. + * @param[in] visualX visual x position. + * @param[in] visualY visual y position. + * @return character index. + */ + DALI_TOOLKIT_API int GetCharacterIndexAtPosition(TextField field, float visualX, float visualY); + + /** + * @brief Get the character index. + * If the text is not yet rendered or the text is empty, -1 is returned. + * + * @param[in] editor text model containing text info. + * @param[in] visualX visual x position. + * @param[in] visualY visual y position. + * @return character index. + */ + DALI_TOOLKIT_API int GetCharacterIndexAtPosition(TextEditor editor, float visualX, float visualY); + + } // namespace TextGeometry } // namespace Text