X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fvisual-model-impl.cpp;h=561beee8cd0416d6ebfea26627c50ccfc10633f5;hb=ae4ebe4de0eaea7942295160d310b9818969b3e7;hp=bb7cdde42f9953f1d6cd08e8991a8fa9d52d93fa;hpb=cacac45f98aade99ec9bda47d126c3fb02eef79a;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 bb7cdde..561beee 100644 --- a/dali-toolkit/internal/text/visual-model-impl.cpp +++ b/dali-toolkit/internal/text/visual-model-impl.cpp @@ -149,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; @@ -216,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;