X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fvisual-model-impl.h;h=ca579e1b7f7b05f6c80ee13e45aee27e6bc95837;hp=f290ba56291739a77a585a937da9b8cb0b81641a;hb=49fabc565606e00c95baacb41f009de2a532a4da;hpb=31df2b9472ccbe0ae460a958535be8ef790c96f2 diff --git a/dali-toolkit/internal/text/visual-model-impl.h b/dali-toolkit/internal/text/visual-model-impl.h index f290ba5..ca579e1 100644 --- a/dali-toolkit/internal/text/visual-model-impl.h +++ b/dali-toolkit/internal/text/visual-model-impl.h @@ -21,24 +21,23 @@ // EXTERNAL INCLUDES #include #include +#include #include #include // INTERNAL INCLUDES #include +#include namespace Dali { -struct Vector2; - namespace Toolkit { namespace Text { -struct LineRun; class VisualModel; typedef IntrusivePtr VisualModelPtr; @@ -90,19 +89,6 @@ public: GlyphIndex glyphIndex, Length numberOfGlyphs ) const; - // Character <--> Glyph conversion - - /** - * @brief Retrieves for each character the number of glyphs the character is shaped. - * - * @param[out] glyphsPerCharacter Pointer to a buffer where the number of glyphs for each character are copied. - * @param[in] characterIndex Index to the first character. - * @param[in] numberOfCharacters The number of characters. - */ - void GetGlyphsPerCharacterMap( Length* glyphsPerCharacter, - CharacterIndex characterIndex, - Length numberOfCharacters ) const; - // Position interface /** @@ -154,6 +140,19 @@ public: */ LineIndex GetLineOfCharacter( CharacterIndex characterIndex ); + // Underline runs + + /** + * @brief Retrieves the underline runs. + * + * @param[out] underlineRuns Pointer to a buffer where the underline runs are copied. + * @param[in] index Index of the first underline run to be copied. + * @param[in] numberOfRuns Number of underline runs to be copied. + */ + void GetUnderlineRuns( GlyphRun* underlineRuns, + UnderlineRunIndex index, + Length numberOfRuns ) const; + // Size interface /** @@ -302,15 +301,16 @@ public: Vector mGlyphsPerCharacter; ///< For each character, the number of glyphs that are shaped. Vector mGlyphPositions; ///< For each glyph, the position. Vector mLines; ///< The laid out lines. + Vector mUnderlineRuns; ///< Runs of glyphs that are underlined. + Vector mColorRuns; ///< Runs of glyphs with the same color. + Vector2 mControlSize; ///< The size of the UI control the decorator is adding it's decorations to. Vector4 mTextColor; ///< The text color Vector4 mShadowColor; ///< Color of drop shadow Vector4 mUnderlineColor; ///< Color of underline Vector2 mShadowOffset; ///< Offset for drop shadow, 0 indicates no shadow float mUnderlineHeight; ///< Fixed height for underline to override font metrics. - - private: Size mNaturalSize; ///< Size of the text with no line wrapping.