delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/28/19:17:25

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro's xor_mode
Date: Sun, 28 Sep 1997 13:31:15 +0100
Organization: None
Distribution: world
Message-ID: <hBCbEnAT4kL0Ew0I@talula.demon.co.uk>
References: <342C3CA0 DOT 52BE AT club-internet DOT fr>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 19
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Charles Mennerat writes:
>When I try to draw with a specific color(drawing a sizable frame for a
>mouse pointer), nothing happens.(When i put the white color using
>xor_mode it's an ugly color that appears).If i turn off xor_mode the
>right color appears.Can someone tell me what did i forget to do?

What colors are you trying to draw? This behaviour is probably correct:
the result of an XOR drawing operation is totally dependent on what the
colors are and how your palette is set up. For example, (x ^ 0) == x, so
drawing color zero in an XOR mode will have no effect at all! If your
white color is #255, doing an XOR with it will toggle all the bits
between zero and one, so the resulting color will be a binary opposite
of the original. Whether this looks good or not will depend on what
these colors actually are...


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


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