Commit cbc2164e authored by Cedric Roux's avatar Cedric Roux

T: bugfix: vertical tick was off by 1 pixel

The problem was visible when DL MCS was set to 20
(do a ping -c 192.172.0.1 -i0.2 to get it). The dots
were not plotted at the exact line of the tick mark.

Not sure the fix is always correct.

No big deal anyway.
parent 1e485b4b
...@@ -70,7 +70,7 @@ static void paint(gui *_gui, widget *_this) ...@@ -70,7 +70,7 @@ static void paint(gui *_gui, widget *_this)
*/ */
char v[64]; char v[64];
int vwidth, dummy; int vwidth, dummy;
float x = (k * ticstep - allocated_xmin) / int x = (k * ticstep - allocated_xmin) /
(allocated_xmax - allocated_xmin) * (allocated_xmax - allocated_xmin) *
(allocated_plot_width - 1); (allocated_plot_width - 1);
x_draw_line(g->x, g->xwin, FOREGROUND_COLOR, x_draw_line(g->x, g->xwin, FOREGROUND_COLOR,
...@@ -112,7 +112,7 @@ static void paint(gui *_gui, widget *_this) ...@@ -112,7 +112,7 @@ static void paint(gui *_gui, widget *_this)
for (k = kmin; k <= kmax; k++) { for (k = kmin; k <= kmax; k++) {
char v[64]; char v[64];
int vwidth, dummy; int vwidth, dummy;
float y = (k * ticstep - allocated_ymin) / int y = (k * ticstep - allocated_ymin) /
(allocated_ymax - allocated_ymin) * (allocated_ymax - allocated_ymin) *
(allocated_plot_height - 1); (allocated_plot_height - 1);
sprintf(v, "%g", k * ticstep); sprintf(v, "%g", k * ticstep);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment