X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Frendering%2Ftext-typesetter.cpp;h=4dc97751b0e5985d20a2c6ad40cd9612261bf330;hp=790e24779896d1781957866f664952ffdd336285;hb=cee2831414bee408f07923a17cad74671c14d180;hpb=ee33f54bcefdc59971ffa428e6f8e4bdd31b94ed diff --git a/dali-toolkit/internal/text/rendering/text-typesetter.cpp b/dali-toolkit/internal/text/rendering/text-typesetter.cpp index 790e247..4dc9775 100644 --- a/dali-toolkit/internal/text/rendering/text-typesetter.cpp +++ b/dali-toolkit/internal/text/rendering/text-typesetter.cpp @@ -1004,8 +1004,8 @@ Devel::PixelBuffer Typesetter::CreateImageBuffer(const unsigned int bufferWidth, Vector::ConstIterator currentUnderlinedGlyphRunIt = underlineRuns.End(); const bool underlineGlyph = underlineEnabled || IsGlyphUnderlined(glyphIndex, underlineRuns, currentUnderlinedGlyphRunIt); - currentUnderlineProperties = GetCurrentUnderlineProperties(underlineGlyph, underlineRuns, currentUnderlinedGlyphRunIt, modelUnderlineProperties); - currentUnderlineHeight = GetCurrentUnderlineHeight(underlineRuns, currentUnderlinedGlyphRunIt, modelUnderlineProperties.height); + currentUnderlineProperties = GetCurrentUnderlineProperties(glyphIndex, underlineGlyph, underlineRuns, currentUnderlinedGlyphRunIt, modelUnderlineProperties); + currentUnderlineHeight = currentUnderlineProperties.height; thereAreUnderlinedGlyphs = thereAreUnderlinedGlyphs || underlineGlyph; currentStrikethroughColor = strikethroughColor; @@ -1256,24 +1256,15 @@ Devel::PixelBuffer Typesetter::ApplyUnderlineMarkupImageBuffer(Devel::PixelBuffe //The outer loop to iterate on the separated chunks of underlined glyph runs while(itGlyphRun != endItGlyphRun) { - const UnderlineStyleProperties& firstUnderlineStyleProperties = itGlyphRun->properties; - startGlyphIndex = itGlyphRun->glyphRun.glyphIndex; - endGlyphIndex = startGlyphIndex; - //The inner loop to make a connected underline for the consecutive characters - do - { - endGlyphIndex += itGlyphRun->glyphRun.numberOfGlyphs; - itGlyphRun++; - } while(itGlyphRun != endItGlyphRun && itGlyphRun->glyphRun.glyphIndex == endGlyphIndex && - (firstUnderlineStyleProperties == itGlyphRun->properties)); - - endGlyphIndex--; + endGlyphIndex = startGlyphIndex + itGlyphRun->glyphRun.numberOfGlyphs - 1; // Create the image buffer for underline Devel::PixelBuffer underlineImageBuffer = CreateImageBuffer(bufferWidth, bufferHeight, Typesetter::STYLE_UNDERLINE, ignoreHorizontalAlignment, pixelFormat, horizontalOffset, verticalOffset, startGlyphIndex, endGlyphIndex); // Combine the two buffers - topPixelBuffer = CombineImageBuffer(topPixelBuffer, underlineImageBuffer, bufferWidth, bufferHeight); + topPixelBuffer = CombineImageBuffer(underlineImageBuffer, topPixelBuffer, bufferWidth, bufferHeight); + + itGlyphRun++; } return topPixelBuffer;