summaryrefslogtreecommitdiff
path: root/vcl/source/outdev/gradient.cxx
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>2014-11-13 21:31:42 -0500
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-11-15 12:17:42 +0100
commit330b7b310193f3290cbd4c340659f72d12c352e1 (patch)
tree6eaf03f423a2f6ad57bf8626973bcb0d04e312ce /vcl/source/outdev/gradient.cxx
parentaa9dfcee5039246874809f1235835415b8eaa1a9 (diff)
vcl: Draw gradient in alpha device even when using native rendering
Change-Id: Iead4ac3e97197f8f863242a2162907b32c3c5b2b
Diffstat (limited to 'vcl/source/outdev/gradient.cxx')
-rw-r--r--vcl/source/outdev/gradient.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 50855e341aa6..77be6a0264ea 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -41,6 +41,8 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
const Gradient& rGradient )
{
+ bool bDrawn = false;
+
if ( mnDrawMode & DRAWMODE_NOGRADIENT )
return; // nothing to draw!
@@ -52,11 +54,10 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
if ( mpGraphics || AcquireGraphics() )
{
- if ( mpGraphics->DrawGradient( rPolyPoly, rGradient, this ) )
- return;
+ bDrawn = mpGraphics->DrawGradient( rPolyPoly, rGradient, this );
}
- if ( rPolyPoly.Count() && rPolyPoly[ 0 ].GetSize() )
+ if ( !bDrawn && rPolyPoly.Count() && rPolyPoly[ 0 ].GetSize() )
{
if ( mnDrawMode & ( DRAWMODE_BLACKGRADIENT | DRAWMODE_WHITEGRADIENT | DRAWMODE_SETTINGSGRADIENT) )
{