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



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

    Bug #590369 - fix rounding to SVG color
    (cherry picked from commit 76d34272cfdd07b8f365c830ef9741c2e08e8af7)

 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]