diff options
author | Radek Doulik <rodo@novell.com> | 2011-07-12 13:35:43 +0200 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2011-07-12 13:35:43 +0200 |
commit | ac4419bd8a262c6248f06d2124ada924e9b92e99 (patch) | |
tree | 982c06de5d93518a8d464f52d7bbbf7e7df5dc5f | |
parent | 2f580a32ad5dbb46cd3897316a12aea032b9e10e (diff) |
fix set color regression in cairo canvas
- the cairo_set_source_rgba should be called with non-alpha-pre-multiplied
color values
- fixes fdo#33591 and fdo#35681
-rw-r--r-- | canvas/source/cairo/cairo_canvashelper.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index 18e23f3536..ccf7dd9e15 100644 --- a/canvas/source/cairo/cairo_canvashelper.cxx +++ b/canvas/source/cairo/cairo_canvashelper.cxx @@ -128,13 +128,11 @@ namespace cairocanvas { if( rColor.getLength() > 3 ) { - const double alpha = rColor[3]; - cairo_set_source_rgba( pCairo, - alpha*rColor[0], - alpha*rColor[1], - alpha*rColor[2], - alpha ); + rColor[0], + rColor[1], + rColor[2], + rColor[3] ); } else if( rColor.getLength() == 3 ) cairo_set_source_rgb( pCairo, |