rem: XDrawLine(scr->display, buffer, bgc, w+2, 1, w+2, h+1); XDrawLine(scr->display, buffer, lgc, 2, h, w+2, h);   XDrawLine(scr->display, buffer, dgc, 0, 0, 0, size.height-1); XDrawLine(scr->display, buffer, dgc, 0, 0, size.width, 0); XDrawLine(scr->display, buffer, bgc, 1, 1, 1, size.height-1); XDrawLine(scr->display, buffer, bgc, 1, 1, size.width-1, 1);  XDrawLine(scr->display, buffer, wgc, size.width-1, 0, size.width-1, size.height-1); XDrawLine(scr->display, buffer, wgc, 0, size.height-1, size.width-1, size.height-1);  XCopyArea(scr->display, buffer, pPtr->view->window, scr->copyGC, 0, 0, size.width, size.height, 0, 0);  XFreePixmap(scr->display, buffer);
add: }  XDrawLine(scr->display, buffer, bgc, w+2, 1, w+2, h+1); XDrawLine(scr->display, buffer, lgc, 2, h, w+2, h);   XDrawLine(scr->display, buffer, dgc, 0, 0, 0, size.height-1); XDrawLine(scr->display, buffer, dgc, 0, 0, size.width, 0); XDrawLine(scr->display, buffer, bgc, 1, 1, 1, size.height-1); XDrawLine(scr->display, buffer, bgc, 1, 1, size.width-1, 1);  XDrawLine(scr->display, buffer, wgc, size.width-1, 0, size.width-1, size.height-1); XDrawLine(scr->display, buffer, wgc, 0, size.height-1, size.width-1, size.height-1);  XCopyArea(scr->display, buffer, pPtr->view->window, scr->copyGC, 0, 0, size.width, size.height, 0, 0);  XFreePixmap(scr->display, buffer);
context: paintProgressIndicator(ProgressIndicator *pPtr){	W_Screen *scr = pPtr->view->screen;	GC bgc;	GC wgc;	GC lgc;	GC dgc;	WMSize size = pPtr->view->size;	int perc, w, h;	double unit, i;	Pixmap buffer;		bgc = WMColorGC(scr->black);	wgc = WMColorGC(scr->white);	lgc = WMColorGC(scr->gray);	dgc = WMColorGC(scr->darkGray);	unit = (double)(size.width - 3.0) / 100;	buffer = XCreatePixmap(scr->display, pPtr->view->window, 			size.width, size.height, scr->depth);	XFillRectangle(scr->display, buffer, lgc, 0, 0, size.width, size.height);	/* Calculate size of Progress to draw and paint ticks*/	perc = (pPtr->value - pPtr->minValue) * 100 / (pPtr->maxValue - pPtr->minValue);	w = (int)((double)(perc * unit));	h = size.height - 2;	if (w > (size.width - 3))		w = size.width - 3;	if (w > 0) {		XFillRectangle(scr->display, buffer, lgc, 2, 1, w, h);		XFillRectangle(scr->display, buffer, scr->stippleGC, 2, 1, w, h);		W_DrawRelief(scr, buffer, 2, 1, w, h, WRFlat);		/* Draw Progress Marks */		i=(5.0*unit);		#ifdef SHOW_PROGRESS_TICKS_ONLY		while((int)i<w+5) {#else		while ((int)i < (size.width - 3)) {#endif			XDrawLine(scr->display, buffer, dgc, (int)i+2, h-1, i+2, h-3);						i+=(5.0*unit);			#ifdef SHOW_PROGRESS_TICKS_ONLY			if((int)i>=w)				break;#endif						XDrawLine(scr->display, buffer, dgc, (int)i+2, h-1, i+2, h-6);						i+=(5.0*unit);		}	}	XDrawLine(scr->display, buffer, bgc, w+2, 1, w+2, h+1);	XDrawLine(scr->display, buffer, lgc, 2, h, w+2, h);	XDrawLine(scr->display, buffer, dgc, 0, 0, 0, size.height-1);	XDrawLine(scr->display, buffer, dgc, 0, 0, size.width, 0);	XDrawLine(scr->display, buffer, bgc, 1, 1, 1, size.height-1);	XDrawLine(scr->display, buffer, bgc, 1, 1, size.width-1, 1);		XDrawLine(scr->display, buffer, wgc, size.width-1, 0,			size.width-1, size.height-1);	XDrawLine(scr->display, buffer, wgc, 0, size.height-1,			size.width-1, size.height-1);		XCopyArea(scr->display, buffer, pPtr->view->window, scr->copyGC, 0, 0,			size.width, size.height, 0, 0);		XFreePixmap(scr->display, buffer);}