aboutsummaryrefslogtreecommitdiff
path: root/Sgraph.c
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-09-18 16:33:35 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-09-18 16:33:35 +0000
commit1d95aaae57f555f8b6930cf223316fb2ab6fc430 (patch)
treece3621fc7d10e754a82f83e5096be9e53e833f5d /Sgraph.c
parent33652e007609f316c2cb8543b88d4e38738b0957 (diff)
basic data display
Diffstat (limited to 'Sgraph.c')
-rw-r--r--Sgraph.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/Sgraph.c b/Sgraph.c
index a8e1e3f..3251384 100644
--- a/Sgraph.c
+++ b/Sgraph.c
@@ -250,22 +250,30 @@ Redisplay(Widget w, XEvent *event, Region r)
0, 0, width, height);
*/
+ /*
XDrawLine(XtDisplay(sw), sw->sgraph.backBuf, sw->sgraph.foreGC,
0, height / 2, 2 * width, height / 2);
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] * height / 2;
+ if (x > width)
+ yl = sw->sgraph.leftData[x] * height / 2;
+ else
+ yl = sw->sgraph.leftData[x];
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);
+ XDrawLine(XtDisplay(sw), sw->sgraph.backBuf,
+ sw->sgraph.foreGC,
+ x, height / 2, x, yl);
+ /*
XDrawPoint(XtDisplay(sw), sw->sgraph.backBuf,
sw->sgraph.foreGC, x, yr);
+ */
}
/* flicker test */