delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/24/19:51:55

From: "Alan M. Doerhoefer" <aland AT u DOT washington DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro GUI questions- very basic
Date: Tue, 24 Jun 1997 10:05:24 -0700
Organization: University of Washington
Lines: 27
Message-ID: <33AFFE54.13B3@u.washington.edu>
References: <33afe12a DOT 2733418 AT news DOT cis DOT yale DOT edu>
NNTP-Posting-Host: cs205-24.student.washington.edu
Mime-Version: 1.0
CC: page AT wobnet DOT com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Jon wrote:
> However, I've noticed that I don't
> seem to be able to use textout reliably anymore- sometimes (and
> seeming randomly) textout decides to ignore my FG and BG colors,
> making them the same (both FG, I think) so textout text isn't
> readable. 

There is an Allegro function called "text_mode" that is designed
specifically to fix this problem. Just call text_mode and send it -1 so
that text will appear with an invisible background.
Example:       text_mode(-1);

Here is a quotation from the Allegro documentation:
> 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. 

Hope this helps,
-- 
Alan M. Doerhoefer:
------------------------------------------
aland AT u DOT washington DOT edu
------------------------------------------
aland AT seanet DOT com
------------------------------------------
http://www.seanet.com/~aland

- Raw text -


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