X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Fvisual-model-impl.cpp;h=490bae3b82746f2c5bd9f08f32d7875464edb4a2;hp=3fa3975480561e544cc0a571a33a0ccd6729c0ce;hb=4bc73f2e78812b262f09830bb2b1d87034f34496;hpb=e2d9cf42df969e809a572a5224d1ce5d19aaa1ca diff --git a/dali-toolkit/internal/text/visual-model-impl.cpp b/dali-toolkit/internal/text/visual-model-impl.cpp index 3fa3975..490bae3 100644 --- a/dali-toolkit/internal/text/visual-model-impl.cpp +++ b/dali-toolkit/internal/text/visual-model-impl.cpp @@ -254,6 +254,12 @@ void VisualModel::GetNumberOfLines(GlyphIndex glyphIndex, } } +LineIndex VisualModel::GetLineOfGlyph( GlyphIndex glyphIndex ) +{ + const CharacterIndex characterIndex = *(mGlyphsToCharacters.Begin() + glyphIndex); + return GetLineOfCharacter(characterIndex); +} + void VisualModel::GetLinesOfGlyphRange(LineRun* lines, GlyphIndex glyphIndex, Length numberOfGlyphs) const @@ -305,13 +311,13 @@ LineIndex VisualModel::GetLineOfCharacter(CharacterIndex characterIndex) return index; } -void VisualModel::GetUnderlineRuns(GlyphRun* underlineRuns, - UnderlineRunIndex index, - Length numberOfRuns) const +void VisualModel::GetUnderlineRuns(UnderlinedGlyphRun* underlineRuns, + UnderlineRunIndex index, + Length numberOfRuns) const { memcpy(underlineRuns, mUnderlineRuns.Begin() + index, - numberOfRuns * sizeof(GlyphRun)); + numberOfRuns * sizeof(UnderlinedGlyphRun)); } void VisualModel::SetNaturalSize(const Vector2& size) @@ -609,6 +615,16 @@ Length VisualModel::GetNumberOfStrikethroughRuns() const return mStrikethroughRuns.Count(); } +Length VisualModel::GetNumberOfCharacterSpacingGlyphRuns() const +{ + return mCharacterSpacingRuns.Count(); +} + +const Vector& VisualModel::GetCharacterSpacingGlyphRuns() const +{ + return mCharacterSpacingRuns; +} + void VisualModel::ClearCaches() { mCachedLineIndex = 0u;