From 9fc4f06840b10c94445cad21d24b6f78c79cff65 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sun, 20 Oct 2002 14:31:13 +0000 Subject: [PATCH] Includes grid lines at perimeter. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@168 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/src/view.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/glabels2/src/view.c b/glabels2/src/view.c index a922d995..59740993 100644 --- a/glabels2/src/view.c +++ b/glabels2/src/view.c @@ -832,9 +832,8 @@ draw_grid_layer (glView *view) points->coords[1] = 0.0; points->coords[3] = h; - for ( x=view->grid_spacing; x < w; x += view->grid_spacing ) { + for ( x=0.0; x < w; x += view->grid_spacing ) { points->coords[0] = points->coords[2] = x; - item = gnome_canvas_item_new (view->grid_group, gnome_canvas_line_get_type (), "points", points, @@ -842,12 +841,18 @@ draw_grid_layer (glView *view) "fill_color_rgba", GRID_COLOR, NULL); } + points->coords[0] = points->coords[2] = w; + item = gnome_canvas_item_new (view->grid_group, + gnome_canvas_line_get_type (), + "points", points, + "width_pixels", 1, + "fill_color_rgba", GRID_COLOR, + NULL); points->coords[0] = 0.0; points->coords[2] = w; - for ( y=view->grid_spacing; y < h; y += view->grid_spacing ) { + for ( y=0.0; y < h; y += view->grid_spacing ) { points->coords[1] = points->coords[3] = y; - item = gnome_canvas_item_new (view->grid_group, gnome_canvas_line_get_type (), "points", points, @@ -855,6 +860,13 @@ draw_grid_layer (glView *view) "fill_color_rgba", GRID_COLOR, NULL); } + points->coords[1] = points->coords[3] = h; + item = gnome_canvas_item_new (view->grid_group, + gnome_canvas_line_get_type (), + "points", points, + "width_pixels", 1, + "fill_color_rgba", GRID_COLOR, + NULL); gnome_canvas_points_free (points); -- 2.39.5