diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2016-12-08 00:43:09 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2016-12-10 00:58:26 +0000 |
commit | b894104a0b02a9b074c76feb925389d7bee6a493 (patch) | |
tree | 93e8a9362281f2c992f503a4e38ec17d04a9132b /vcl/unx/generic/gdi/cairotextrender.cxx | |
parent | fix build, invalid conversion from "const char*" to "int" [-fpermissive] (diff) | |
download | core-b894104a0b02a9b074c76feb925389d7bee6a493.tar.gz core-b894104a0b02a9b074c76feb925389d7bee6a493.zip |
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/unx/generic/gdi/cairotextrender.cxx')
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index de3dc4b9d28b..501d3998a9da 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -173,16 +173,17 @@ void CairoTextRender::DrawTextLayout(const CommonSalLayout& rLayout) cairo_glyphs.reserve( 256 ); Point aPos; - sal_GlyphId aGlyphId; - for( int nStart = 0; rLayout.GetNextGlyphs( 1, &aGlyphId, aPos, nStart ); ) + const GlyphItem* pGlyph; + int nStart = 0; + while (rLayout.GetNextGlyphs(1, &pGlyph, aPos, nStart)) { cairo_glyph_t aGlyph; - aGlyph.index = aGlyphId & GF_IDXMASK; + aGlyph.index = pGlyph->maGlyphId & GF_IDXMASK; aGlyph.x = aPos.X(); aGlyph.y = aPos.Y(); cairo_glyphs.push_back(aGlyph); - switch (aGlyphId & GF_ROTMASK) + switch (pGlyph->maGlyphId & GF_ROTMASK) { case GF_ROTL: // left glyph_extrarotation.push_back(1); |