summaryrefslogtreecommitdiff
path: root/vcl/quartz
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2017-02-22 23:56:19 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2017-02-22 22:51:13 +0000
commit04d086531ff4a3ab24b704489270c7c23792bd20 (patch)
treec5750db5206e3a3afc9467d9e0bfa21a25e50b14 /vcl/quartz
parentd47c009ec5bc15afbd7792ce236a02a712edb2ac (diff)
tdf#104509: Fix GetGlyphBoundRect on Mac
The rectangle top and bottom were mixed up! I tried to fix this in 8cef9b4dbafdebc0566d6d7f715f27f978ddfe5b, but it was not the right fix. Change-Id: Ia033ff2823bfd641e830d748d413d7791bfee5b8 Reviewed-on: https://gerrit.libreoffice.org/34557 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/quartz')
-rw-r--r--vcl/quartz/ctfonts.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx
index 1c60db31a2be..b5db7e572226 100644
--- a/vcl/quartz/ctfonts.cxx
+++ b/vcl/quartz/ctfonts.cxx
@@ -167,9 +167,9 @@ bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect
aCGRect = CGRectApplyAffineTransform(aCGRect, CGAffineTransformMakeRotation(mfFontRotation));
rRect.Left() = lrint( aCGRect.origin.x );
- rRect.Top() = lrint(-aCGRect.origin.y );
+ rRect.Top() = lrint(-aCGRect.origin.y - aCGRect.size.height );
rRect.Right() = lrint( aCGRect.origin.x + aCGRect.size.width );
- rRect.Bottom() = lrint( aCGRect.origin.y - aCGRect.size.height );
+ rRect.Bottom() = lrint(-aCGRect.origin.y );
return true;
}