diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-12 22:59:20 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-14 07:35:59 +0000 |
commit | 5e083eb18b4e83078cb73a35862113e754e3267f (patch) | |
tree | 4ab2d2c8aa5baec78c2c03ddfda37b9e49a43fdb /vcl | |
parent | 988ff97e6f2fe115168a999decc36beb3e0df542 (diff) |
post cairo text-rendering GetGlyphId only called by GetGlyphId
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/unx/generic/gdi/gcach_xpeer.cxx | 50 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/gcach_xpeer.hxx | 1 |
2 files changed, 0 insertions, 51 deletions
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx index f68314bf8e7f..f014732621d4 100644 --- a/vcl/unx/generic/gdi/gcach_xpeer.cxx +++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx @@ -584,56 +584,6 @@ const RawBitmap* X11GlyphPeer::GetRawBitmap( ServerFont& rServerFont, return pRawBitmap; } -// --------------------------------------------------------------------------- - -Glyph X11GlyphPeer::GetGlyphId( ServerFont& rServerFont, int nGlyphIndex ) -{ - if( rServerFont.IsGlyphInvisible( nGlyphIndex ) ) - return NO_GLYPHID; - - GlyphData& rGlyphData = rServerFont.GetGlyphData( nGlyphIndex ); - - Glyph aGlyphId = GetRenderGlyph( rGlyphData ); - if( aGlyphId == NO_GLYPHID ) - { - // prepare GlyphInfo and Bitmap - if( rServerFont.GetGlyphBitmap8( nGlyphIndex, maRawBitmap ) ) - { - XGlyphInfo aGlyphInfo; - aGlyphInfo.width = maRawBitmap.mnWidth; - aGlyphInfo.height = maRawBitmap.mnHeight; - aGlyphInfo.x = -maRawBitmap.mnXOffset; - aGlyphInfo.y = -maRawBitmap.mnYOffset; - - rGlyphData.SetSize( Size( maRawBitmap.mnWidth, maRawBitmap.mnHeight ) ); - rGlyphData.SetOffset( +maRawBitmap.mnXOffset, +maRawBitmap.mnYOffset ); - - const GlyphMetric& rGM = rGlyphData.GetMetric(); - aGlyphInfo.xOff = +rGM.GetDelta().X(); - aGlyphInfo.yOff = +rGM.GetDelta().Y(); - - // upload glyph bitmap to server - GlyphSet aGlyphSet = GetGlyphSet( rServerFont, -1 ); - - aGlyphId = nGlyphIndex & 0x00FFFFFF; - const sal_uLong nBytes = maRawBitmap.mnScanlineSize * maRawBitmap.mnHeight; - XRenderPeer::GetInstance().AddGlyph( aGlyphSet, aGlyphId, - aGlyphInfo, (char*)maRawBitmap.mpBits, nBytes ); - mnBytesUsed += nBytes; - } - else - { - // fall back to .notdef glyph - if( nGlyphIndex != 0 ) // recurse only once - aGlyphId = GetGlyphId( rServerFont, 0 ); - } - - SetRenderGlyph( rGlyphData, aGlyphId ); - } - - return aGlyphId; -} - // =========================================================================== X11GlyphCache::X11GlyphCache( X11GlyphPeer& rPeer ) diff --git a/vcl/unx/generic/gdi/gcach_xpeer.hxx b/vcl/unx/generic/gdi/gcach_xpeer.hxx index df5f5168535c..a426e3b0d8be 100644 --- a/vcl/unx/generic/gdi/gcach_xpeer.hxx +++ b/vcl/unx/generic/gdi/gcach_xpeer.hxx @@ -49,7 +49,6 @@ public: const RawBitmap* GetRawBitmap( ServerFont&, int nGlyphIndex ); GlyphSet GetGlyphSet( ServerFont&, int nScreen ); - Glyph GetGlyphId( ServerFont&, int nGlyphIndex ); protected: void InitAntialiasing(); |