[hackers] [swk] enhace support for drawing lines in x11 backend || pancake

From: <hg_AT_suckless.org>
Date: Fri, 27 Aug 2010 18:05:04 +0000 (UTC)

changeset: 69:3fdf91904efe
tag: tip
user: pancake <pancake_AT_nopcode.org>
date: Fri Aug 27 20:01:44 2010 +0200
files: gi_x11.c
description:
enhace support for drawing lines in x11 backend
fix build

diff -r 9774662be35c -r 3fdf91904efe gi_x11.c
--- a/gi_x11.c Fri Aug 27 19:55:23 2010 +0200
+++ b/gi_x11.c Fri Aug 27 20:01:44 2010 +0200
@@ -219,13 +219,8 @@
 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
Received on Fri Aug 27 2010 - 20:05:04 CEST

This archive was generated by hypermail 2.2.0 : Fri Aug 27 2010 - 20:12:04 CEST