summaryrefslogtreecommitdiff
path: root/vcl/quartz/salgdi.cxx
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2016-12-08 00:43:09 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2016-12-10 00:58:26 +0000
commitb894104a0b02a9b074c76feb925389d7bee6a493 (patch)
tree93e8a9362281f2c992f503a4e38ec17d04a9132b /vcl/quartz/salgdi.cxx
parentb52167df08511239c3d08904a3d12a3c92141f38 (diff)
Pass GlyphItem around
We have this nice structure that contains (almost) all the information we need, so pass it around instead of passing separate fragments of said information. The ultimate is to kill the horrible sal_GlyphId hack if encoding various bits of information in the higher bits of a 32-bit integer. Change-Id: Ie496bb4c2932157527a388e2a94e46bf0a325a70 Reviewed-on: https://gerrit.libreoffice.org/31781 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/quartz/salgdi.cxx')
-rw-r--r--vcl/quartz/salgdi.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx
index c2dba0242839..4b3a63ac140d 100644
--- a/vcl/quartz/salgdi.cxx
+++ b/vcl/quartz/salgdi.cxx
@@ -415,12 +415,12 @@ void AquaSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout)
CGAffineTransform aRotMatrix = CGAffineTransformMakeRotation(-rStyle.mfFontRotation);
Point aPos;
- sal_GlyphId aGlyphId;
+ const GlyphItem* pGlyph;
std::vector<CGGlyph> aGlyphIds;
std::vector<CGPoint> aGlyphPos;
std::vector<bool> aGlyphOrientation;
int nStart = 0;
- while (rLayout.GetNextGlyphs(1, &aGlyphId, aPos, nStart))
+ while (rLayout.GetNextGlyphs(1, &pGlyph, aPos, nStart))
{
CGPoint aGCPos = CGPointMake(aPos.X(), -aPos.Y());
@@ -429,7 +429,7 @@ void AquaSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout)
if (rStyle.mfFontRotation)
{
- if ((aGlyphId & GF_ROTMASK) == GF_ROTL)
+ if ((pGlyph->maGlyphId & GF_ROTMASK) == GF_ROTL)
{
bUprightGlyph = true;
// Adjust the position of upright (vertical) glyphs.
@@ -442,7 +442,7 @@ void AquaSalGraphics::DrawTextLayout(const CommonSalLayout& rLayout)
}
}
- aGlyphIds.push_back(aGlyphId & GF_IDXMASK);
+ aGlyphIds.push_back(pGlyph->maGlyphId & GF_IDXMASK);
aGlyphPos.push_back(aGCPos);
aGlyphOrientation.push_back(bUprightGlyph);
}