🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #37201

Re: CDEF problems

#37201
From: Edward C Horvath
Date: Thu, 02 Feb 1989 18:20
26 lines
1543 bytes
From article <3598@ucdavis.ucdavis.edu>, by lim@iris.ucdavis.edu (Lloyd Lim):
[advising how to hilight a control]
> ... Actually, these
> days with color, instead of xoring stuff to invert, you have to switch the
> foreground and background colors and redraw the thing you're inverting.

There's a built-in flag to do this: see IM V-61.  If you
	BitClr (Ptr (HiliteMode,pHiliteBit);
or, in C,
	(*(char*)0x938) &= 0x7F;
or, in assembler,
	bclr	#7,$938
just before an InvertXXX operation, or drawing with srcXor mode, QD will
swap the Hilite color (chosen in the Color cdev) and the background color.
The degenerate case of one-bit-per-pixel works "exactly like inversion,
and is compatible with all versions of Quickdraw."

But QD resets the bit after each operation, so you have to continually clear
it.

My remaining question is why Apple didn't leave the bit CLEAR by default;
seems to me that most apps would prefer the kinder, gentler effect obtained
with hilitemode.  (Despite it's colorful icons, I found that GunShy looks
much better using hilitemode; simple inversion is rarely pleasing in color).

=Ned Horvath=
Technical Details
Message-ID: <2561@pegasus.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!ukma!tut.cis.ohio-state.edu!rutgers!att!pegasus!ech
References: <3598@ucdavis.ucdavis.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!ukma!tut.cis.ohio-state.edu!rutgers!att!pegasus!ech
From: ech@pegasus.ATT.COM (Edward C Horvath)
Newsgroups: comp.sys.mac,comp.sys.mac.programmer
Subject: Re: CDEF problems
Message-ID: <2561@pegasus.ATT.COM>
Date: 2 Feb 89 18:20:44 GMT
References: <3598@ucdavis.ucdavis.edu>
Organization: AT&T ISL Middletown NJ USA
Lines: 26