nanogui: Blitting


Previous by date: 4 Jan 2000 22:41:25 -0000 Re: Blitting, Alan Cox
Next by date: 4 Jan 2000 22:41:25 -0000 how to refresh terminal emulator screens, Greg Haerr
Previous in thread: 4 Jan 2000 22:41:25 -0000 Re: Blitting, Alan Cox
Next in thread: 4 Jan 2000 22:41:25 -0000 Re: Blitting, Alan Cox

Subject: RE: Blitting
From: Greg Haerr ####@####.####
Date: 4 Jan 2000 22:41:25 -0000
Message-Id: <C1962B36D9BBD311B0F80060083DFEFBF0C2@NBA-SLAM.CenSoft.COM>

 But how do yo suggest
: I get the "content" of the top line, if I'm storing ASCII and ESC/CSI
: values from the termio, there's alot of data to be stored for each
: screen if you are running an application like "worms"....? Am I making
: sence or just not seeing your point?

The way to do this is that the terminal emulator keeps an current
x, y cursor value.  The terminal emulator alloc's a [24][80] array
and stores each incoming character in the current cursor location.
Then when refresh is required, the contents of the array are written
in whole to the display, thereby repainting all your worms.

As Alan Cox just mentioned, you don't want to draw the space
characters for speed.  So, on a refresh, the current background
color is fillrect'ed to the display, then the non-space characters
are drawn.  There are many other optimizations as well, having
to do with drawing each line at a time, etc while the attributes
are the same, etc.

Greg



Previous by date: 4 Jan 2000 22:41:25 -0000 Re: Blitting, Alan Cox
Next by date: 4 Jan 2000 22:41:25 -0000 how to refresh terminal emulator screens, Greg Haerr
Previous in thread: 4 Jan 2000 22:41:25 -0000 Re: Blitting, Alan Cox
Next in thread: 4 Jan 2000 22:41:25 -0000 Re: Blitting, Alan Cox


Powered by ezmlm-browse 0.20.