summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-10-25 18:51:51 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2014-11-03 22:54:14 +0000
commitad6d94009cf8ea526eb70bf1a07e5c6a21320f83 (patch)
tree4dc2b9cd15ab76cbf25bb50fcd27a150b14cab83 /include
parentc79d2dbe3a75e3376a5997444b6a3a5f947da107 (diff)
vcl: Allow SalGraphics to draw gradients natively
The aim of this patch is to allow for native gradient rendering in SalGraphics (i.e. let OpenGL do this natively). It is a two step process: 1. I need to allow gradient draw into SalGraphics, however the current completely intertwined with the metafile code in OutputDevice. I am seperating the gradient metafile code from the gradient drawing code. 2. After splitting the metafile stuff from the actual gradient drawing, I am now able to call on SalGraphics::DrawGradient(). This just calls on SalGraphics::drawGradient() which returns false if there is no way of drawing native gradients, and true if there is. If false, then we use OutputDevice's DrawGradient() functionality. Change-Id: Ibaaabe13b76a8e7a037d9f751b5f662653a50566 Reviewed-on: https://gerrit.libreoffice.org/12119 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/outdev.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 30da2ea8e0af..76033516c9ee 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -833,8 +833,12 @@ protected:
private:
- SAL_DLLPRIVATE void DrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, bool bMtf, const tools::PolyPolygon* pClipPolyPoly );
- SAL_DLLPRIVATE void DrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, bool bMtf, const tools::PolyPolygon* pClipPolyPoly );
+ SAL_DLLPRIVATE void DrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
+ SAL_DLLPRIVATE void DrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, const tools::PolyPolygon* pClipPolyPoly );
+
+ SAL_DLLPRIVATE void DrawGradientToMetafile( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient );
+ SAL_DLLPRIVATE void DrawLinearGradientToMetafile( const Rectangle& rRect, const Gradient& rGradient );
+ SAL_DLLPRIVATE void DrawComplexGradientToMetafile( const Rectangle& rRect, const Gradient& rGradient );
SAL_DLLPRIVATE long GetGradientSteps( const Gradient& rGradient, const Rectangle& rRect, bool bMtf, bool bComplex=false );