diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-11-16 22:15:58 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-12-30 16:19:48 +0100 |
commit | 9d895ff47126b4fd95b95c8138bc8fdb8abbf1cc (patch) | |
tree | 8b07257534cc3d0fe5cd02f37a810a9f52306aaa /vcl/inc | |
parent | 11dd4c918749839867568651f0c62db30fdda297 (diff) |
vcl: move applyColor and clipRegion to CairoCommon
Change-Id: I0a207b10017923c4336d49ebc8abd53c78d809ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127708
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/headless/CairoCommon.hxx | 4 | ||||
-rw-r--r-- | vcl/inc/headless/svpgdi.hxx | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/vcl/inc/headless/CairoCommon.hxx b/vcl/inc/headless/CairoCommon.hxx index c817a85de8ca..6911c545e7a1 100644 --- a/vcl/inc/headless/CairoCommon.hxx +++ b/vcl/inc/headless/CairoCommon.hxx @@ -110,6 +110,10 @@ struct VCL_DLLPUBLIC CairoCommon void releaseCairoContext(cairo_t* cr, bool bXorModeAllowed, const basegfx::B2DRange& rExtents) const; cairo_t* createTmpCompatibleCairoContext() const; + + void applyColor(cairo_t* cr, Color rColor, double fTransparency = 0.0); + void clipRegion(cairo_t* cr); + static void clipRegion(cairo_t* cr, const vcl::Region& rClipRegion); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index 73ec3b175082..8f58ebd89276 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -54,8 +54,6 @@ public: return CairoCommon::getDamageKey(); } - static void clipRegion(cairo_t* cr, const vcl::Region& rClipRegion); - // need this static version of ::drawPolyLine for usage from // vcl/unx/generic/gdi/salgdi.cxx. It gets wrapped by // ::drawPolyLine with some added parameters (see there) @@ -80,7 +78,6 @@ public: private: void invert(const basegfx::B2DPolygon &rPoly, SalInvert nFlags); - void applyColor(cairo_t *cr, Color rColor, double fTransparency = 0.0); protected: SvpCairoTextRender m_aTextRenderImpl; @@ -227,7 +224,10 @@ public: } static cairo_surface_t* createCairoSurface(const BitmapBuffer *pBuffer); - void clipRegion(cairo_t* cr); + void clipRegion(cairo_t* cr) + { + m_aCairoCommon.clipRegion(cr); + } }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |