Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!purdue!haven!mimsy!mojo!eng.umd.edu!stripes From: stripes@eng.umd.edu (Joshua Osborne) Newsgroups: comp.windows.x Subject: Re: strip-chart display Message-ID: <1990Dec29.045757.840@eng.umd.edu> Date: 29 Dec 90 04:57:57 GMT References: <9012281317.AA10469@jargon.whoi.edu> Sender: news@eng.umd.edu (C-News) Reply-To: stripes@eng.umd.edu (Joshua Osborne) Organization: College of Engineering, Maryversity of Uniland, College Park Lines: 39 In article <9012281317.AA10469@jargon.whoi.edu>, kens@JARGON.WHOI.EDU (Ken Stewart) writes: [...] You may wel get some more speed from this: > ************************************************************************** > > 1) BITBLT > . > . > /* scroll the display right */ > XCopyArea( dpy, xwin, xwin, gc, 0, min_height, > canvas_width - horiz_incr, canvas_height, horiz_incr, 0 ); [replce w/] canvas_width - horiz_incr, max_height, horiz_incr, 0 ); > > /* clear a small region at left */ > XClearArea( dpy, xwin, 0, 0, horiz_incr, canvas_height, False ); [replace w/] XClearArea( dpy, xwin, 0, min_height, horiz_incr, max_height, False ); > > new_y = ... > > /* connect the new data point */ > XDrawLine( dpy, xwin, gc, horiz_incr, last_y, 0, new_y ); > > last_y = new_y; > . > . Less bits to blt most of the time. Should end up being faster. (but you will have to track the max/min values correctly) -- stripes@eng.umd.edu "Security for Unix is like Josh_Osborne@Real_World,The Multitasking for MS-DOS" "The dyslexic porgramer" - Kevin Lockwood "Don't over-comment" - p151 The Elements of Programming Style 2nd Edition Kernighan and Plauger