[comp.os.minix] >Graphics Lib, GUI, ..., "X Lit"?

u31b3hs@cip-s03.informatik.rwth-aachen.de (Michael Haardt) (09/14/90)

In the article "Graphics Lib, GUI, ..., "X Lit"?", H T Bunnell made
some suggestions for grafics with MINIX.  He posted it yesterday,
so I don't include it.  

I made some experiments considering grafics in Minix.  I need grafics
to write a previewer for my own little troff.  I use HGC and this are
my experiences related to the suggestions:

1. I use four virtual terminals in textmode.  My programs always use
   page 2 for grafics, so that no terminal screen is corrupted after
   returning to text mode.  Therefore, I woldn't like a screen always
   running in bitmapped mode.  Virtual terminals are fine and fast.

2. A. Directly read or write to a /dev/screen device will be *very*
      slow for drawing lines or something like that.  I tried to access
      video memory through /dev/mem and my 386 seems to be an 8088.
   B. A better solution, but it takes a lot of memory from the data
      segment.  I use this at the moment, and it is fast.  It will not
      run with a VGA because of its big video memory.  This solution
      only works with HGC and CGA because of the low resolution.
   C. The best solution.  I don't know much about grafics terminals,
      but I would like to have line and circle drawing capabilities
      in the kernel.  They can directly adress video memory or a
      grafics processor.  This solution will be small, very fast
      and a little bit machine independent. (And a lot of work...)

3. In my opinion, character generation should be made bye the user
   program.  There are too many ways for integrating an universal
   solution in the kernel.

I use the Hershey fonts for my troff.  I am currently writing and
debugging :-( this program.  My troff isn't full troff, but better
than Minix nroff.  The output is very nice and I will never use DOS
for a textformatter.
I use a device independent file format for grafic output which is
processed by device drivers programs do get the final output.  troff
never knows the device which will process its output.  To prevent
misunderstandings: this are no /dev/* drivers.
My troff is not finished at the moment, so please do not email me for
more details.  I will post more about it, when it is complete.

Michael Haardt

"Englich is not my native language..."
------------------------------- ciao ----------------------------------

matthew1@stretch.cs.mun.ca (Matthew J. Newhook) (09/15/90)

u31b3hs@cip-s03.informatik.rwth-aachen.de (Michael Haardt) writes:

>In the article "Graphics Lib, GUI, ..., "X Lit"?", H T Bunnell made
>some suggestions for grafics with MINIX.  He posted it yesterday,
>so I don't include it.  

>I made some experiments considering grafics in Minix.  I need grafics
>to write a previewer for my own little troff.  I use HGC and this are
>my experiences related to the suggestions:

>1. I use four virtual terminals in textmode.  My programs always use
>   page 2 for grafics, so that no terminal screen is corrupted after
>   returning to text mode.  Therefore, I woldn't like a screen always
>   running in bitmapped mode.  Virtual terminals are fine and fast.

>2. A. Directly read or write to a /dev/screen device will be *very*
>      slow for drawing lines or something like that.  I tried to access
>      video memory through /dev/mem and my 386 seems to be an 8088.

Why don't you integrate the graphics primitives (ellipse, line, pixel,
pattern fill etc...) rendering in the kernel?  I've just written a fairly 
comprehensive set of graphics primitives for an atari ST, and it would 
definitely would not be hard to change to work on a PC.  The only 
difference would be the calls to render_pixel, render_byte and 
solid_rectangle.  These could be made pointers to functions to account
for different video cards (or different machines), so all of these
primitives would be portable...  It wouldn't add that much code to
the kernel, and it sure would make the graphics fast, and efficient.

>Michael Haardt

>"Englich is not my native language..."
>------------------------------- ciao ----------------------------------
-- 
----------------matthew1@stretch.cs.mun.ca 
"Living in the limelight; the universal dream for those who wish to 
seem. Those who wish to be must put aside the alienation, get on with 
the facination, the real relation, the underlying theme" - Rush