aboutsummaryrefslogtreecommitdiff
path: root/spectrogram.c
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2013-06-27 12:25:23 +0000
committerDimitri Sokolyuk <demon@dim13.org>2013-06-27 12:25:23 +0000
commit83428e0a9cf8dccd447d9cdf23e35a68a283bea0 (patch)
treec22fb82d4738592700d837b32f96009154232ead /spectrogram.c
parent5f1c6fab613c1c39ba895dd4e59e498fc026fecd (diff)
add separator line
Diffstat (limited to 'spectrogram.c')
-rw-r--r--spectrogram.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/spectrogram.c b/spectrogram.c
index 0255fc7..860631e 100644
--- a/spectrogram.c
+++ b/spectrogram.c
@@ -143,8 +143,8 @@ draw_panel(Display *d, struct panel *p)
/* blit waterfall */
XCopyArea(d, p->pix, p->pix, p->pgc,
- p->w.x, p->w.y, p->w.width, p->w.height - 1,
- p->w.x, p->w.y + 1);
+ p->w.x, p->w.y + 1, p->w.width, p->w.height - 2,
+ p->w.x, p->w.y + 2);
/* clear spectrogram */
XSetForeground(d, p->pgc, p->palette[0]);
@@ -168,7 +168,7 @@ draw_panel(Display *d, struct panel *p)
/* draw waterfall */
XSetForeground(d, p->pgc, p->palette[v]);
XDrawPoint(d, p->pix, p->pgc,
- x, p->w.y);
+ x, p->w.y + 1);
/* draw spectrogram */
XSetForeground(d, p->mgc, 1);
@@ -213,6 +213,7 @@ init_panel(Display *d, Window win, int x, int y, int w, int h, int mirror)
unsigned long white = WhitePixel(d, scr);
unsigned long black = BlackPixel(d, scr);
unsigned long *bgpalette, *shpalette;
+ unsigned long gray;
p = malloc(sizeof(struct panel));
if (!p)
@@ -272,6 +273,11 @@ init_panel(Display *d, Window win, int x, int y, int w, int h, int mirror)
XFillRectangle(d, p->pix, p->pgc,
p->p.x, p->p.y, p->p.width, p->p.height);
+ gray = hsvcolor(d, 0.0, 0.0, 0.1);
+ XSetForeground(d, p->pgc, gray);
+ XDrawLine(d, p->pix, p->pgc, p->w.x, p->w.y,
+ p->w.x + p->w.width, p->w.y);
+
/* clear shadow mask */
XSetForeground(d, p->sgc, 0);
XSetBackground(d, p->sgc, 0);