aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-09-18 18:17:33 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-09-18 18:17:33 +0000
commita56894867b93d753bafd9a706fbbe6a3190460ec (patch)
tree8ae1ec9d0acfcf28686b6f03c66871bd96a35526
parentcfb9eece7abd8428859ea5842aff4a9d5777a00c (diff)
change color, draw at bottom
-rw-r--r--Sgraph.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/Sgraph.c b/Sgraph.c
index 4779d6d..8a567f0 100644
--- a/Sgraph.c
+++ b/Sgraph.c
@@ -55,7 +55,7 @@ static XtResource resources[] = {
XtRString, "black" },
{ XtNbackground, XtCBackground, XtRPixel,
sizeof(Pixel), XtOffset(Widget, core.background_pixel),
- XtRString, "dark slate gray" },
+ XtRString, "navy blue" },
{ XtNmirror, XtCBoolean, XtRBoolean,
sizeof(Boolean), XtOffset(SgraphWidget, sgraph.mirror),
XtRBoolean, False },
@@ -228,6 +228,7 @@ Redisplay(Widget w, XEvent *event, Region r)
Dimension width = winwidth / 2;
Dimension height = winheight / 4;
Dimension x, yl, yr;
+ Dimension bottom;
XdbeSwapInfo swap;
if (!XtIsRealized(w))
@@ -251,18 +252,20 @@ Redisplay(Widget w, XEvent *event, Region r)
0, 0, width, height);
*/
+ bottom = sw->core.height;
+
for (x = 0; x < sw->sgraph.size / 2; x++) {
yl = sw->sgraph.leftData[x];
yr = sw->sgraph.rightData[x];
XDrawLine(XtDisplay(sw), sw->sgraph.backBuf,
sw->sgraph.foreGC,
- width - x, height,
- width - x, height - yl);
+ width - x, bottom,
+ width - x, bottom - yl);
XDrawLine(XtDisplay(sw), sw->sgraph.backBuf,
sw->sgraph.foreGC,
- width + x, height,
- width + x, height - yr);
+ width + x, bottom,
+ width + x, bottom - yr);
}
swap.swap_window = XtWindow(sw);