diff -urN microwindows-0.90/src/demos/mwin/mdemo.c microwindows-0.90.avn/src/demos/mwin/mdemo.c
--- microwindows-0.90/src/demos/mwin/mdemo.c	2003-03-28 08:43:27.000000000 +0300
+++ microwindows-0.90.avn/src/demos/mwin/mdemo.c	2003-09-11 13:31:38.000000000 +0400
@@ -340,10 +340,10 @@
 		w += 10;
 		GdSetForegroundColor(hdc->psd, RGB(0,255,0));
 		GdArcAngle(hdc->psd, x+w/2, y+h/2, w/2, h/2, startdegrees*64,
-			enddegrees*64, MWPIE);
+			enddegrees*64, MWPIE, 5);
 		GdSetForegroundColor(hdc->psd, RGB(0,0,0));
 		GdArcAngle(hdc->psd, x+w/2, y+h/2, w/2, h/2, startdegrees*64,
-			enddegrees*64, MWARCOUTLINE);
+			enddegrees*64, MWARCOUTLINE, 5);
 		/*GdSetForegroundColor(hdc->psd, RGB(255,255,255)));*/
 		/*GdPoint(hdc->psd, x+w/2, y+h/2);*/
 	}
diff -urN microwindows-0.90/src/engine/devarc.c microwindows-0.90.avn/src/engine/devarc.c
--- microwindows-0.90/src/engine/devarc.c	2003-05-06 10:18:38.000000000 +0400
+++ microwindows-0.90.avn/src/engine/devarc.c	2003-09-11 13:31:34.000000000 +0400
@@ -230,7 +230,7 @@
  */
 void
 GdArcAngle(PSD psd, MWCOORD x0, MWCOORD y0, MWCOORD rx, MWCOORD ry,
-	MWCOORD angle1, MWCOORD angle2, int type)
+	MWCOORD angle1, MWCOORD angle2, int type, MWCOORD w)
 {
 #if HAVEFLOAT
 	MWCOORD	ax, ay, bx, by;
@@ -246,7 +246,7 @@
 	by = b * ry;
 
 	/* call integer routine*/
-	GdArc(psd, x0, y0, rx, ry, ax, ay, bx, by, type);
+	GdArc(psd, x0, y0, rx, ry, ax, ay, bx, by, type, w);
 #endif /* HAVEFLOAT*/
 }
 
@@ -257,10 +257,14 @@
 	MWCOORD	rx, ry;
 	MWCOORD	ax, ay;
 	MWCOORD	bx, by;
+	MWCOORD width;
 	int	adir, bdir;
 	int	type;
+	long	vse;		/* Used by drawarcline */
 } SLICE;
 
+static void drawthickarc(SLICE *slice);
+
 /*
  * Clip a line segment for arc or pie drawing.
  * Returns 0 if line is clipped or on acceptable side, 1 if it's vertically
@@ -479,6 +483,13 @@
 	rx = slice->rx;
 	ry = slice->ry;
 
+	if (slice->width > 1
+	&& slice->type != MWPIE && slice->type != MWELLIPSEFILL) {
+		drawthickarc(slice);
+		return;
+	}
+	/* otherwise the width is ignored */
+
 	xp = 0;
 	yp = ry;
 	Asquared = rx * rx;
@@ -547,6 +558,217 @@
 
 }
 
