aboutsummaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2007-12-04 00:36:39 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2007-12-04 00:36:39 +0000
commitb20e64d4f9bc5e60457a9276047e1e570e3cd94d (patch)
tree5f049da713c4817303c614c7aa32774862f6597c /gtk
parented0bb11925381a4ac9b26fdb1ac1be33fa73eaf7 (diff)
Simplified y-positions for FBAR and DOT to ensure out-of-graph values are
drawn as they should be. I hope this is the last fix this time... svn path=/trunk/; revision=23729
Diffstat (limited to 'gtk')
-rw-r--r--gtk/io_stat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/io_stat.c b/gtk/io_stat.c
index c0be4afc18..c7bcb8e0c5 100644
--- a/gtk/io_stat.c
+++ b/gtk/io_stat.c
@@ -928,9 +928,9 @@ io_stat_draw(io_stat_t *io)
gdk_draw_rectangle(io->pixmap,
io->graphs[i].gc, TRUE,
x_pos-io->pixels_per_tick/2,
- (guint32)(draw_height-1-(val*draw_height)/max_y+top_y_border),
+ y_pos,
io->pixels_per_tick,
- (guint32)((val*draw_height)/max_y));
+ draw_height-1+top_y_border-y_pos);
}
break;
case PLOT_STYLE_DOT:
@@ -938,7 +938,7 @@ io_stat_draw(io_stat_t *io)
gdk_draw_rectangle(io->pixmap,
io->graphs[i].gc, TRUE,
x_pos-io->pixels_per_tick/2,
- (guint32)(draw_height-(val*draw_height)/max_y+top_y_border-io->pixels_per_tick/2),
+ y_pos-io->pixels_per_tick/2,
io->pixels_per_tick,
io->pixels_per_tick);
}