X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-view.cpp;h=9e8d0bee9d71bba392a737965bfe2b6dd216038c;hb=f5e86ed8fd10a19aaeac4be8703887ffa24fcf7f;hp=73334282c4d677c5e41ef06ff944043e01727cdd;hpb=10fff2207a4c6251f4ed35e2fff7be598d8002d1;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/text-view.cpp b/dali-toolkit/internal/text/text-view.cpp index 7333428..9e8d0be 100644 --- a/dali-toolkit/internal/text/text-view.cpp +++ b/dali-toolkit/internal/text/text-view.cpp @@ -1,5 +1,5 @@ /* - * 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. @@ -94,6 +94,7 @@ Length View::GetNumberOfGlyphs() const Length View::GetGlyphs( GlyphInfo* glyphs, Vector2* glyphPositions, + float& minLineOffset, GlyphIndex glyphIndex, Length numberOfGlyphs ) const { @@ -157,6 +158,7 @@ Length View::GetGlyphs( GlyphInfo* glyphs, // Add the alignment offset to the glyph's position. + minLineOffset = line->alignmentOffset; float penY = line->ascender; for( Length index = 0u; index < numberOfLaidOutGlyphs; ++index ) { @@ -174,6 +176,7 @@ Length View::GetGlyphs( GlyphInfo* glyphs, if( lineIndex < numberOfLines ) { line = lineBuffer + lineIndex; + minLineOffset = std::min( minLineOffset, line->alignmentOffset ); lastGlyphIndexOfLine = line->glyphRun.glyphIndex + line->glyphRun.numberOfGlyphs - 1u; @@ -381,7 +384,7 @@ Length View::GetNumberOfUnderlineRuns() const { if( mImpl->mVisualModel ) { - return mImpl->mVisualModel->mUnderlineRuns.Count(); + return mImpl->mVisualModel->GetNumberOfUnderlineRuns(); } return 0u;