+struct ptrn {
+	MWCOORD x;
+	MWCOORD y;
+	MWBOOL d;
+};
+
+#define VECR(x1, y1, x2, y2) ((x1)*(y2) - (x2)*(y1))
+static unsigned long
+getindex(MWCOORD x, MWCOORD y, struct ptrn *px, unsigned long st,
+	unsigned long cnt)
+{
+	unsigned long i;
+
+	for (i = st; i < cnt; i++)
+		if (VECR(x, y, px[i].x, px[i].y) <= 0)
+			return i;
+	return cnt - 1;
+}
+
+/**
+ * For ellipses, just draws a line.
+ * For arcs, tracks it point by point, putting those between start/end points
+ */
+static void
+drawarcline(SLICE *slice, MWCOORD x1, MWCOORD x2, MWCOORD y, struct ptrn *px,
+	unsigned long *cook, unsigned long cnt)
+{
+	MWCOORD i;
+	unsigned long id;
+	long vsp, vpe;
+
+	if (slice->type == MWELLIPSE && px == NULL) {
+		drawrow(slice->psd, slice->x0 + x1, slice->x0 + x2,
+			slice->y0 + y);
+		drawrow(slice->psd, slice->x0 + x1, slice->x0 + x2,
+			slice->y0 - y);
+		if (x1 == 0)
+			x1++;
+		drawrow(slice->psd, slice->x0 - x2, slice->x0 - x1,
+			slice->y0 + y);
+		drawrow(slice->psd, slice->x0 - x2, slice->x0 - x1,
+			slice->y0 - y);
+		return;
+	}
+
+	if (px != NULL)
+		id = *cook = getindex(x1, y, px, *cook, cnt);
+	/* Will check start/end points and pattern */
+	for (i = x1; i <= x2; i++) {
+		if (px != NULL) {
+			id = getindex(i, y, px, id, cnt);
+			if (!px[id].d)
+				continue;
+		}
+		vsp = VECR(slice->ax, slice->ay, i, y) <= 0;
+		vpe = VECR(i, y, slice->bx, slice->by) <= 0;
+		if ((vsp && vpe) || (!slice->vse && (vsp || vpe)))
+			drawpoint(slice->psd, slice->x0 + i, slice->y0 + y);
+		vsp = VECR(slice->ax, slice->ay, i, -y) <= 0;
+		vpe = VECR(i, -y, slice->bx, slice->by) <= 0;
+		if ((vsp && vpe) || (!slice->vse && (vsp || vpe)))
+			drawpoint(slice->psd, slice->x0 + i, slice->y0 - y);
+		if (i == 0)
+			continue;
+		vsp = VECR(slice->ax, slice->ay, -i, y) <= 0;
+		vpe = VECR(-i, y, slice->bx, slice->by) <= 0;
+		if ((vsp && vpe) || (!slice->vse && (vsp || vpe)))
+			drawpoint(slice->psd, slice->x0 - i, slice->y0 + y);
+		vsp = VECR(slice->ax, slice->ay, -i, -y) <= 0;
+		vpe = VECR(-i, -y, slice->bx, slice->by) <= 0;
+		if ((vsp && vpe) || (!slice->vse && (vsp || vpe)))
+			drawpoint(slice->psd, slice->x0 - i, slice->y0 - y);
+	}
+}
+
+struct cdraw {
+	MWCOORD xp;
+	MWCOORD yp;
+	long A2;
+	long TwoA2;
+	long B2;
+	long TwoB2;
+	long d;
+	long dx;
+	long dy;
+	long da;
+};
+
+static void
+cdr_setup(struct cdraw *c, MWCOORD rx, MWCOORD ry)
+{
+	c->xp = 0;
+	c->yp = ry;
+	c->A2 = rx * rx;
+	c->TwoA2 = 2 * c->A2;
+	c->B2 = ry * ry;
+	c->TwoB2 = 2 * c->B2;
+	c->d = c->B2 - c->A2 * ry + (c->A2 >> 2);
+	c->dx = 0;
+	c->dy = c->TwoA2 * ry;
+	c->da = 0;
+}
+
+#define cdr_willstep(c) ((c)->dx >= (c)->dy || (c)->d > 0)
+
+static void
+cdr_next(struct cdraw *c)
+{
+	if (c->dx < c->dy) {
+		if (c->d > 0) {
+			c->yp--;
+			c->dy -= c->TwoA2;
+			c->d -= c->dy;
+		}
+		c->xp++;
+		c->dx += c->TwoB2;
+		c->d += c->B2 + c->dx;
+		return;
+	}
+	if (!c->da) {
+		/* One-time adjustment */
+		c->da++;
+		c->d += (3L * (c->A2 - c->B2) / 2L - (c->dx + c->dy)) >> 1;
+	}
+	if (c->d < 0) {
+		c->xp++;
+		c->dx += c->TwoB2;
+		c->d += c->dx;
+	}
+	c->yp--;
+	c->dy -= c->TwoA2;
+	c->d += c->A2 - c->dy;
+}
+
+/**
+ * Draw thick arc/ellipse outline. Mostly copies the drawarc, but
+ * wals two paths at once, the inner and the outer.
+ */
+static void
+drawthickarc(SLICE *slice)
+{
+	extern unsigned long gr_dashcount;
+	extern unsigned long gr_dashmask;
+
+	struct ptrn *px;
+	unsigned long dc, bit, cnt, ck;
+	MWCOORD rx, ry;
+	long wi, wo;
+	struct cdraw i, o, c;
+
+	dc = gr_dashcount;
+	gr_dashcount = 0;
+
+	rx = slice->rx;
+	ry = slice->ry;
+	if (dc != 0) {
+		/* Fill the drawing pattern */
+		cdr_setup(&c, rx, ry);
+		px = ALLOCA(sizeof(*px) * (rx + ry));
+		for (bit = cnt = 0; c.yp >= 0; cdr_next(&c), cnt++) {
+			px[cnt].x = c.xp;
+			px[cnt].y = c.yp;
+			px[cnt].d = (gr_dashmask & (1 << bit));
+			bit = (bit + 1) % dc;
+		}
+	}
+	else {
+		px = NULL;
+		cnt = 0;
+	}
+	rx -= slice->width >> 1;
+	ry -= slice->width >> 1;
+	cdr_setup(&i, rx, ry);
+	rx += slice->width - 1;
+	ry += slice->width - 1;
+	cdr_setup(&o, rx, ry);
+
+	if (slice->type & MWARC)
+		slice->vse = VECR(slice->ax,slice->ay,slice->bx,slice->by)<=0;
+
+	ck = 0;
+	while (i.yp >= 0 || o.yp >= 0) {
+		if (o.yp > i.yp) {
+			/* Step only the outer */
+			if (cdr_willstep(&o))
+				drawarcline(slice, 0, o.xp, o.yp,
+					px, &ck, cnt);
+			cdr_next(&o);
+			continue;
+		}
+		wi = cdr_willstep(&i);
+		wo = cdr_willstep(&o);
+
+		if (wi && wo) {
+			/* Draw lines */
+			drawarcline(slice, i.xp, o.xp, o.yp, px, &ck, cnt);
+			cdr_next(&o);
+			cdr_next(&i);
+			continue;
+		}
+
+		if (!wo)
+			cdr_next(&o);
+		if (!wi)
+			cdr_next(&i);
+	}
+	gr_dashcount = dc;
+	if (dc != 0)
+		FREEA(px);
+}
+
 /**
  * Draw an arc or pie using start/end points.
  * Integer only routine.  To specify start/end angles,
@@ -569,7 +791,8 @@
  */
 void
 GdArc(PSD psd, MWCOORD x0, MWCOORD y0, MWCOORD rx, MWCOORD ry,
-	MWCOORD ax, MWCOORD ay, MWCOORD bx, MWCOORD by, int type)
+	MWCOORD ax, MWCOORD ay, MWCOORD bx, MWCOORD by, int type,
+	MWCOORD w)
 {
 	MWCOORD	adir, bdir;
 	SLICE	slice;
@@ -607,7 +830,7 @@
 	if (by == 0) ++by;
 
 	/* swap rightmost edge first */
-	if (bx > ax) {
+	if (bx > ax && (w == 1 || type == MWPIE)) {
 		MWCOORD swap;
 
 		swap = ax;
@@ -624,7 +847,7 @@
 	}
 
 	/* check for entire area clipped, draw with per-point clipping*/
-	if (GdClipArea(psd, x0-rx, y0-ry, x0+rx, y0+ry) == CLIP_INVISIBLE)
+	if (GdClipArea(psd, x0-rx-w, y0-ry-w, x0+rx+w, y0+ry+w) == CLIP_INVISIBLE)
 		return;
 
 	slice.psd = psd;
@@ -639,13 +862,19 @@
 	slice.adir = adir;
 	slice.bdir = bdir;
 	slice.type = type;
+	slice.width = w;
 
 	drawarc(&slice);
 
 	if (type & MWOUTLINE) {
 		/* draw two lines from rx,ry to arc endpoints*/
-		GdLine(psd, x0, y0, x0+ax, y0+ay, TRUE);
-		GdLine(psd, x0, y0, x0+bx, y0+by, TRUE);
+		w = w - (w >> 1);
+		ax += w * ax / rx;
+		ay += w * ay / ry;
+		bx += w * bx / rx;
+		by += w * by / ry;
+		GdLine(psd, x0, y0, x0+ax, y0+ay, TRUE, w);
+		GdLine(psd, x0, y0, x0+bx, y0+by, TRUE, w);
 	}
 
 	GdFixCursor(psd);
@@ -664,7 +893,8 @@
  * @param fill Nonzero for a filled ellipse, zero for an outline.
  */
 void
-GdEllipse(PSD psd, MWCOORD x, MWCOORD y, MWCOORD rx, MWCOORD ry, MWBOOL fill)
+GdEllipse(PSD psd, MWCOORD x, MWCOORD y, MWCOORD rx, MWCOORD ry, MWBOOL fill,
+	MWCOORD w)
 {
 	SLICE	slice;
 
@@ -674,7 +904,7 @@
 	/* Check if the ellipse bounding box is either totally visible
 	 * or totally invisible.  Draw with per-point clipping.
 	 */
-	switch (GdClipArea(psd, x - rx, y - ry, x + rx, y + ry)) {
+	switch (GdClipArea(psd, x-rx-w, y-ry-w, x+rx+w, y+ry+w)) {
 	case CLIP_VISIBLE:
 		/*
 		 * For size considerations, there's no low-level ellipse
@@ -696,6 +926,7 @@
 	slice.rx = rx;
 	slice.ry = ry;
 	slice.type = fill? MWELLIPSEFILL: MWELLIPSE;
+	slice.width = w;
 	/* other elements unused*/
 
 	drawarc(&slice);
diff -urN microwindows-0.90/src/engine/devdraw.c microwindows-0.90.avn/src/engine/devdraw.c
--- microwindows-0.90/src/engine/devdraw.c	2003-05-30 05:18:00.000000000 +0400
+++ microwindows-0.90.avn/src/engine/devdraw.c	2003-09-11 12:48:24.000000000 +0400
@@ -39,6 +39,9 @@
 /*static*/ void drawrow(PSD psd,MWCOORD x1,MWCOORD x2,MWCOORD y);
 static void drawcol(PSD psd,MWCOORD x,MWCOORD y1,MWCOORD y2);
 
+static void drawrect(PSD psd, MWCOORD x1, MWCOORD y1, MWCOORD x2, MWCOORD y2,
+		MWCOORD w);
+
 /**
  * Set the drawing mode for future calls.
  *
@@ -175,9 +178,22 @@
  * @param y Y co-ordinate to draw point.
  */
 void
-GdPoint(PSD psd, MWCOORD x, MWCOORD y)
+GdPoint(PSD psd, MWCOORD x, MWCOORD y, MWCOORD w)
 {
-	if (GdClipPoint(psd, x, y)) {
+	MWCOORD r2;
+
+	r2 = (w * w) >> 2;
+	if (w > 1) {
+		int xi, yi;
+		for (yi = -w + 1; yi < w; yi++)
+			for (xi = -w + 1; xi < w; xi++)
+				if (xi*xi + yi*yi < r2
+				&& GdClipPoint(psd, x + xi, y + yi)) {
+					psd->DrawPixel(psd, x + xi, y + yi, gr_foreground);
+					GdFixCursor(psd);
+				}
+	}
+	else if (GdClipPoint(psd, x, y)) {
 		psd->DrawPixel(psd, x, y, gr_foreground);
 		GdFixCursor(psd);
 	}
@@ -202,7 +218,7 @@
  */
 void
 GdLine(PSD psd, MWCOORD x1, MWCOORD y1, MWCOORD x2, MWCOORD y2,
-       MWBOOL bDrawLastPoint) 
+       MWBOOL bDrawLastPoint, MWCOORD w) 
 {
 	int xdelta;		/* width of rectangle around line */
 	int ydelta;		/* height of rectangle around line */
@@ -210,7 +226,7 @@
 	int yinc;		/* increment for moving y coordinate */
 	int rem;		/* current remainder */
 	unsigned int bit = 0;	/* used for dashed lines */
-	MWCOORD temp;
+	MWCOORD temp, mn, mx;
 
 	/* See if the line is horizontal or vertical. If so, then call
 	 * special routines.
@@ -229,7 +245,10 @@
 		}
 
 		/* call faster line drawing routine */
-		drawrow(psd, x1, x2, y1);
+		mn = y1 - w / 2;
+		mx = mn + w;
+		for (temp = mn; temp < mx; temp++)
+			drawrow(psd, x1, x2, temp);
 		GdFixCursor(psd);
 		return;
 	}
@@ -247,11 +266,19 @@
 		}
 
 		/* call faster line drawing routine */
-		drawcol(psd, x1, y1, y2);
+		mn = x1 - w / 2;
+		mx = mn + w;
+		for (temp = mn; temp < mx; temp++)
+			drawcol(psd, temp, y1, y2);
 		GdFixCursor(psd);
 		return;
 	}
 
+	if (w > 1) {
+		drawrect(psd, x1, y1, x2, y2, w);
+		return;
+	}
+
 	/* See if the line is either totally visible or totally invisible. If
 	 * so, then the line drawing is easy.
 	 */
@@ -445,6 +472,69 @@
 	}
 }
 
+#ifdef HAVEFLOAT
+static float mysqrt(float x, float d)
+{
+	float t2, ti;
+
+	t2 = x > 1 ? x : 1 / x;
+	while (t2 - (ti = x / t2) > d)
+		t2 = (t2 + ti) / 2;
+	return t2;
+}
+#endif
+
+static void drawrect(PSD psd, MWCOORD x1, MWCOORD y1, MWCOORD x2, MWCOORD y2,
+		MWCOORD w)
+{
+#ifdef HAVEFLOAT
+	MWCOORD xmin, xmax, ymin, ymax, xi, yi, xs, ys;
+	float xd, yd;
+	float c, s, l, hw;
+	char msk[32];
+	unsigned int bit;
+
+	xd = x2 - x1;
+	yd = y2 - y1;
+	l = mysqrt(xd * xd + yd * yd, 0.1);
+	c = (float)xd / l;
+	s = (float)yd / l;
+	hw = (float)(w >> 1);
+
+	if (x1 < x2) {
+		xmin = x1 - w;
+		xmax = x2 + w;
+	}
+	else {
+		xmin = x2 - w;
+		xmax = x1 + w;
+	}
+
+	if (y1 < y2) {
+		ymin = y1 - w;
+		ymax = y2 + w;
+	}
+	else {
+		ymin = y2 - w;
+		ymax = y1 + w;
+	}
+
+	for (bit = 0; bit < gr_dashcount; bit++)
+		msk[bit] = gr_dashmask & (1 << bit);
+
+	for (yi = ymin; yi <= ymax; yi++) {
+		for (xi = xmin; xi <= xmax; xi++) {
+			xs = c * (xi - x1) + s * (yi - y1);
+			ys = -s * (xi - x1) + c * (yi - y1);
+			if (xs >= 0 && xs <= l && ys >= -hw && ys <= hw
+			&&  (!gr_dashcount || msk[(int)xs % gr_dashcount])
+			&&  GdClipPoint(psd, xi, yi))
+				psd->DrawPixel(psd, xi, yi, gr_foreground);
+		}
+	}
+#endif
+}
+
 /**
  * Draw a rectangle in the foreground color, applying clipping if necessary.
  * This is careful to not draw points multiple times in case the rectangle
@@ -457,25 +547,50 @@
  * @param height Height of rectangle.
  */
 void
-GdRect(PSD psd, MWCOORD x, MWCOORD y, MWCOORD width, MWCOORD height)
+GdRect(PSD psd, MWCOORD x, MWCOORD y, MWCOORD width, MWCOORD height, MWCOORD w)
 {
 	MWCOORD maxx;
 	MWCOORD maxy;
+	MWCOORD s, e;
+	MWCOORD i, hw, hw2;
 
 	if (width <= 0 || height <= 0)
 		return;
 	maxx = x + width - 1;
 	maxy = y + height - 1;
-	drawrow(psd, x, maxx, y);
-	if (height > 1)
-		drawrow(psd, x, maxx, maxy);
-	if (height < 3)
-		return;
-	++y;
-	--maxy;
-	drawcol(psd, x, y, maxy);
-	if (width > 1)
-		drawcol(psd, maxx, y, maxy);
+	hw = w >> 1;
+	hw2 = w - hw;
+	s = y - hw;
+	e = y + hw2;
+
+	for (i = s; i < e; i++)
+		drawrow(psd, x - hw, maxx + hw2 - 1, i);
+	if (height > 1) {
+		s = maxy - hw;
+		if (s < e)
+			s = e;
+		e = maxy + hw2;
+		for (i = s; i < e; i++)
+			drawrow(psd, x - hw, maxx + hw2 - 1, i);
+	}
+
+	y += hw2;
+	maxy -= hw + 1;
+	if (maxy <= y)
+		return;
+
+	s = x - hw;
+	e = x + hw2;
+	for (i = s; i < e; i++)
+		drawcol(psd, i, y, maxy);
+	if (width > 1) {
+		s = maxx - hw;
+		if (s < e)
+			s = e;
+		e = maxx + hw2;
+		for (i = s; i < e; i++)
+			drawcol(psd, i, y, maxy);
+	}
 	GdFixCursor(psd);
 }
 
diff -urN microwindows-0.90/src/engine/devfont.c microwindows-0.90.avn/src/engine/devfont.c
--- microwindows-0.90/src/engine/devfont.c	2003-05-11 22:17:38.000000000 +0400
+++ microwindows-0.90.avn/src/engine/devfont.c	2003-09-09 14:02:38.000000000 +0400
@@ -513,7 +513,7 @@
 	}
 
 	if (pfont->fontattr & MWTF_UNDERLINE)
-		GdLine(psd, startx, starty, x, starty, FALSE);
+		GdLine(psd, startx, starty, x, starty, FALSE, 1);
 
 	/* restore background draw state*/
 	gr_usebg = bgstate;
@@ -586,7 +586,7 @@
 	}
 
 	if (pfont->fontattr & MWTF_UNDERLINE)
