diff options
Diffstat (limited to 'vcl/quartz')
-rw-r--r-- | vcl/quartz/ctfonts.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index b5db7e572226..42e1169a37aa 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -166,10 +166,11 @@ bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect if (mfFontRotation && !rGlyph.IsVertical()) aCGRect = CGRectApplyAffineTransform(aCGRect, CGAffineTransformMakeRotation(mfFontRotation)); - rRect.Left() = lrint( aCGRect.origin.x ); - rRect.Top() = lrint(-aCGRect.origin.y - aCGRect.size.height ); - rRect.Right() = lrint( aCGRect.origin.x + aCGRect.size.width ); - rRect.Bottom() = lrint(-aCGRect.origin.y ); + long xMin = floor(aCGRect.origin.x); + long yMin = floor(aCGRect.origin.y); + long xMax = ceil(aCGRect.origin.x + aCGRect.size.width); + long yMax = ceil(aCGRect.origin.y + aCGRect.size.height); + rRect = Rectangle(xMin, -yMax, xMax, -yMin); return true; } |