diff options
author | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-29 18:24:08 +0000 |
---|---|---|
committer | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-08-29 18:24:08 +0000 |
commit | 6513feff3e91ce0278592a19132dc38b76bcffd5 (patch) | |
tree | c3def6342ebd9c427fe68a9f42ad75bd6de6fa98 /src | |
parent | 9852df6e6d82a75d52b7269ceeebeca7ee02ead3 (diff) |
A little more accuracy in drawing things
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@91 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src')
-rw-r--r-- | src/imagedisplay.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/imagedisplay.c b/src/imagedisplay.c index 45d3fe0..5fce92f 100644 --- a/src/imagedisplay.c +++ b/src/imagedisplay.c @@ -152,12 +152,11 @@ void imagedisplay_close(ImageDisplay *imagedisplay) { static gboolean imagedisplay_redraw(GtkWidget *drawingarea, GdkEventExpose *event, ImageDisplay *imagedisplay) { - gint xoffs, yoffs; - double scale; + double scale, xoffs, yoffs; ImageDisplayMark *cur; - xoffs = (imagedisplay->drawingarea_width - imagedisplay->view_width) / 2; - yoffs = (imagedisplay->drawingarea_height - imagedisplay->view_height) / 2; + xoffs = ((double)imagedisplay->drawingarea_width - imagedisplay->view_width) / 2; + yoffs = ((double)imagedisplay->drawingarea_height - imagedisplay->view_height) / 2; scale = (double)imagedisplay->view_width/imagedisplay->imagerecord.width; gdk_draw_pixbuf(drawingarea->window, drawingarea->style->bg_gc[GTK_WIDGET_STATE(drawingarea)], imagedisplay->pixbuf_scaled, @@ -196,9 +195,9 @@ static gboolean imagedisplay_redraw(GtkWidget *drawingarea, GdkEventExpose *even cur = imagedisplay->marks; while ( cur ) { gdk_draw_arc(drawingarea->window, imagedisplay->gc_marks, FALSE, - xoffs + cur->x*scale, - yoffs + cur->y*scale, - 10, 10, 0, 64*360); + xoffs + cur->x*scale - 5, + yoffs + cur->y*scale - 5, + 11, 11, 0, 64*360); cur = cur->next; } |