X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fvisual-model-impl.cpp;h=561beee8cd0416d6ebfea26627c50ccfc10633f5;hb=2ecd7e13e0dbe45f59b5150abbf7924bf780f720;hp=a354fdc313ea3774143d3ced6bba0c2ce74ef7e9;hpb=24ab5420ad958de9ba345b504de62881162c754b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/visual-model-impl.cpp b/dali-toolkit/internal/text/visual-model-impl.cpp index a354fdc..561beee 100644 --- a/dali-toolkit/internal/text/visual-model-impl.cpp +++ b/dali-toolkit/internal/text/visual-model-impl.cpp @@ -20,7 +20,6 @@ // EXTERNAL INCLUDES #include -#include namespace Dali { @@ -150,13 +149,13 @@ void VisualModel::GetNumberOfLines( GlyphIndex glyphIndex, { const LineRun& line = *it; - if( ( line.glyphIndex + line.numberOfGlyphs > glyphIndex ) && - ( lastGlyphIndex > line.glyphIndex ) ) + if( ( line.glyphRun.glyphIndex + line.glyphRun.numberOfGlyphs > glyphIndex ) && + ( lastGlyphIndex > line.glyphRun.glyphIndex ) ) { firstLineFound = true; ++numberOfLines; } - else if( lastGlyphIndex <= line.glyphIndex ) + else if( lastGlyphIndex <= line.glyphRun.glyphIndex ) { // nothing else to do. break; @@ -217,6 +216,15 @@ LineIndex VisualModel::GetLineOfCharacter( CharacterIndex characterIndex ) return index; } +void VisualModel::GetUnderlineRuns( GlyphRun* underlineRuns, + UnderlineRunIndex index, + Length numberOfRuns ) const +{ + memcpy( underlineRuns, + mUnderlineRuns.Begin() + index, + numberOfRuns * sizeof( GlyphRun ) ); +} + void VisualModel::SetNaturalSize( const Vector2& size ) { mNaturalSize = size;