#define __DALI_TOOLKIT_TEXT_VISUAL_MODEL_IMPL_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* @pre The glyphs per character table needs to be created first.
*
* @param[in] startIndex The character from where the conversion table is created.
+ * @param[in] startGlyphIndex The glyph from where the conversion table is created.
* @param[in] numberOfCharacters The number of characters.
*/
void CreateCharacterToGlyphTable( CharacterIndex startIndex,
+ GlyphIndex startGlyphIndex,
Length numberOfCharacters );
/**
* @brief Creates an array containing the number of glyphs per character.
*
* @param[in] startIndex The character from where the table is created.
+ * @param[in] startGlyphIndex The glyph from where the conversion table is created.
* @param[in] numberOfCharacters The number of characters.
*/
void CreateGlyphsPerCharacterTable( CharacterIndex startIndex,
+ GlyphIndex startGlyphIndex,
Length numberOfCharacters );
/**
const Vector4& GetShadowColor() const;
/**
+ * @brief Set the shadow blur radius.
+ *
+ * @param[in] shadowBlurRadius The shadow blur radius, 0,0 indicates no blur.
+ */
+ void SetShadowBlurRadius( const float& shadowBlurRadius );
+
+ /**
+ * @brief Retrieve the shadow blur radius.
+ *
+ * @return The shadow blur radius.
+ */
+ const float& GetShadowBlurRadius() const;
+
+ /**
* @brief Sets the text's underline color.
*
* @param[in] color The text's underline color.
*/
float GetUnderlineHeight() const;
+ /**
+ * @brief Retrieves the number of underline runs.
+ *
+ * @return The number of underline runs.
+ */
+ Length GetNumberOfUnderlineRuns() const;
+
+ /**
+ * @brief Set the outline color.
+ *
+ * @param[in] color color of outline.
+ */
+ void SetOutlineColor( const Vector4& color );
+
+ /**
+ * @brief Retrieve the outline color.
+ *
+ * @return The outline color.
+ */
+ const Vector4& GetOutlineColor() const;
+
+ /**
+ * @brief Set the outline width
+ *
+ * @param[in] width The width in pixels of the outline, 0 indicates no outline
+ */
+ void SetOutlineWidth( float width );
+
+ /**
+ * @brief Retrieves the width of an outline
+ *
+ * @return The width of the outline.
+ */
+ float GetOutlineWidth() const;
+
protected:
/**
Vector<Vector2> mGlyphPositions; ///< For each glyph, the position.
Vector<LineRun> mLines; ///< The laid out lines.
Vector<GlyphRun> mUnderlineRuns; ///< Runs of glyphs that are underlined.
- Vector<ColorGlyphRun> mColorRuns; ///< Runs of glyphs with the same color.
+ Vector<Vector4> mColors; ///< Colors of the glyphs.
+ Vector<ColorIndex> mColorIndices; ///< Indices to the vector of colors for each glyphs.
- 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
+ Vector4 mOutlineColor; ///< Color of outline
+ Size mControlSize; ///< The size of the UI control.
Vector2 mShadowOffset; ///< Offset for drop shadow, 0 indicates no shadow
float mUnderlineHeight; ///< Fixed height for underline to override font metrics.
+ float mOutlineWidth; ///< Width of outline.
+ float mShadowBlurRadius; ///< Blur radius of shadow, 0 indicates no blur.
private:
bool mUnderlineEnabled:1; ///< Underline enabled flag
bool mUnderlineColorSet:1; ///< Has the underline color been explicitly set?
-
};
} // namespace Text