Re: ANSI graphics in a GtkTextView Window



On Tue, 2003-10-21 at 09:45, Matthias Mann wrote:
On Tuesday October 21 2003 02:08 CEST, Mark Hoover wrote:
    
and would like to be able to read in a file containing ANSI 
graphics (*.ans)
    
What is that? *.ans? A joke? I had never heared about. And
how i know there is no graphics support in ANSI C.

Umm, ANSI graphics has nothing to do with ANSI C.  Obviously you don't
remember the good old BBS days.  ANSI graphics were done by using an
ANSI interpreter that would allow you to draw using character cells
anywhere on the terminal, and change colors, etc.  In MS-DOS you would
load ANSI.SYS to give the screen ANSI capabilities.  Nowadays linux
terminal emulators are a superset of ANSI capabilites, such as vt100,
etc.  ANSI was very useful back when we had dumb terminals.  On PC's
ANSI opened up several security wholes (which many terminal emulators
today are still vulnerable to).  There also was a whole class of ANSI
"art" created.  Obviously this user wishes to display these encoded
files.

Essentially what this person is going to have to do is find a library to
decode the ANSI encodings, and then create the appropriate pango tags to
set the colors and font, and then display the text.

    
But if you really have such graphics: Can't you convert
them to jpg or png format? Then you can use

You could convert them, but you'd end up doing what he wants to do
anyway.  Render them using some font to the screen.  The textview is
probably the best way to go.

    
  gtk_image_new_from_file("filename");
    
Mathew
    
-- 
Michael L Torrie <torriem chem byu edu>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]