aboutsummaryrefslogtreecommitdiff
path: root/Sgraph.c
diff options
context:
space:
mode:
Diffstat (limited to 'Sgraph.c')
-rw-r--r--Sgraph.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Sgraph.c b/Sgraph.c
index b06544f..e18a2de 100644
--- a/Sgraph.c
+++ b/Sgraph.c
@@ -249,9 +249,13 @@ Redisplay(Widget w, XEvent *event, Region r)
XDrawLine(XtDisplay(sw), sw->sgraph.backBuf, sw->sgraph.foreGC,
0, height / 2 + height, 2 * width, height / 2 + height);
for (x = 0; x < sw->sgraph.size; x++) {
- yl = sw->sgraph.leftData[x] / (2 * height) + height / 2;
- yr = sw->sgraph.rightData[x] / (2 * height) + height / 2;
+ yl = sw->sgraph.leftData[x] * height / 2;
+ yl += height / 2;
+
+ yr = sw->sgraph.rightData[x] * height / 2;
+ yr += height / 2;
yr += height;
+
XDrawPoint(XtDisplay(sw), sw->sgraph.backBuf,
sw->sgraph.foreGC, x, yl);
XDrawPoint(XtDisplay(sw), sw->sgraph.backBuf,