return Vector2::ZERO;
}
-const Vector2& View::GetActualSize() const
+const Vector2& View::GetLayoutSize() const
{
if ( mImpl->mVisualModel )
{
- return mImpl->mVisualModel->GetActualSize();
+ return mImpl->mVisualModel->GetLayoutSize();
}
return Vector2::ZERO;
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 )
{
- ( *( glyphPositions + index ) ).x += line->alignmentOffset;
+ Vector2& position = *( glyphPositions + index );
+ position.x += line->alignmentOffset;
+ position.y += penY;
if( lastGlyphIndexOfLine == index )
{
+ penY += -line->descender;
+
// Get the next line.
++lineIndex;
if( lineIndex < numberOfLines )
{
line = lineBuffer + lineIndex;
+
lastGlyphIndexOfLine = line->glyphRun.glyphIndex + line->glyphRun.numberOfGlyphs - 1u;
+
+ penY += line->ascender;
}
}
}