www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/14/02:27:08

From: gautam AT interlog DOT com (Gautam N. Lad)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro: Problems with text colors
Date: Thu, 12 Jun 97 10:19:34 GMT
Organization: InterLog Internet Services
Lines: 34
Message-ID: <5npsfm$he1@news.interlog.com>
References: <33A06E10 DOT 2965 AT seanet DOT com>
NNTP-Posting-Host: ip203-6.cc.interlog.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi,
>Does anyone know how to control the backgroud text color in Allegro?
Yes!

Here's the exact section from the Allegro documentation.  This function will
work.  All you have to do is call it.:

void text_mode(int mode);
   Sets the mode in which text will be drawn. If mode is zero or positive,
   text output will be opaque and the background of the characters will be
   set to color #mode. If mode is negative, text will be drawn transparently
   (ie. the background of the characters will not be altered). The default
   is a mode of zero.

As you can see, if you use something like text_mode(-1); you'll get a transparent
background when you use text_out();  

>Do I need to play with the pallette? I am using the desktop pallette.
No, don't play with it, use it! ;)

Hope this helps!
Bye!

****************************************************
* Gautam N. Lad                                    *
*--------------------------------------------------*
*                                                  *
* E-Mail    : gautam AT interlog DOT com                  *
* Website   : http://www.interlog.com/~gautam      *
*                                                  *
* OS/2, DOS/Windows, Graphics Gallery, Software,   *
* Links, Rayzor Editor/2, POV-Ray, TexturEyes,     *
* POV-PAK and lots lots lots more!!!!!!!           *
****************************************************

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019