projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor the Text::Controller::ClearFontData.
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
text-view.cpp
diff --git
a/dali-toolkit/internal/text/text-view.cpp
b/dali-toolkit/internal/text/text-view.cpp
index
2921700
..
130c8af
100644
(file)
--- a/
dali-toolkit/internal/text/text-view.cpp
+++ b/
dali-toolkit/internal/text/text-view.cpp
@@
-65,6
+65,16
@@
const Vector2& View::GetControlSize() const
return Vector2::ZERO;
}
return Vector2::ZERO;
}
+const Vector2& View::GetLayoutSize() const
+{
+ if ( mImpl->mVisualModel )
+ {
+ return mImpl->mVisualModel->GetLayoutSize();
+ }
+
+ return Vector2::ZERO;
+}
+
Length View::GetNumberOfGlyphs() const
{
if( mImpl->mVisualModel )
Length View::GetNumberOfGlyphs() const
{
if( mImpl->mVisualModel )
@@
-171,19
+181,28
@@
Length View::GetGlyphs( GlyphInfo* glyphs,
GlyphIndex lastGlyphIndexOfLine = line->glyphRun.glyphIndex + line->glyphRun.numberOfGlyphs - 1u;
// Add the alignment offset to the glyph's position.
GlyphIndex lastGlyphIndexOfLine = line->glyphRun.glyphIndex + line->glyphRun.numberOfGlyphs - 1u;
// Add the alignment offset to the glyph's position.
+
+ float penY = line->ascender;
for( Length index = 0u; index < numberOfLaidOutGlyphs; ++index )
{
for( Length index = 0u; index < numberOfLaidOutGlyphs; ++index )
{
- ( *( glyphPositions + index ) ).x += line->alignmentOffset;
+ Vector2& position = *( glyphPositions + index );
+ position.x += line->alignmentOffset;
+ position.y += penY;
if( lastGlyphIndexOfLine == index )
{
if( lastGlyphIndexOfLine == index )
{
+ penY += -line->descender;
+
// Get the next line.
++lineIndex;
if( lineIndex < numberOfLines )
{
line = lineBuffer + lineIndex;
// Get the next line.
++lineIndex;
if( lineIndex < numberOfLines )
{
line = lineBuffer + lineIndex;
+
lastGlyphIndexOfLine = line->glyphRun.glyphIndex + line->glyphRun.numberOfGlyphs - 1u;
lastGlyphIndexOfLine = line->glyphRun.glyphIndex + line->glyphRun.numberOfGlyphs - 1u;
+
+ penY += line->ascender;
}
}
}
}
}
}