Author: Carlos Lopez <[email protected]>
Date: Tue Aug 14 10:06:40 2012 +0200
Layer_Polygon: treat the colors for feathered polygons correctly
---
synfig-core/src/synfig/layer_polygon.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/synfig-core/src/synfig/layer_polygon.cpp
b/synfig-core/src/synfig/layer_polygon.cpp
index 4059f9a..34af608 100644
--- a/synfig-core/src/synfig/layer_polygon.cpp
+++ b/synfig-core/src/synfig/layer_polygon.cpp
@@ -321,12 +321,14 @@ Layer_Polygon::accelerated_cairorender(Context
context,cairo_surface_t *surface,
// Blue the alpha values
Blur(feather,feather,blurtype,cb)(shapesurface,workdesc.get_br()-workdesc.get_tl(),shapesurface);
// repaint the cairosubimage with the result
- CairoColor ccolor(color);
+ Color ccolor(color);
for(y=0; y<wh; y++)
for(x=0;x<ww;x++)
{
float a=shapesurface[y][x];
- cairosubimage[y][x]=(ccolor*a).set_a((unsigned
char)a/Color::ceil);
+ ccolor.set_a(a);
+ ccolor.clamped();
+
cairosubimage[y][x]=CairoColor(ccolor).premult_alpha();
}
cairosubimage.unmap_cairo_image();
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl