Kaydet (Commit) 80ff016d authored tarafından Markus Mohrhard's avatar Markus Mohrhard

bring the gradient rendering down into SalGraphicsImpl & unx backend

Change-Id: Ia5d5e7d996b4a8818e73f3f741907ff9224f93da
üst 580574df
...@@ -191,6 +191,8 @@ public: ...@@ -191,6 +191,8 @@ public:
long nX, long nY, long nX, long nY,
long nWidth, long nHeight, long nWidth, long nHeight,
sal_uInt8 nTransparency ) SAL_OVERRIDE; sal_uInt8 nTransparency ) SAL_OVERRIDE;
virtual bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) SAL_OVERRIDE;
private: private:
}; };
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
class SalGraphics; class SalGraphics;
class SalBitmap; class SalBitmap;
class Gradient;
class VCL_PLUGIN_PUBLIC SalGraphicsImpl class VCL_PLUGIN_PUBLIC SalGraphicsImpl
{ {
...@@ -197,7 +198,7 @@ public: ...@@ -197,7 +198,7 @@ public:
long nWidth, long nHeight, long nWidth, long nHeight,
sal_uInt8 nTransparency ) = 0; sal_uInt8 nTransparency ) = 0;
virtual bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) = 0;
}; };
#endif #endif
......
...@@ -237,7 +237,7 @@ public: ...@@ -237,7 +237,7 @@ public:
const ::basegfx::B2DVector& rLineWidth, const ::basegfx::B2DVector& rLineWidth,
basegfx::B2DLineJoin, basegfx::B2DLineJoin,
com::sun::star::drawing::LineCap) SAL_OVERRIDE; com::sun::star::drawing::LineCap) SAL_OVERRIDE;
virtual bool drawGradient( const tools::PolyPolygon&, const Gradient& ) SAL_OVERRIDE { return false; }; virtual bool drawGradient( const tools::PolyPolygon&, const Gradient& ) SAL_OVERRIDE;
#if 1 // TODO: remove these obselete methods #if 1 // TODO: remove these obselete methods
virtual bool drawPolyLineBezier( sal_uInt32 nPoints, virtual bool drawPolyLineBezier( sal_uInt32 nPoints,
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include "openglgdiimpl.hxx" #include "openglgdiimpl.hxx"
#include <vcl/gradient.hxx>
OpenGLSalGraphicsImpl::~OpenGLSalGraphicsImpl() OpenGLSalGraphicsImpl::~OpenGLSalGraphicsImpl()
{ {
} }
...@@ -270,4 +272,10 @@ bool OpenGLSalGraphicsImpl::drawAlphaRect( ...@@ -270,4 +272,10 @@ bool OpenGLSalGraphicsImpl::drawAlphaRect(
return false; return false;
} }
bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& /*rPolygon*/,
const Gradient& /*rGradient*/)
{
return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "gdiimpl.hxx" #include "gdiimpl.hxx"
#include "vcl/salbtype.hxx" #include "vcl/salbtype.hxx"
#include <vcl/gradient.hxx>
#include "unx/salunx.h" #include "unx/salunx.h"
#include "unx/saldata.hxx" #include "unx/saldata.hxx"
...@@ -1776,4 +1777,9 @@ long X11SalGraphicsImpl::GetGraphicsWidth() const ...@@ -1776,4 +1777,9 @@ long X11SalGraphicsImpl::GetGraphicsWidth() const
return 0; return 0;
} }
bool X11SalGraphicsImpl::drawGradient(const tools::PolyPolygon& /*rPolygon*/, const Gradient& /*rGradient*/)
{
return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -33,6 +33,7 @@ class SalGraphics; ...@@ -33,6 +33,7 @@ class SalGraphics;
class SalBitmap; class SalBitmap;
class SalPolyLine; class SalPolyLine;
class X11SalGraphics; class X11SalGraphics;
class Gradient;
class X11SalGraphicsImpl : public SalGraphicsImpl class X11SalGraphicsImpl : public SalGraphicsImpl
{ {
...@@ -261,7 +262,7 @@ public: ...@@ -261,7 +262,7 @@ public:
long nWidth, long nHeight, long nWidth, long nHeight,
sal_uInt8 nTransparency ) SAL_OVERRIDE; sal_uInt8 nTransparency ) SAL_OVERRIDE;
virtual bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) SAL_OVERRIDE;
}; };
#endif #endif
......
...@@ -482,4 +482,9 @@ bool X11SalGraphics::drawPolyLine( ...@@ -482,4 +482,9 @@ bool X11SalGraphics::drawPolyLine(
eLineJoin, eLineCap ); eLineJoin, eLineCap );
} }
bool X11SalGraphics::drawGradient(const tools::PolyPolygon& rPoly, const Gradient& rGradient)
{
return mpImpl->drawGradient(rPoly, rGradient);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment