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 | 72eff9e69217a5877e1fd1d5b5555f258556dd53 (patch) | |
tree | bae23fa5803e70cafc4ebbf6d9cbb2b344da85d1 /canvas | |
parent | 4cb993343f58112dbe15cb188ba643a6c4e5bf7c (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
Diffstat (limited to 'canvas')
-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 2f1e39b8a19e..ebf0e1aac3e4 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, |