From 9467621e730509a2b5d1822857ee2d7474a208aa Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 3 Sep 2014 19:38:11 +0000 Subject: simpilfy --- spectrogram.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spectrogram.c') diff --git a/spectrogram.c b/spectrogram.c index 27d16e5..b903373 100644 --- a/spectrogram.c +++ b/spectrogram.c @@ -148,13 +148,13 @@ usage(void) void init_bg(Display *d, Pixmap pix, GC gc, XRectangle r, unsigned long *pal) { - int i; + int i, x, y; + x = r.width - 1; for (i = 0; i < r.height; i++) { + y = r.height - i - 1; XSetForeground(d, gc, pal[i]); - XDrawLine(d, pix, gc, - 0, r.height - i - 1, - r.width - 1, r.height - i - 1); + XDrawLine(d, pix, gc, 0, y, x, y); } } -- cgit v1.2.3