--- topdraw-1.4c/ugs/src/drivers/xwindowc.c.color 1997-09-20 01:49:30.000000000 +0900 +++ topdraw-1.4c/ugs/src/drivers/xwindowc.c 2005-11-12 19:10:16.000000000 +0900 @@ -65,6 +65,9 @@ int width ; /* line width from [head+1].x */ int style ; /* line style from [head+1].y */ XPoint xy[MAXELEM] ; /* x y coordinate pairs */ +#if 1 + int elcolor[MAXELEM]; +#endif } ELEM ; static ELEM elem; static int coloris ; @@ -222,7 +225,12 @@ */ for (n = 0 ; n < elem.last ; n = n + 2 + ( (elem.xy[n].x > 0) ? elem.xy[n].x : -elem.xy[n].x ) ) { +#if 0 XSetForeground (dpy, gc, elem.xy[n].y ) ; /* color */ +#else + XSetForeground (dpy, gc, elem.elcolor[n]) ; /* color */ + /* printf("coloris = 0x%6.6x\n", elem.elcolor[n]); */ +#endif if ( elem.xy[n].x > 0 ) { XDrawPoints (dpy, wdw, gc, &elem.xy[n+2], elem.xy[n].x, CoordModeOrigin); XDrawPoints (dpy, pxm, gc, &elem.xy[n+2], elem.xy[n].x, CoordModeOrigin); @@ -264,7 +272,11 @@ elem.xy[elem.head].x >= 0 ) { /* New Block */ elem.head = ++elem.last ; /* New header past last data */ elem.xy[elem.last ].x = -1 ; /* (-) data length */ +#if 0 elem.xy[elem.last++].y = elem.color = coloris ; /* color */ +#else + elem.elcolor[elem.last++] = elem.color = coloris ; /* color */ +#endif elem.xy[elem.last ].x = elem.width = widthis ; /* width */ elem.xy[elem.last++].y = elem.style = styleis ; /* style */ elem.xy[elem.last ].x = *x ; /* initial coordinates */ @@ -283,7 +295,11 @@ elem.xy[elem.head].x <= 0 ) { /* New block */ elem.head = ++elem.last ; /* new header past last data */ elem.xy[elem.last ].x = 0 ; /* data length */ +#if 0 elem.xy[elem.last++].y = elem.color = coloris ; /* color */ +#else + elem.elcolor[elem.last++] = elem.color = coloris ; /* color */ +#endif elem.xy[elem.last ].x = elem.width = widthis ; /* width */ elem.xy[elem.last ].y = elem.style = styleis ; /* style */ } @@ -297,7 +313,11 @@ if ( elem.last +*n*2 +8 > MAXELEM ) {fxdraw_() ; fxreset_() ;} elem.head = ++elem.last ; /* New header past last data */ elem.xy[elem.last ].x = 0 ; /* (-) data length */ +#if 0 elem.xy[elem.last++].y = elem.color = coloris ; /* color */ +#else + elem.elcolor[elem.last++] = elem.color = coloris ; /* color */ +#endif elem.xy[elem.last ].x = elem.width = widthis ; /* width */ elem.xy[elem.last ].y = elem.style = -1 ; /* style */ while (*n > 0 ) {