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.cpp;h=92bc48d69334be9fc58d20cf1418759b9d3ba3a8;hp=3e9c1231f920fd58b00d460fb05a8243fcdb93fc;hb=003fe1b0cb2900bd60063649e46fbbbb6e7d997d;hpb=5b4982566aba41b5e21c3b8ce3e01a7e86db8f28 diff --git a/dali-toolkit/internal/text/visual-model-impl.cpp b/dali-toolkit/internal/text/visual-model-impl.cpp index 3e9c123..92bc48d 100644 --- a/dali-toolkit/internal/text/visual-model-impl.cpp +++ b/dali-toolkit/internal/text/visual-model-impl.cpp @@ -36,6 +36,7 @@ VisualModelPtr VisualModel::New() } void VisualModel::CreateCharacterToGlyphTable( CharacterIndex startIndex, + GlyphIndex startGlyphIndex, Length numberOfCharacters ) { if( 0u == numberOfCharacters ) @@ -72,7 +73,6 @@ void VisualModel::CreateCharacterToGlyphTable( CharacterIndex startIndex, // 2) Traverse the glyphs and set the glyph indices per character. // Index to the glyph. - const GlyphIndex startGlyphIndex = updateCurrentBuffer ? *( mCharactersToGlyph.Begin() + startIndex ) : 0u; GlyphIndex glyphIndex = startGlyphIndex; CharacterIndex characterIndex = startIndex; const CharacterIndex lastCharacterIndexPlusOne = startIndex + numberOfCharacters; @@ -115,6 +115,7 @@ void VisualModel::CreateCharacterToGlyphTable( CharacterIndex startIndex, } void VisualModel::CreateGlyphsPerCharacterTable( CharacterIndex startIndex, + GlyphIndex startGlyphIndex, Length numberOfCharacters ) { if( 0u == numberOfCharacters ) @@ -146,14 +147,12 @@ void VisualModel::CreateGlyphsPerCharacterTable( CharacterIndex startIndex, // 2) Traverse the glyphs and set the number of glyphs per character. - // The glyph index. - const GlyphIndex glyphIndex = updateCurrentBuffer ? *( mCharactersToGlyph.Begin() + startIndex ) : 0u; Length traversedCharacters = 0; // The number of 'characters per glyph' equal to zero. Length zeroCharactersPerGlyph = 0u; - for( Vector::ConstIterator it = mCharactersPerGlyph.Begin() + glyphIndex, + for( Vector::ConstIterator it = mCharactersPerGlyph.Begin() + startGlyphIndex, endIt = mCharactersPerGlyph.End(); ( it != endIt ) && ( traversedCharacters < numberOfCharacters ); ++it ) @@ -315,14 +314,14 @@ const Vector2& VisualModel::GetNaturalSize() const return mNaturalSize; } -void VisualModel::SetActualSize( const Vector2& size ) +void VisualModel::SetLayoutSize( const Vector2& size ) { - mActualSize = size; + mLayoutSize = size; } -const Vector2& VisualModel::GetActualSize() const +const Vector2& VisualModel::GetLayoutSize() const { - return mActualSize; + return mLayoutSize; } void VisualModel::SetTextColor( const Vector4& textColor ) @@ -411,10 +410,11 @@ VisualModel::VisualModel() mTextColor( Color::BLACK ), mShadowColor( Color::BLACK ), mUnderlineColor( Color::BLACK ), - mShadowOffset( Vector2::ZERO ), + mControlSize(), + mShadowOffset(), mUnderlineHeight( 0.0f ), mNaturalSize(), - mActualSize(), + mLayoutSize(), mCachedLineIndex( 0u ), mUnderlineEnabled( false ), mUnderlineColorSet( false )