-		GdLine(psd, startx, starty, x, starty, FALSE);
+		GdLine(psd, startx, starty, x, starty, FALSE, 1);
 
 	/* restore background draw state*/
 	gr_usebg = bgstate;
diff -urN microwindows-0.90/src/engine/devpoly.c microwindows-0.90.avn/src/engine/devpoly.c
--- microwindows-0.90/src/engine/devpoly.c	2003-05-11 07:51:51.000000000 +0400
+++ microwindows-0.90.avn/src/engine/devpoly.c	2003-09-11 12:48:35.000000000 +0400
@@ -46,7 +46,7 @@
  * @param points The array of points.
  */
 void
-GdPoly(PSD psd, int count, MWPOINT *points)
+GdPoly(PSD psd, int count, MWPOINT *points, MWCOORD w)
 {
   MWCOORD firstx;
   MWCOORD firsty;
@@ -62,10 +62,14 @@
 	if (didline && (gr_mode == MWMODE_XOR))
 		drawpoint(psd, points->x, points->y);
 	/* note: change to drawline*/
-	GdLine(psd, points[0].x, points[0].y, points[1].x, points[1].y, TRUE);
+	GdLine(psd, points[0].x, points[0].y, points[1].x, points[1].y, TRUE, w);
+	if (w > 1)
+		GdPoint(psd, points[0].x, points[0].y, w);
 	points++;
 	didline = TRUE;
   }
