diff options
| author | Felipe Corr??a da Silva Sanches <juca@members.fsf.org> | 2008-02-13 16:34:27 +0000 |
|---|---|---|
| committer | JucaBlues <JucaBlues@users.sourceforge.net> | 2008-02-13 16:34:27 +0000 |
| commit | 7aa1d026f5ea71a680651548233d79678a9d4e54 (patch) | |
| tree | 93454700e1f57f5f483a65e797015601e5de7835 /src/display | |
| parent | first shot at ACD Systems Canvas 11 keyboard shortcuts scheme (diff) | |
| download | inkscape-7aa1d026f5ea71a680651548233d79678a9d4e54.tar.gz inkscape-7aa1d026f5ea71a680651548233d79678a9d4e54.zip | |
fix for bug #189788
pixbuffer was erroneously initialized in premultiplied alpha mode.
(bzr r4721)
Diffstat (limited to 'src/display')
| -rw-r--r-- | src/display/nr-filter-flood.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/display/nr-filter-flood.cpp b/src/display/nr-filter-flood.cpp index 34ab8eaa0..ef95b87e5 100644 --- a/src/display/nr-filter-flood.cpp +++ b/src/display/nr-filter-flood.cpp @@ -37,16 +37,16 @@ int FilterFlood::render(FilterSlot &slot, FilterUnits const &/*units*/) { NRPixBlock *out = new NRPixBlock; - nr_pixblock_setup_fast(out, in->mode, + nr_pixblock_setup_fast(out, NR_PIXBLOCK_MODE_R8G8B8A8N, in->area.x0, in->area.y0, in->area.x1, in->area.y1, true); unsigned char *out_data = NR_PIXBLOCK_PX(out); unsigned char r,g,b,a; - r = (unsigned char) (color >> 24) % 256; - g = (unsigned char) (color >> 16) % 256; - b = (unsigned char) (color >> 8) % 256; + r = CLAMP_D_TO_U8((color >> 24) % 256); + g = CLAMP_D_TO_U8((color >> 16) % 256); + b = CLAMP_D_TO_U8((color >> 8) % 256); a = CLAMP_D_TO_U8(opacity*255); for(i=0; i < 4*in_h*in_w; i+=4){ |
