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=eebbe18c1108ab97d7b473c709eee6e7913cf8b9;hp=9c0af3a2c70898858557c62ebb490386f025b80b;hb=HEAD;hpb=a5167c61104580ae0ab724f904537a3a01ea3061 diff --git a/dali-toolkit/internal/text/visual-model-impl.h b/dali-toolkit/internal/text/visual-model-impl.h index 9c0af3a..edebaf6 100644 --- a/dali-toolkit/internal/text/visual-model-impl.h +++ b/dali-toolkit/internal/text/visual-model-impl.h @@ -144,6 +144,15 @@ public: Length& numberOfLines) const; /** + * @brief Retrieves the line index where the glyph is laid-out. + * + * @param[in] glyphIndex The glyph's index. + * + * @return The line index. + */ + LineIndex GetLineOfGlyph(GlyphIndex glyphIndex); + + /** * @brief Retrieves the lines where the given range of glyphs is laid out. * * The size of the @p lines buffer needs to be big enough to copy the @p numberOfLines. @@ -209,6 +218,20 @@ public: const Vector2& GetLayoutSize() const; /** + * @brief Sets the size of height for width. + * + * @param[in] size The text's height for width size. + */ + void SetHeightForWidth(const Vector2& size); + + /** + * @brief Retrieves the height for width size. + * + * @return The text's height for width size. + */ + const Vector2& GetHeightForWidth() const; + + /** * @brief Set the text's color * * @param[in] textColor The text's color @@ -361,6 +384,13 @@ public: Length GetNumberOfUnderlineRuns() const; /** + * @brief Sets the text's outline offset. + * + * @param[in] outlineOffset The outline offset. + */ + void SetOutlineOffset(const Vector2& outlineOffset); + + /** * @brief Set the outline color. * * @param[in] color color of outline. @@ -368,6 +398,13 @@ public: void SetOutlineColor(const Vector4& color); /** + * @brief Retrieves the text's outline offset. + * + * @return The text's outline offset. + */ + const Vector2& GetOutlineOffset() const; + + /** * @brief Retrieve the outline color. * * @return The outline color. @@ -389,6 +426,20 @@ public: uint16_t GetOutlineWidth() const; /** + * @brief Set the outline blur radius. + * + * @param[in] outlineBlurRadius The outline blur radius, 0,0 indicates no blur. + */ + void SetOutlineBlurRadius(const float& outlineBlurRadius); + + /** + * @brief Retrieve the outline blur radius. + * + * @return The outline blur radius. + */ + const float& GetOutlineBlurRadius() const; + + /** * @brief Sets the text's background color. * * @param[in] color The text's background color. @@ -650,19 +701,22 @@ public: Vector4 mStrikethroughColor; ///< Color of text background Size mControlSize; ///< The size of the UI control. Vector2 mShadowOffset; ///< Offset for drop shadow, 0 indicates no shadow + Vector2 mOutlineOffset; ///< Offset for outline float mUnderlineHeight; ///< Fixed height for underline to override font metrics. float mStrikethroughHeight; ///< Fixed height for strikethrough to override font metrics. Text::Underline::Type mUnderlineType; ///< The type of the underline. float mDashedUnderlineWidth; ///< The width of the dashes of the dashed underline. float mDashedUnderlineGap; ///< The gap between the dashes of the dashed underline. float mShadowBlurRadius; ///< Blur radius of shadow, 0 indicates no blur. + float mOutlineBlurRadius; ///< Blur radius of outline, 0 indicates no blur. uint16_t mOutlineWidth; ///< Width of outline. Vector mStrikethroughRuns; ///< Runs of glyphs that have strikethrough. Vector mCharacterSpacingRuns; ///< Runs of glyphs that have character-spacing. private: - Size mNaturalSize; ///< Size of the text with no line wrapping. - Size mLayoutSize; ///< Size of the laid-out text considering the layout properties set. + Size mNaturalSize; ///< Size of the text with no line wrapping. + Size mLayoutSize; ///< Size of the laid-out text considering the layout properties set. + Size mHeightForWidth; ///< Size of the text last calculated using GetHeightForWidth. // Caches to increase performance in some consecutive operations. LineIndex mCachedLineIndex; ///< Used to increase performance in consecutive calls to GetLineOfGlyph() or GetLineOfCharacter() with consecutive glyphs or characters.