Kaydet (Commit) 03637a75 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Fix what seems to have been off-by-one errors in glyph bounds calculation

For some reason the error had a visible impact (as far as I an see,
anyway) only for Graphite fonts. The bottommost pixels were cut
off. (Also leftmost, but that was not so easily visible.)

<tools/gen.hxx> Rectangle type, I love you.

Change-Id: I6f7438ec21d2bc1b9bef31cd70e649856f7ec7d5
üst e45d80f2
......@@ -2014,9 +2014,9 @@ bool WinSalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect )
rRect = Rectangle( Point( +aGM.gmptGlyphOrigin.x, -aGM.gmptGlyphOrigin.y ),
Size( aGM.gmBlackBoxX, aGM.gmBlackBoxY ) );
rRect.Left() = static_cast<int>( mfCurrentFontScale * rRect.Left() );
rRect.Right() = static_cast<int>( mfCurrentFontScale * rRect.Right() );
rRect.Right() = static_cast<int>( mfCurrentFontScale * rRect.Right() ) + 1;
rRect.Top() = static_cast<int>( mfCurrentFontScale * rRect.Top() );
rRect.Bottom() = static_cast<int>( mfCurrentFontScale * rRect.Bottom() );
rRect.Bottom() = static_cast<int>( mfCurrentFontScale * rRect.Bottom() ) + 1;
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment