summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/gdi/cairotextrender.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-10-28 13:41:10 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2018-10-30 20:42:19 +0100
commit996d7f36ddcd6d518f4b44d132b3c5e3300f0c24 (patch)
tree5fb211f185c06dac6c2ff620b4c5982dca25dc86 /vcl/unx/generic/gdi/cairotextrender.cxx
parent0ea92ad5332ddb6583c82275071c3be3939ebf28 (diff)
Move SalGraphics glyph functions into FontInstance
As we already rely on the GlyphItem's font instance, consequently this removes the SalGraphics GlyphItem based functions. Also unifies the glyph bound rect cache handling. An interesting aspect is the rotated glyph bounding box handling moved from CairoTextRender to FreetypeFont. It doesn't look like an implementation detail for Cairo, so it may have been a bug. Change-Id: I81bbb5d8ee98fb77a1eee05568c456f9e4553023 Reviewed-on: https://gerrit.libreoffice.org/62503 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/unx/generic/gdi/cairotextrender.cxx')
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx36
1 files changed, 0 insertions, 36 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 13c8e156dc5b..c8956d02226b 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -442,42 +442,6 @@ void CairoTextRender::GetFontMetric( ImplFontMetricDataRef& rxFontMetric, int nF
mpFreetypeFont[nFallbackLevel]->GetFontMetric(rxFontMetric);
}
-bool CairoTextRender::GetGlyphBoundRect(const GlyphItem& rGlyph, tools::Rectangle& rRect)
-{
- FreetypeFont* pSF = getFreetypeFontFromGlyph(rGlyph);
- if( !pSF )
- return false;
-
- tools::Rectangle aRect;
- if (!pSF->GetGlyphBoundRect(rGlyph, aRect))
- return false;
-
- if ( pSF->mnCos != 0x10000 && pSF->mnSin != 0 )
- {
- double nCos = pSF->mnCos / 65536.0;
- double nSin = pSF->mnSin / 65536.0;
- rRect.SetLeft( nCos*aRect.Left() + nSin*aRect.Top() );
- rRect.SetTop( -nSin*aRect.Left() - nCos*aRect.Top() );
-
- rRect.SetRight( nCos*aRect.Right() + nSin*aRect.Bottom() );
- rRect.SetBottom( -nSin*aRect.Right() - nCos*aRect.Bottom() );
- }
- else
- rRect = aRect;
-
- return true;
-}
-
-bool CairoTextRender::GetGlyphOutline(const GlyphItem& rGlyph,
- basegfx::B2DPolyPolygon& rPolyPoly )
-{
- const FreetypeFont* pSF = getFreetypeFontFromGlyph(rGlyph);
- if( !pSF )
- return false;
-
- return pSF->GetGlyphOutline(rGlyph, rPolyPoly);
-}
-
std::unique_ptr<SalLayout> CairoTextRender::GetTextLayout(ImplLayoutArgs& /*rArgs*/, int nFallbackLevel)
{
if (!mpFreetypeFont[nFallbackLevel])