diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-18 14:23:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-18 17:24:04 +0000 |
commit | dce032e3ac528cfe3b2199a7998ddc349b4a2eb4 (patch) | |
tree | e6372967bd353c27f90339fd6491de2f3d8afd47 /vcl | |
parent | 98d2e1aaa22fb5e9aeb86750038b6a0bf96bdaf2 (diff) |
thinking
Change-Id: Ib1a086bed7f70e244db2a0bd32819560c6949d51
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/print/genpspgraphics.cxx | 5 | ||||
-rw-r--r-- | vcl/headless/svpgdi.cxx | 5 | ||||
-rw-r--r-- | vcl/inc/generic/genpspgraphics.h | 1 | ||||
-rw-r--r-- | vcl/inc/headless/svpgdi.hxx | 1 | ||||
-rw-r--r-- | vcl/inc/quartz/salgdi.h | 1 | ||||
-rw-r--r-- | vcl/inc/salgdi.hxx | 1 | ||||
-rw-r--r-- | vcl/inc/unx/gtk/gtkgdi.hxx | 3 | ||||
-rw-r--r-- | vcl/inc/unx/salgdi.h | 1 | ||||
-rw-r--r-- | vcl/inc/win/salgdi.h | 1 | ||||
-rw-r--r-- | vcl/source/outdev/outdev.cxx | 11 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salgdi.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/gtk3/gdi/gtk3cairotextrender.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 4 |
13 files changed, 36 insertions, 5 deletions
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx index ea76cd3c3357..d43e725b8b8c 100644 --- a/vcl/generic/print/genpspgraphics.cxx +++ b/vcl/generic/print/genpspgraphics.cxx @@ -1219,6 +1219,11 @@ bool GenPspGraphics::CanResizeCairoSurface() const return false; } +cairo_t* GenPspGraphics::GetCairoContext() const +{ + return NULL; +} + SystemFontData GenPspGraphics::GetSysFontData( int /* nFallbacklevel */ ) const { return SystemFontData(); diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 3dee490cc7ff..de563063c631 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -743,4 +743,9 @@ bool SvpSalGraphics::CanResizeCairoSurface() const return false; } +cairo_t* SvpSalGraphics::GetCairoContext() const +{ + return NULL; +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/generic/genpspgraphics.h b/vcl/inc/generic/genpspgraphics.h index e682e3a932bf..b4a683cc055c 100644 --- a/vcl/inc/generic/genpspgraphics.h +++ b/vcl/inc/generic/genpspgraphics.h @@ -203,6 +203,7 @@ public: virtual SystemGraphicsData GetGraphicsData() const SAL_OVERRIDE; virtual bool SupportsCairo() const SAL_OVERRIDE; virtual bool CanResizeCairoSurface() const SAL_OVERRIDE; + virtual cairo_t* GetCairoContext() const SAL_OVERRIDE; virtual SystemFontData GetSysFontData( int nFallbacklevel ) const SAL_OVERRIDE; diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index 855dfff08d64..e4ff74d93ace 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -200,6 +200,7 @@ public: virtual SystemGraphicsData GetGraphicsData() const SAL_OVERRIDE; virtual bool SupportsCairo() const SAL_OVERRIDE; + cairo_t* GetCairoContext() const SAL_OVERRIDE; virtual bool CanResizeCairoSurface() const SAL_OVERRIDE; virtual SystemFontData GetSysFontData( int nFallbacklevel ) const SAL_OVERRIDE; diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 8ee3ccf9eb81..451c5823302a 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -420,6 +420,7 @@ public: GetGraphicsData() const SAL_OVERRIDE; virtual bool SupportsCairo() const SAL_OVERRIDE; virtual bool CanResizeCairoSurface() const SAL_OVERRIDE; + virtual cairo_t* GetCairoContext() const SAL_OVERRIDE; virtual SystemFontData GetSysFontData( int /* nFallbacklevel */ ) const SAL_OVERRIDE; virtual void BeginPaint() SAL_OVERRIDE { }; diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index 6d7d7871eb93..87971fd51013 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -441,6 +441,7 @@ public: /// Check whether cairo will work virtual bool SupportsCairo() const = 0; virtual bool CanResizeCairoSurface() const = 0; + virtual cairo_t* GetCairoContext() const = 0; virtual SystemFontData GetSysFontData( int nFallbacklevel ) const = 0; diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx index 2d002163a9d9..731b7f032bfa 100644 --- a/vcl/inc/unx/gtk/gtkgdi.hxx +++ b/vcl/inc/unx/gtk/gtkgdi.hxx @@ -50,13 +50,12 @@ public: Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) SAL_OVERRIDE; virtual bool SupportsCairo() const SAL_OVERRIDE; + virtual cairo_t* GetCairoContext() const SAL_OVERRIDE; void updateSettings( AllSettings& rSettings ); static void refreshFontconfig( GtkSettings *pSettings ); static void signalSettingsNotify( GObject*, GParamSpec *pSpec, gpointer ); - cairo_t* getCairoContext(); - void clipRegion(cairo_t* cr); private: diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index 7f9bff69341f..74ba77d4d27b 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -263,6 +263,7 @@ public: virtual SystemGraphicsData GetGraphicsData() const SAL_OVERRIDE; virtual bool SupportsCairo() const SAL_OVERRIDE; + virtual cairo_t* GetCairoContext() const SAL_OVERRIDE; virtual bool CanResizeCairoSurface() const SAL_OVERRIDE; virtual SystemFontData GetSysFontData( int nFallbackLevel ) const SAL_OVERRIDE; diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h index 107140ba5cf1..a4800eabe2e0 100644 --- a/vcl/inc/win/salgdi.h +++ b/vcl/inc/win/salgdi.h @@ -447,6 +447,7 @@ public: virtual SystemGraphicsData GetGraphicsData() const SAL_OVERRIDE; virtual bool SupportsCairo() const SAL_OVERRIDE; virtual bool CanResizeCairoSurface() const SAL_OVERRIDE; + virtual cairo_t* GetCairoContext() const SAL_OVERRIDE; virtual SystemFontData GetSysFontData( int nFallbacklevel ) const SAL_OVERRIDE; virtual void BeginPaint() SAL_OVERRIDE; diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index c2ec14b498bb..1ffa2282962a 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -319,6 +319,17 @@ bool OutputDevice::CanResizeCairoSurface() const return mpGraphics->CanResizeCairoSurface(); } +cairo_t* OutputDevice::GetCairoContext() const +{ + if (!mpGraphics) + { + if (!AcquireGraphics()) + return NULL; + } + + return mpGraphics->GetCairoContext(); +} + css::uno::Any OutputDevice::GetSystemGfxDataAny() const { const SystemGraphicsData aSysData = GetSystemGfxData(); diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 29366cabe76a..91bfa59520dc 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -467,6 +467,11 @@ bool X11SalGraphics::CanResizeCairoSurface() const return true; } +cairo_t* X11SalGraphics::GetCairoContext() const +{ + return NULL; +} + // draw a poly-polygon bool X11SalGraphics::drawPolyPolygon( const ::basegfx::B2DPolyPolygon& rOrigPolyPoly, double fTransparency ) { diff --git a/vcl/unx/gtk3/gdi/gtk3cairotextrender.cxx b/vcl/unx/gtk3/gdi/gtk3cairotextrender.cxx index f2f044e633af..032f20a39db0 100644 --- a/vcl/unx/gtk3/gdi/gtk3cairotextrender.cxx +++ b/vcl/unx/gtk3/gdi/gtk3cairotextrender.cxx @@ -21,7 +21,7 @@ GlyphCache& GtkCairoTextRender::getPlatformGlyphCache() cairo_t* GtkCairoTextRender::getCairoContext() { - return mrParent.getCairoContext(); + return mrParent.GetCairoContext(); } void GtkCairoTextRender::getSurfaceOffset(double& nDX, double& nDY) diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index 2554562e06eb..eaf56ea32849 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -922,7 +922,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co return false; } - cairo_t *cr = getCairoContext(); + cairo_t *cr = GetCairoContext(); clipRegion(cr); cairo_translate(cr, rControlRegion.Left(), rControlRegion.Top()); @@ -1556,7 +1556,7 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow ) gtk_widget_path_free(path); } -cairo_t* GtkSalGraphics::getCairoContext() +cairo_t* GtkSalGraphics::GetCairoContext() const { return mpFrame->getCairoContext(); } |