[dia] Bug #590369 - fix rounding to SVG color



commit 76d34272cfdd07b8f365c830ef9741c2e08e8af7
Author: Hans Breuer <hans breuer org>
Date:   Fri Oct 23 19:40:02 2009 +0200

    Bug #590369 - fix rounding to SVG color

 lib/diasvgrenderer.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/lib/diasvgrenderer.c b/lib/diasvgrenderer.c
index 40b3e7f..ff9b24d 100644
--- a/lib/diasvgrenderer.c
+++ b/lib/diasvgrenderer.c
@@ -236,8 +236,9 @@ get_draw_style(DiaSvgRenderer *renderer,
 
   if (colour)
     g_string_append_printf(str, "; stroke: #%02x%02x%02x",
-		      (int)ceil(255*colour->red), (int)ceil(255*colour->green),
-		      (int)ceil(255*colour->blue));
+		      (int)(255*colour->red), 
+			  (int)(255*colour->green),
+		      (int)(255*colour->blue));
 
   return str->str;
 }
@@ -252,8 +253,9 @@ get_fill_style(DiaSvgRenderer *renderer,
   if (!str) str = g_string_new(NULL);
 
   g_string_printf(str, "fill: #%02x%02x%02x",
-		   (int)ceil(255*colour->red), (int)ceil(255*colour->green),
-		   (int)ceil(255*colour->blue));
+		   (int)(255*colour->red), 
+		   (int)(255*colour->green),
+		   (int)(255*colour->blue));
 
   return str->str;
 }



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