X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-view.cpp;h=be6ac8f9733cd7bc420544da1f1064b59dca2d02;hp=130c8af50691660af887a5c0c773bf31e319e286;hb=54fbf47db890d0479d19d780de5ea5d860924632;hpb=26cacf71e74fab984c12bc77485920f4573b97ec diff --git a/dali-toolkit/internal/text/text-view.cpp b/dali-toolkit/internal/text/text-view.cpp index 130c8af..be6ac8f 100644 --- a/dali-toolkit/internal/text/text-view.cpp +++ b/dali-toolkit/internal/text/text-view.cpp @@ -94,7 +94,6 @@ Length View::GetNumberOfGlyphs() const Length View::GetGlyphs( GlyphInfo* glyphs, Vector2* glyphPositions, - Vector4* glyphColors, GlyphIndex glyphIndex, Length numberOfGlyphs ) const { @@ -132,30 +131,6 @@ Length View::GetGlyphs( GlyphInfo* glyphs, glyphIndex, numberOfLaidOutGlyphs ); - // Set the colors. - const GlyphIndex lastLaidOutGlyphIndex = glyphIndex + numberOfLaidOutGlyphs; - - for( Vector::ConstIterator it = mImpl->mVisualModel->mColorRuns.Begin(), - endIt = mImpl->mVisualModel->mColorRuns.End(); - it != endIt; - ++it ) - { - const ColorGlyphRun& colorGlyphRun = *it; - const GlyphIndex lastGlyphIndex = colorGlyphRun.glyphRun.glyphIndex + colorGlyphRun.glyphRun.numberOfGlyphs; - - if( ( colorGlyphRun.glyphRun.glyphIndex < lastLaidOutGlyphIndex ) && - ( glyphIndex < lastGlyphIndex ) ) - { - for( GlyphIndex index = glyphIndex < colorGlyphRun.glyphRun.glyphIndex ? colorGlyphRun.glyphRun.glyphIndex : glyphIndex, - endIndex = lastLaidOutGlyphIndex < lastGlyphIndex ? lastLaidOutGlyphIndex : lastGlyphIndex; - index < endIndex; - ++index ) - { - *( glyphColors + index - glyphIndex ) = colorGlyphRun.color; - } - } - } - // Get the lines for the given range of glyphs. // The lines contain the alignment offset which needs to be added to the glyph's position. LineIndex firstLine = 0u; @@ -310,6 +285,26 @@ Length View::GetGlyphs( GlyphInfo* glyphs, return numberOfLaidOutGlyphs; } +const Vector4* const View::GetColors() const +{ + if( mImpl->mVisualModel ) + { + return mImpl->mVisualModel->mColors.Begin(); + } + + return NULL; +} + +const ColorIndex* const View::GetColorIndices() const +{ + if( mImpl->mVisualModel ) + { + return mImpl->mVisualModel->mColorIndices.Begin(); + } + + return NULL; +} + const Vector4& View::GetTextColor() const { if( mImpl->mVisualModel )