+  if (w > 1)
+  	GdPoint(psd, points[0].x, points[0].y, w);
   if (gr_mode == MWMODE_XOR) {
 	  points--;
 	  if (points->x == firstx && points->y == firsty)
diff -urN microwindows-0.90/src/engine/font_freetype.c microwindows-0.90.avn/src/engine/font_freetype.c
--- microwindows-0.90/src/engine/font_freetype.c	2003-05-10 19:29:54.000000000 +0400
+++ microwindows-0.90.avn/src/engine/font_freetype.c	2003-09-09 14:13:47.000000000 +0400
@@ -474,7 +474,7 @@
 	}
 
 	if (pf->fontattr & MWTF_UNDERLINE)
-		GdLine(psd, startx, starty, x, y, FALSE);
+		GdLine(psd, startx, starty, x, y, FALSE, 1);
 }
 
 /*
diff -urN microwindows-0.90/src/engine/font_freetype.cache.c microwindows-0.90.avn/src/engine/font_freetype.cache.c
--- microwindows-0.90/src/engine/font_freetype.cache.c	2003-05-10 19:29:54.000000000 +0400
+++ microwindows-0.90.avn/src/engine/font_freetype.cache.c	2003-09-09 14:13:55.000000000 +0400
@@ -837,7 +837,7 @@
 	}
 
 	if (pf->fontattr & MWTF_UNDERLINE)
-		GdLine(psd, startx, starty, x, y, FALSE);
+		GdLine(psd, startx, starty, x, y, FALSE, 1);
 }
 
 /*
diff -urN microwindows-0.90/src/engine/font_t1lib.c microwindows-0.90.avn/src/engine/font_t1lib.c
--- microwindows-0.90/src/engine/font_t1lib.c	2003-05-10 19:29:54.000000000 +0400
+++ microwindows-0.90.avn/src/engine/font_t1lib.c	2003-09-09 14:14:45.000000000 +0400
@@ -185,7 +185,7 @@
 	      /*gr_background = save;*/
 
 	      if (pf->fontattr & MWTF_UNDERLINE)
