swk

static widget kit
git clone git://git.suckless.org/swk
Log | Files | Refs | README | LICENSE

commit 28b8e9f7f33c290ba6ef92617ecd32801fa0e3b7
parent 1da341d02a02e76c031543f874e4595eff459486
Author: pancake <pancake@nopcode.org>
Date:   Fri, 27 Aug 2010 20:01:44 +0200

enhace support for drawing lines in x11 backend
fix build
Diffstat:
gi_x11.c | 7+------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/gi_x11.c b/gi_x11.c @@ -219,13 +219,8 @@ swk_gi_flip() { void swk_gi_line(int x1, int y1, int x2, int y2, int color) { Rect r = { x1, y1, x2, y2 }; -XXX XSetForeground(dc->dpy, dc->gc, col[color]); -XDrawLine(dc->dpy, dc->canvas, dc->gc, x1, y1, x2, y2); -return; - if(!x2 || !y2) - swk_gi_fill(r, color, 0); - // TODO: add support for diagonal lines? + XDrawLine(dc->dpy, dc->canvas, dc->gc, x1*fs, y1*fs, (x1+x2)*fs, (y1+y2)*fs); } void