summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-07-01 17:48:28 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2014-07-01 19:37:43 +0000
commit1e87982fa1ecd53ee08ce15f626a50fd959592ca (patch)
tree9898785ed0c76046334b0715393dda65687b1242
parentacb1e71b48023f526d3ba9a6ff4d5f45600b48cc (diff)
fdo#80014: vcl: fix drawing of linear gradients
There is an off-by-one error in OutputDevice::ImplDrawLinearGradient() that causes the bottom line to remain black. (regression from 04d937c1ec36c2d9fa8c90604c81a37d30e97da6) Change-Id: I33948ec8065e446a9ec7efeab5e506c93fa2e9e8 (cherry picked from commit d51f53fedb8cd68b1b3122c7199c4ea2d3a6980f) Reviewed-on: https://gerrit.libreoffice.org/10024 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--vcl/source/outdev/gradient.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 7a4a3c50a946..1f2a26c74b36 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -320,7 +320,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
// Polygon for this color step
aRect.Top() = (long)( fGradientLine + ((double) i) * fScanInc );
- aRect.Bottom() = (long)( fGradientLine + ( ((double) i) + 1.0 ) * fScanInc + fScanInc*.1 );
+ aRect.Bottom() = (long)( fGradientLine + ( ((double) i) + 1.0 ) * fScanInc );
aPoly[0] = aRect.TopLeft();
aPoly[1] = aRect.TopRight();
aPoly[2] = aRect.BottomRight();