-		   GdLine(psd, x, underliney, x+width, underliney, FALSE);
+		   GdLine(psd, x, underliney, x+width, underliney, FALSE, 1);
 
 	   }
 	} else {
@@ -245,7 +245,7 @@
 		 y++;
 	      }
 	      if (pf->fontattr & MWTF_UNDERLINE)
-		   GdLine(psd, x, underliney, x+xoff, underliney, FALSE);
+		   GdLine(psd, x, underliney, x+xoff, underliney, FALSE, 1);
 	   }
         }
 
diff -urN microwindows-0.90/src/include/device.h microwindows-0.90.avn/src/include/device.h
--- microwindows-0.90/src/include/device.h	2003-05-13 21:19:06.000000000 +0400
+++ microwindows-0.90.avn/src/include/device.h	2003-09-10 11:09:43.000000000 +0400
@@ -701,10 +701,11 @@
 MWPIXELVAL GdFindNearestColor(MWPALENTRY *pal, int size, MWCOLORVAL cr);
 int	GdCaptureScreen(char *path);
 void	GdGetScreenInfo(PSD psd,PMWSCREENINFO psi);
-void	GdPoint(PSD psd,MWCOORD x, MWCOORD y);
+void	GdPoint(PSD psd,MWCOORD x, MWCOORD y, MWCOORD w);
 void	GdLine(PSD psd,MWCOORD x1,MWCOORD y1,MWCOORD x2,MWCOORD y2,
-		MWBOOL bDrawLastPoint);
-void	GdRect(PSD psd,MWCOORD x, MWCOORD y, MWCOORD width, MWCOORD height);
+		MWBOOL bDrawLastPoint, MWCOORD w);
+void	GdRect(PSD psd,MWCOORD x, MWCOORD y, MWCOORD width, MWCOORD height,
+		MWCOORD w);
 void	GdFillRect(PSD psd,MWCOORD x, MWCOORD y, MWCOORD width, MWCOORD height);
 void	GdBitmap(PSD psd,MWCOORD x,MWCOORD y,MWCOORD width,MWCOORD height,
 		const MWIMAGEBITS *imagebits);
