return VisualModelPtr( new VisualModel() );
}
-void VisualModel::SetGlyphs( const GlyphInfo* glyphs,
- const CharacterIndex* characterIndices,
- const Length* charactersPerGlyph,
+void VisualModel::SetGlyphs( const GlyphInfo* const glyphs,
+ const CharacterIndex* const characterIndices,
+ const Length* const charactersPerGlyph,
Length numberOfGlyphs )
{
if( 0u == numberOfGlyphs )
memcpy( glyphsPerCharacter, mGlyphsPerCharacter.Begin() + characterIndex, numberOfCharacters * sizeof( Length ) );
}
-void VisualModel::SetGlyphPositions( const Vector2* glyphPositions,
+void VisualModel::SetGlyphPositions( const Vector2* const glyphPositions,
Length numberOfGlyphs )
{
if( 0u == numberOfGlyphs )
mUnderlineEnabled = enabled;
}
+void VisualModel::SetUnderlineHeight( float height )
+{
+ mUnderlineHeight = height;
+}
+
const Vector4& VisualModel::GetTextColor() const
{
return mTextColor;
return mUnderlineEnabled;
}
+float VisualModel::GetUnderlineHeight() const
+{
+ return mUnderlineHeight;
+}
+
void VisualModel::ClearCaches()
{
mCachedLineIndex = 0u;
mGlyphsPerCharacter(),
mGlyphPositions(),
mLines(),
- mTextColor(),
- mShadowColor(),
- mUnderlineColor(),
- mShadowOffset(),
+ mTextColor( Color::BLACK ),
+ mShadowColor( Color::BLACK ),
+ mUnderlineColor( Color::BLACK ),
+ mShadowOffset( Vector2::ZERO ),
+ mUnderlineHeight( 0.0f ),
mNaturalSize(),
mActualSize(),
mCachedLineIndex( 0u ),