Newsgroups: comp.windows.x
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines
From: tomt@maui.coral.COM (Tom Tulinsky)
Subject: Fast Updates
Message-ID: <9105181338.AA21808@maui.coral.com>
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
References: <1991May17.220145.22765@atc.SP.Unisys.COM>
Date: 18 May 91 13:38:17 GMT
Lines: 37



) 
) We are trying to bring up an Air Traffic Control display on
) an X window terminal and there seems to be some problems.
) 
) An individual track (entity) on the screen may move at any time and
) they more overlap other tracks. One approach would be to use XOR when
) updating so one does not have to regenerate the entire screen when an
) object moves but that approach leaves holes where the lines cross.
) 
) Another approach would be to use double buffering but the box being
) used doesn't have the CPU power to regenerate the screen every half
) second or so.
) 

Try this.  Figure out a rectangle that encloses the whole track.  Use
XSetClipRectangles to clip drawing to two rectangle enclosing the old
position and the new position.  Clear the window (only the area in the
rectangles will be cleared) and redraw the whole window with the new
positions.  Since only a small part of the window is actually drawn
to, it is much faster and flickers much less.  The server is pretty
fast at throwing away clipped graphics commands.  

Arbitrary polygons can also be used for clipping with XPolygonRegion.

I'd be interested to know how you solve this problem.


 Coral
     * **	Tom Tulinsky                508 460-6010
  *  **		Coral Network Corporation   fax 508 481-6258
*  ** 		734 Forest St               net: tomt@coral.com
 ***		   Marlboro, MA 01752		
  **		   U S A
*********	   Overheard in a BART station:
NETWORKS	      "I was the only NORM there!"