@@ -712,7 +713,7 @@
 void	GdMakePaletteConversionTable(PSD psd,MWPALENTRY *palette,int palsize,
 		MWPIXELVAL *convtable,int fLoadType);
 void	GdDrawImage(PSD psd,MWCOORD x, MWCOORD y, PMWIMAGEHDR pimage);
-void	GdPoly(PSD psd,int count, MWPOINT *points);
+void	GdPoly(PSD psd,int count, MWPOINT *points, MWCOORD w);
 void	GdFillPoly(PSD psd,int count, MWPOINT *points);
 void	GdReadArea(PSD psd,MWCOORD x,MWCOORD y,MWCOORD width,MWCOORD height,
 		MWPIXELVAL *pixels);
@@ -743,12 +744,13 @@
 /* devarc.c*/
 /* requires float*/
 void	GdArcAngle(PSD psd, MWCOORD x0, MWCOORD y0, MWCOORD rx, MWCOORD ry,
-		MWCOORD angle1, MWCOORD angle2, int type);
+		MWCOORD angle1, MWCOORD angle2, int type, MWCOORD w);
 /* integer only*/
 void	GdArc(PSD psd, MWCOORD x0, MWCOORD y0, MWCOORD rx, MWCOORD ry,
-		MWCOORD ax, MWCOORD ay, MWCOORD bx, MWCOORD by, int type);
+		MWCOORD ax, MWCOORD ay, MWCOORD bx, MWCOORD by, int type,
+		MWCOORD w);
 void	GdEllipse(PSD psd,MWCOORD x, MWCOORD y, MWCOORD rx, MWCOORD ry,
-		MWBOOL fill);
+		MWBOOL fill, MWCOORD w);
 
 /* devfont.c*/
 void	GdClearFontList(void);
diff -urN microwindows-0.90/src/include/windows.h microwindows-0.90.avn/src/include/windows.h
--- microwindows-0.90/src/include/windows.h	2001-06-21 10:32:41.000000000 +0400
+++ microwindows-0.90.avn/src/include/windows.h	2003-09-09 11:15:45.000000000 +0400
@@ -41,6 +41,7 @@
 typedef struct {
 	MWGDIOBJHDR	hdr;
 	int		style;		/* pen style*/
+	int		width;		/* pen width*/
 	COLORREF	color;		/* pen color*/
 } MWPENOBJ;
 
diff -urN microwindows-0.90/src/mwin/wingdi.c microwindows-0.90.avn/src/mwin/wingdi.c
--- microwindows-0.90/src/mwin/wingdi.c	2003-05-04 08:06:21.000000000 +0400
+++ microwindows-0.90.avn/src/mwin/wingdi.c	2003-09-11 13:03:58.000000000 +0400
@@ -409,7 +409,7 @@
 
 	/* draw point in passed color*/
 	GdSetForegroundColor(hdc->psd, crColor);
