Mail Archives: djgpp/2000/09/16/09:30:15
| From: | Damian Yerrick <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p> | 
| Newsgroups: | comp.os.msdos.djgpp | 
| Subject: | Re: using textout to output the RGB of a color (allegro) | 
| Organization: | Pin Eight Software  http://pineight.8m.com/ | 
| Message-ID: | <8326sskinpsau3v3ktda1mu01c2re21fdk@4ax.com> | 
| References: | <AMxw5.66520$i5 DOT 2581435 AT news1 DOT rdc2 DOT on DOT home DOT com> | 
| X-Newsreader: | Forte Agent 1.7/32.534 | 
| MIME-Version: | 1.0 | 
| Lines: | 24 | 
| X-Trace: | /K0ZEEF44G/fyk35m0XmYWFCC+mN7bWYEaUy9+Ein75Xb6mT5PwpdaGOWhVCu2T8l1TsS4fI3He/!Je8iROWI062OMVLfwFE64Q1K6y69jBiYBmcE9sYbsoTp3v1s8bhXt8EVCigP6jgZsd9VOGQak67F!W86C0g== | 
| X-Complaints-To: | abuse AT gte DOT net | 
| X-Abuse-Info: | Please be sure to forward a copy of ALL headers | 
| X-Abuse-Info: | Otherwise we will be unable to process your complaint properly | 
| NNTP-Posting-Date: | Sat, 16 Sep 2000 05:46:36 GMT | 
| Distribution: | world | 
| Date: | Sat, 16 Sep 2000 05:46:36 GMT | 
| To: | djgpp AT delorie DOT com | 
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp | 
| Reply-To: | djgpp AT delorie DOT com | 
On Fri, 15 Sep 2000 22:54:24 GMT, "a Peirano" <aldo DOT peirano AT home DOT com>
wrote:
>Hi i'm fairly new to programming with Djgpp and C++ but I was
>wondering if there was a way of printing out the RGB of a colour
>using the textout function.
C:\>info allegro true getr
C:\>info allegro text textprintf
// Once you have the pixel color value...
int pixval = getpixel(bmp, x, y);
// convert it to RGB and display it.
textprintf(screen, font, 0, 0, 15, "rgb = %d %d %d",
           getr(pixval), getg(pixval), getb(pixval));
-- 
<O
( \   GNOME vs. KDE: the game!
 X    http://pineight.8m.com/nes.htm
This is McAfee VirusScan. Add these two lines to your signature to
prevent the spread of signature viruses.  http://www.mcafee.com/
- Raw text -