[gimp] gfig: Don't do integer division
- From: Mikael Magnusson <mikachu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] gfig: Don't do integer division
- Date: Sat, 16 Aug 2014 02:04:11 +0000 (UTC)
commit 4cd23d6b6e4d230eee2ab99855fb4e235a501ae4
Author: Mikael Magnusson <mikachu src gnome org>
Date: Sat Aug 16 02:43:09 2014 +0200
gfig: Don't do integer division
plug-ins/gfig/gfig-grid.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/plug-ins/gfig/gfig-grid.c b/plug-ins/gfig/gfig-grid.c
index ffc745c..f6e3b08 100644
--- a/plug-ins/gfig/gfig-grid.c
+++ b/plug-ins/gfig/gfig-grid.c
@@ -373,8 +373,8 @@ draw_grid_polar (cairo_t *cr)
gdouble t;
gdouble sector_size = 2 * G_PI / current_sectors;
cairo_arc (cr,
- 0.5 + preview_width / 2,
- 0.5 + preview_height / 2,
+ 0.5 + preview_width / 2.0,
+ 0.5 + preview_height / 2.0,
outer_radius, 0, 2 * G_PI);
cairo_stroke (cr);
@@ -391,11 +391,11 @@ draw_grid_polar (cairo_t *cr)
gdouble normal_x = cos (selvals.opts.grid_rotation+t);
gdouble normal_y = sin (selvals.opts.grid_rotation+t);
cairo_move_to (cr,
- 0.5 + (preview_width / 2 + inner_radius * normal_x),
- 0.5 + (preview_height / 2 - inner_radius * normal_y));
+ 0.5 + (preview_width / 2.0 + inner_radius * normal_x),
+ 0.5 + (preview_height / 2.0 - inner_radius * normal_y));
cairo_line_to (cr,
- 0.5 + (preview_width / 2 + outer_radius * normal_x),
- 0.5 + (preview_height / 2 - outer_radius * normal_y));
+ 0.5 + (preview_width / 2.0 + outer_radius * normal_x),
+ 0.5 + (preview_height / 2.0 - outer_radius * normal_y));
cairo_stroke (cr);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]