-	GdPoint(hdc->psd, pt.x, pt.y);
+	GdPoint(hdc->psd, pt.x, pt.y, hdc->pen->width);
 	return 0;		/* doesn't return previous color*/
 }
 
@@ -448,7 +448,8 @@
 	if(hdc->pen->style != PS_NULL) {
 		GdSetForegroundColor(hdc->psd, hdc->pen->color);
 		/* don't draw last point*/
-		GdLine(hdc->psd, beg.x, beg.y, end.x, end.y, FALSE);
+		GdLine(hdc->psd, beg.x, beg.y, end.x, end.y, FALSE,
+			hdc->pen->width);
 	}
 	hdc->pt.x = x;
 	hdc->pt.y = y;
@@ -484,7 +485,8 @@
 			ClientToScreen(hwnd, &end);
 
 		/* don't draw last point*/
-		GdLine(hdc->psd, beg.x, beg.y, end.x, end.y, FALSE);
+		GdLine(hdc->psd, beg.x, beg.y, end.x, end.y, FALSE,
+			hdc->pen->width);
 
 		beg = end;
 	}
@@ -509,7 +511,8 @@
 	if(hdc->pen->style != PS_NULL) {
 		GdSetForegroundColor(hdc->psd, hdc->pen->color);
 		GdRect(hdc->psd, rc.left, rc.top,
-			rc.right - rc.left, rc.bottom - rc.top);
+			rc.right - rc.left, rc.bottom - rc.top,
+			hdc->pen->width);
 	}
 
 	/* fill rectangle in current brush color*/
@@ -547,13 +550,15 @@
 	if(hdc->brush->style != BS_NULL) {
 		InflateRect(&rc, -1, -1);
 		GdSetForegroundColor(hdc->psd, hdc->brush->color);
-		GdEllipse(hdc->psd, rc.left, rc.top, rx, ry, TRUE);
+		GdEllipse(hdc->psd, rc.left, rc.top, rx, ry, TRUE,
+			hdc->pen->width);
 	}
 
 	/* draw ellipse outline in current pen color*/
 	if(hdc->pen->style != PS_NULL) {
 		GdSetForegroundColor(hdc->psd, hdc->pen->color);
-		GdEllipse(hdc->psd, rc.left, rc.top, rx, ry, FALSE);
+		GdEllipse(hdc->psd, rc.left, rc.top, rx, ry, FALSE,
+			hdc->pen->width);
 	}
 
 	return TRUE;
@@ -587,7 +592,8 @@
 	if(hdc->brush->style != BS_NULL && type == MWPIE) {
 		GdSetForegroundColor(hdc->psd, hdc->brush->color);
 		GdArc(hdc->psd, rc.left, rc.top, rx, ry,
-			rc2.left, rc2.top, rc2.right, rc2.bottom, MWPIE);
+			rc2.left, rc2.top, rc2.right, rc2.bottom, MWPIE,
+			hdc->pen->width);
 	}
 
 	/* draw ellipse outline in current pen color*/
@@ -596,7 +602,8 @@
 		if(type == MWPIE)
 			type = MWARC;	/* MWARCOUTLINE?*/
 		GdArc(hdc->psd, rc.left, rc.top, rx, ry,
-			rc2.left, rc2.top, rc2.right, rc2.bottom, type);
+			rc2.left, rc2.top, rc2.right, rc2.bottom, type,
+			hdc->pen->width);
 	}
 }
 
@@ -650,7 +657,7 @@
 	/* draw polygon outline in current pen color*/
 	if(hdc->pen->style != PS_NULL) {
 		GdSetForegroundColor(hdc->psd, hdc->pen->color);
-		GdPoly(hdc->psd, nCount, pp);
+		GdPoly(hdc->psd, nCount, pp, hdc->pen->width);
 	}
 
 	if(ppAlloc)
@@ -995,15 +1002,15 @@
 };
 
 static MWPENOBJ OBJ_WHITE_PEN = {
-	{OBJ_PEN, TRUE}, PS_SOLID, RGB(255, 255, 255)
+	{OBJ_PEN, TRUE}, PS_SOLID, 1, RGB(255, 255, 255)
 };
 
 static MWPENOBJ OBJ_BLACK_PEN = {
-	{OBJ_PEN, TRUE}, PS_SOLID, RGB(0, 0, 0)
+	{OBJ_PEN, TRUE}, PS_SOLID, 1, RGB(0, 0, 0)
 };
 
 static MWPENOBJ OBJ_NULL_PEN = {
-	{OBJ_PEN, TRUE}, PS_NULL, RGB(0, 0, 0)
+	{OBJ_PEN, TRUE}, PS_NULL, 1, RGB(0, 0, 0)
 };
 
 static MWFONTOBJ OBJ_OEM_FIXED_FONT = {
@@ -1283,6 +1290,7 @@
 	hpen->hdr.type = OBJ_PEN;
 	hpen->hdr.stockobj = FALSE;
 	hpen->style = nPenStyle;
+	hpen->width = nWidth;
 	hpen->color = crColor;
 	return (HPEN)hpen;
 }
