[dia] drs: avoid ceil() for color value conversion
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] drs: avoid ceil() for color value conversion
- Date: Sun, 3 Apr 2011 17:02:41 +0000 (UTC)
commit c066b774db784b46b233d19da83ff6bae91c0d1a
Author: Hans Breuer <hans breuer org>
Date: Sun Apr 3 18:44:25 2011 +0200
drs: avoid ceil() for color value conversion
plug-ins/drs/dia-render-script-renderer.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/drs/dia-render-script-renderer.c b/plug-ins/drs/dia-render-script-renderer.c
index 2ac7bfa..81cfe9d 100644
--- a/plug-ins/drs/dia-render-script-renderer.c
+++ b/plug-ins/drs/dia-render-script-renderer.c
@@ -154,8 +154,8 @@ _node_set_color (xmlNodePtr node, const char *name, const Color *color)
gchar *value;
value = g_strdup_printf ("#%02x%02x%02x",
- (int)ceil(255*color->red), (int)ceil(255*color->green),
- (int)ceil(255*color->blue));
+ (int)(255*color->red), (int)(255*color->green),
+ (int)(255*color->blue));
xmlSetProp(node, (const xmlChar *)name, (xmlChar *)value);
g_free (value);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]