summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorAkash Jain <akash96j@gmail.com>2016-07-06 10:15:49 +0530
committerKhaled Hosny <khaledhosny@eglug.org>2016-10-18 20:41:29 +0200
commit07492d483bf4bbcc288bcca0e874142b2d9b9ae2 (patch)
treebd58fad8825f629d7e7342a5e98e436617252c98 /vcl/unx
parent8f70e847a100295da92698dd922d9b349ccdd513 (diff)
GSoC: Modify DrawServerFontLayout and add DrawSalLayout
Modify the definiton of the DrawServerFontLayout method. Add new DrawSalLayout method which will be used for drawing text independent of the platform. Change-Id: Ie3eefb172b1781c685def1ef549db2538f672a62
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx3
-rw-r--r--vcl/unx/generic/gdi/font.cxx10
-rw-r--r--vcl/unx/generic/glyphs/gcach_layout.cxx3
-rw-r--r--vcl/unx/generic/print/genpspgraphics.cxx2
4 files changed, 12 insertions, 6 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index f697a0c84528..372cd4d135ae 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -186,7 +186,7 @@ namespace
}
}
-void CairoTextRender::DrawServerFontLayout( const ServerFontLayout& rLayout )
+void CairoTextRender::DrawServerFontLayout( const GenericSalLayout& rLayout, const ServerFont& rFont )
{
std::vector<cairo_glyph_t> cairo_glyphs;
std::vector<int> glyph_extrarotation;
@@ -219,7 +219,6 @@ void CairoTextRender::DrawServerFontLayout( const ServerFontLayout& rLayout )
if (cairo_glyphs.empty())
return;
- ServerFont& rFont = rLayout.GetServerFont();
const FontSelectPattern& rFSD = rFont.GetFontSelData();
int nHeight = rFSD.mnHeight;
int nWidth = rFSD.mnWidth ? rFSD.mnWidth : nHeight;
diff --git a/vcl/unx/generic/gdi/font.cxx b/vcl/unx/generic/gdi/font.cxx
index 36c7ecba8456..7353e24397f9 100644
--- a/vcl/unx/generic/gdi/font.cxx
+++ b/vcl/unx/generic/gdi/font.cxx
@@ -24,6 +24,7 @@
#include "unx/salgdi.h"
#include "unx/salvd.h"
#include "textrender.hxx"
+#include "CommonSalLayout.hxx"
GC
X11SalGraphics::GetFontGC()
@@ -52,9 +53,14 @@ X11SalGraphics::GetFontGC()
return pFontGC_;
}
-void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout )
+void X11SalGraphics::DrawServerFontLayout( const GenericSalLayout& rLayout, const ServerFont& rServerFont )
{
- mxTextRenderImpl->DrawServerFontLayout(rLayout);
+ mxTextRenderImpl->DrawServerFontLayout(rLayout, rServerFont);
+}
+
+void X11SalGraphics::DrawSalLayout( const CommonSalLayout& rLayout )
+{
+ DrawServerFontLayout( rLayout, rLayout.getFontData() );
}
const FontCharMapRef X11SalGraphics::GetFontCharMap() const
diff --git a/vcl/unx/generic/glyphs/gcach_layout.cxx b/vcl/unx/generic/glyphs/gcach_layout.cxx
index 46420cb7aaad..fff581c3fd18 100644
--- a/vcl/unx/generic/glyphs/gcach_layout.cxx
+++ b/vcl/unx/generic/glyphs/gcach_layout.cxx
@@ -21,6 +21,7 @@
#include <sallayout.hxx>
#include <salgdi.hxx>
#include <scrptrun.h>
+#include <unx/genpspgraphics.h>
#include <i18nlangtag/mslangid.hxx>
@@ -46,7 +47,7 @@ ServerFontLayout::ServerFontLayout( ServerFont& rFont )
void ServerFontLayout::DrawText( SalGraphics& rSalGraphics ) const
{
- rSalGraphics.DrawServerFontLayout( *this );
+ rSalGraphics.DrawServerFontLayout( *this, mrServerFont );
}
bool ServerFontLayout::LayoutText( ImplLayoutArgs& rArgs )
diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx
index 9695e979a2da..9e65be611240 100644
--- a/vcl/unx/generic/print/genpspgraphics.cxx
+++ b/vcl/unx/generic/print/genpspgraphics.cxx
@@ -761,7 +761,7 @@ void PspFontLayout::DrawText( SalGraphics& ) const
DrawPrinterLayout( *this, mrPrinterGfx, false );
}
-void GenPspGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout )
+void GenPspGraphics::DrawServerFontLayout( const GenericSalLayout& rLayout, const ServerFont& /*unused*/ )
{
// print complex text
DrawPrinterLayout( rLayout, *m_pPrinterGfx, true );