diff -urN microwindows-0.90/src/nanox/srvfunc.c microwindows-0.90.avn/src/nanox/srvfunc.c
--- microwindows-0.90/src/nanox/srvfunc.c	2003-05-30 02:33:52.000000000 +0400
+++ microwindows-0.90.avn/src/nanox/srvfunc.c	2003-09-10 11:18:28.000000000 +0400
@@ -2538,7 +2538,7 @@
 		case GR_DRAW_TYPE_WINDOW:
 	        case GR_DRAW_TYPE_PIXMAP:
 			GdLine(dp->psd, dp->x + x1, dp->y + y1,
-				dp->x + x2, dp->y + y2, TRUE);
+				dp->x + x2, dp->y + y2, TRUE, 1);
 			break;
 	}
 
@@ -2562,7 +2562,7 @@
 	switch (GsPrepareDrawing(id, gc, &dp)) {
 		case GR_DRAW_TYPE_WINDOW:
       	        case GR_DRAW_TYPE_PIXMAP:
-			GdRect(dp->psd, dp->x + x, dp->y + y, width, height);
+			GdRect(dp->psd, dp->x + x, dp->y + y, width, height, 1);
 			break;
 	}
 
@@ -2606,7 +2606,8 @@
 	switch (GsPrepareDrawing(id, gc, &dp)) {
 		case GR_DRAW_TYPE_WINDOW:
 	        case GR_DRAW_TYPE_PIXMAP:
-			GdEllipse(dp->psd, dp->x + x, dp->y + y, rx, ry, FALSE);
+			GdEllipse(dp->psd, dp->x + x, dp->y + y, rx, ry,
+				FALSE, 1);
 			break;
 	}
 
@@ -2628,7 +2629,8 @@
 	switch (GsPrepareDrawing(id, gc, &dp)) {
 		case GR_DRAW_TYPE_WINDOW:
 	        case GR_DRAW_TYPE_PIXMAP:
-			GdEllipse(dp->psd, dp->x + x, dp->y + y, rx, ry, TRUE);
+			GdEllipse(dp->psd, dp->x + x, dp->y + y, rx, ry,
+				TRUE, 1);
 			break;
 	}
 
@@ -2652,7 +2654,7 @@
 		case GR_DRAW_TYPE_WINDOW:
 	        case GR_DRAW_TYPE_PIXMAP:
 			GdArc(dp->psd, dp->x + x, dp->y + y, rx, ry, ax, ay,
-					bx, by, type);
+					bx, by, type, 1);
 
 			break;
 	}
@@ -2676,7 +2678,7 @@
 		case GR_DRAW_TYPE_WINDOW:
 	        case GR_DRAW_TYPE_PIXMAP:
 			GdArcAngle(dp->psd, dp->x + x, dp->y + y, rx, ry,
-				angle1, angle2, type);
+				angle1, angle2, type, 1);
 			break;
 	}
 
@@ -3095,7 +3097,7 @@
 	switch (GsPrepareDrawing(id, gc, &dp)) {
 		case GR_DRAW_TYPE_WINDOW:
 	        case GR_DRAW_TYPE_PIXMAP:
-			GdPoint(dp->psd, dp->x + x, dp->y + y);
+			GdPoint(dp->psd, dp->x + x, dp->y + y, 1);
 			break;
 	}
 
@@ -3128,7 +3130,7 @@
 
 	pp = pointtable;
 	for (i = count; i-- > 0; pp++) {
-		GdPoint(psd, pp->x + dp->x, pp->y + dp->y);
+		GdPoint(psd, pp->x + dp->x, pp->y + dp->y, 1);
 	}
 
 	SERVER_UNLOCK();
@@ -3169,7 +3171,7 @@
 		pp->y += dp->y;
 	}
 
-	GdPoly(psd, count, pointtable);
+	GdPoly(psd, count, pointtable, 1);
 
 #ifdef NONETWORK   
 	/*
diff -urN microwindows-0.90/src/nanox/srvutil.c microwindows-0.90.avn/src/nanox/srvutil.c
--- microwindows-0.90/src/nanox/srvutil.c	2003-05-11 21:14:54.000000000 +0400
+++ microwindows-0.90.avn/src/nanox/srvutil.c	2003-09-09 14:21:35.000000000 +0400
@@ -695,10 +695,10 @@
 	GdSetFillMode(GR_FILL_SOLID);
 
 	if (bs == 1) {
-		GdLine(wp->psd, lminx, tminy, rminx, tminy, TRUE);
-		GdLine(wp->psd, lminx, bminy, rminx, bminy, TRUE);
-		GdLine(wp->psd, lminx, topy, lminx, boty, TRUE);
-		GdLine(wp->psd, rminx, topy, rminx, boty, TRUE);
+		GdLine(wp->psd, lminx, tminy, rminx, tminy, TRUE, 1);
+		GdLine(wp->psd, lminx, bminy, rminx, bminy, TRUE, 1);
+		GdLine(wp->psd, lminx, topy, lminx, boty, TRUE, 1);
+		GdLine(wp->psd, rminx, topy, rminx, boty, TRUE, 1);
 	} else {
 		GdFillRect(wp->psd, lminx, tminy, width + bs * 2, bs);
 		GdFillRect(wp->psd, lminx, bminy, width + bs * 2, bs);
