[lasem] svg_feflood: fix opacity.



commit cff081ac3209918fc98b1dafd6d68ced8e04995c
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Sun Oct 14 17:52:08 2012 +0200

    svg_feflood: fix opacity.

 src/lsmcairo.c   |    2 +-
 src/lsmsvgview.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/lsmcairo.c b/src/lsmcairo.c
index 49574b7..23576a5 100644
--- a/src/lsmcairo.c
+++ b/src/lsmcairo.c
@@ -289,7 +289,7 @@ lsm_filter_surface_flood (LsmFilterSurface *surface, guint32 color, double opaci
 	stride = cairo_image_surface_get_stride (surface->surface);
 	pixels = cairo_image_surface_get_data (surface->surface);
 
-	int_opacity = (double) (0.5 + opacity * 255.0); 
+	int_opacity = (double) (0.5 + (double) opacity * 255.0); 
 
 	for (i = 0; i < 3; i++)
 		pixcolour[i] = (int) (((unsigned char *)
diff --git a/src/lsmsvgview.c b/src/lsmsvgview.c
index da2fba5..60c0f6a 100644
--- a/src/lsmsvgview.c
+++ b/src/lsmsvgview.c
@@ -2102,7 +2102,7 @@ lsm_svg_view_apply_flood (LsmSvgView *view, const char *output,
 	green = (double) (0.5 + view->style->flood_color->value.green * 255.0);
 	blue = (double) (0.5 + view->style->flood_color->value.blue * 255.0);
 	color = red << 16 | green << 8 | blue << 0;
-	opacity = view->style->fill_opacity->value;
+	opacity = view->style->flood_opacity->value;
 
 	lsm_log_render ("[SvgView::apply_flood] color = 0x%06x - opacity = %g",
 			color, opacity);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]