diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2016-12-08 03:01:14 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2016-12-10 01:57:50 +0000 |
commit | bebee55d197176f009668628de0d9945c26af8ad (patch) | |
tree | e5e476f55f5e13e93540c475e2b34ff9a837384c /vcl/quartz | |
parent | b894104a0b02a9b074c76feb925389d7bee6a493 (diff) |
Use GlyphItem in more places
Change-Id: Ic0dd8c0311161271817eb9a3f454d00a319e43a8
Reviewed-on: https://gerrit.libreoffice.org/31814
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/quartz')
-rw-r--r-- | vcl/quartz/ctfonts.cxx | 10 | ||||
-rw-r--r-- | vcl/quartz/salgdi.cxx | 12 |
2 files changed, 11 insertions, 11 deletions
diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index 7677a0403d40..300ee4dafe3d 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -152,9 +152,9 @@ SAL_WNODEPRECATED_DECLARATIONS_POP } } -bool CoreTextStyle::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect ) const +bool CoreTextStyle::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect ) const { - CGGlyph nCGGlyph = aGlyphId & GF_IDXMASK; + CGGlyph nCGGlyph = rGlyph.maGlyphId & GF_IDXMASK; CTFontRef aCTFontRef = static_cast<CTFontRef>(CFDictionaryGetValue( mpStyleDict, kCTFontAttributeName )); SAL_WNODEPRECATED_DECLARATIONS_PUSH //TODO: 10.11 kCTFontDefaultOrientation @@ -163,7 +163,7 @@ bool CoreTextStyle::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect ) CGRect aCGRect = CTFontGetBoundingRectsForGlyphs(aCTFontRef, aFontOrientation, &nCGGlyph, nullptr, 1); // Apply font rotation to non-upright glyphs. - if (mfFontRotation && !(aGlyphId & GF_ROTMASK)) + if (mfFontRotation && !(rGlyph.maGlyphId & GF_ROTMASK)) aCGRect = CGRectApplyAffineTransform(aCGRect, CGAffineTransformMakeRotation(mfFontRotation)); rRect.Left() = lrint( aCGRect.origin.x ); @@ -225,11 +225,11 @@ static void MyCGPathApplierFunc( void* pData, const CGPathElement* pElement ) } } -bool CoreTextStyle::GetGlyphOutline( sal_GlyphId aGlyphId, basegfx::B2DPolyPolygon& rResult ) const +bool CoreTextStyle::GetGlyphOutline(const GlyphItem& rGlyph, basegfx::B2DPolyPolygon& rResult) const { rResult.clear(); - CGGlyph nCGGlyph = aGlyphId & GF_IDXMASK; + CGGlyph nCGGlyph = rGlyph.maGlyphId & GF_IDXMASK; CTFontRef pCTFont = static_cast<CTFontRef>(CFDictionaryGetValue( mpStyleDict, kCTFontAttributeName )); CGPathRef xPath = CTFontCreatePathForGlyph( pCTFont, nCGGlyph, nullptr ); if (!xPath) diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index 4b3a63ac140d..c593b8887de0 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -382,23 +382,23 @@ bool AquaSalGraphics::AddTempDevFont( PhysicalFontCollection*, return ::AddTempDevFont(rFontFileURL); } -bool AquaSalGraphics::GetGlyphOutline( sal_GlyphId aGlyphId, basegfx::B2DPolyPolygon& rPolyPoly ) +bool AquaSalGraphics::GetGlyphOutline(const GlyphItem& rGlyph, basegfx::B2DPolyPolygon& rPolyPoly) { - const int nFallbackLevel = aGlyphId >> GF_FONTSHIFT; + const int nFallbackLevel = rGlyph.maGlyphId >> GF_FONTSHIFT; if (nFallbackLevel < MAX_FALLBACK && mpTextStyle[nFallbackLevel]) { - const bool bRC = mpTextStyle[nFallbackLevel]->GetGlyphOutline(aGlyphId, rPolyPoly); + const bool bRC = mpTextStyle[nFallbackLevel]->GetGlyphOutline(rGlyph, rPolyPoly); return bRC; } return false; } -bool AquaSalGraphics::GetGlyphBoundRect( sal_GlyphId aGlyphId, Rectangle& rRect ) +bool AquaSalGraphics::GetGlyphBoundRect(const GlyphItem& rGlyph, Rectangle& rRect ) { - const int nFallbackLevel = aGlyphId >> GF_FONTSHIFT; + const int nFallbackLevel = rGlyph.maGlyphId >> GF_FONTSHIFT; if (nFallbackLevel < MAX_FALLBACK && mpTextStyle[nFallbackLevel]) { - const bool bRC = mpTextStyle[nFallbackLevel]->GetGlyphBoundRect(aGlyphId, rRect); + const bool bRC = mpTextStyle[nFallbackLevel]->GetGlyphBoundRect(rGlyph, rRect); return bRC; } return false; |