[comp.sys.mac.programmer] Strange effect of Mask setting in Icon editing

c60a-4ag@web7a.berkeley.edu (Robert Menke) (04/23/88)

I am having some problems with the Mask setting in ResEdit when I use it to
make a custom icon for my application. I made my icon, then altered the mask
setting so it would appear differently when I selected it. I used the way the
icons appear on the bottom line of the ICN# editing window as my guide. However,
when I placed the application on the disk the icon did not change when I clicked
it; rather, I got a weird hybrid of what I wanted and the unselected icon. Is
this a flaw in ResEdit, or some undocumented "Feature" of the Finder (version
6.0)? Any ideas out there on how I can implement what I want? Just e-mail me
the answer; I'm sure I'm just missing something extremely obvious. Thanks in
advance.
						--Rob

--
How Wabewalker became one with the net:  |
    >LOGIN                               | Robert-Aurin Menke
    >TYPE "RN REC.ARTS.ANIME"            |   c60a-4ag@widow.berkeley.EDU
    >READ ARTICLES                       |

darin@Apple.COM (Darin Adler) (04/27/88)

In article <9105@agate.BERKELEY.EDU> c60a-4ag@web7a.berkeley.edu (Robert Menke) writes:
> ... I got a weird hybrid of what I wanted and the unselected icon. Is
> this a flaw in ResEdit, or some undocumented "Feature" of the Finder (version
> 6.0)? ...

In Finder version 5.5, the algorithm for drawing icons with masks was changed.
Previously, hilited icons were drawn by exclusive-or'ing the mask with the
data. This is not exactly what the definition in the Finder Interface chapter
of Inside Mac says. It says that there should be a mask "consisting of the
icon's outline filled with black". Some people took advantage of the exclusive-
or'ing effect to create "animated icons". Unfortunately, when user coloring of
icons was added to the Finder (the Color menu seen on Mac IIs in color mode),
this model didn't work well. The newer Finder hilites by drawing the entire mask
area, with color (usually black) wherever the icon has 0s, and white wherever
the icon has 1s. This always has the same result as before for icons with
"proper" masks. ResEdit has not yet been updated to reflect the new hiliting
scheme.
-- 
Darin Adler						AppleLink:Adler4
UUCP: {sun,voder,nsc,mtxinu,dual}!apple!darin	  CSNET: darin@Apple.com

jimc@iscuva.ISCS.COM (Jim Cathey) (04/28/88)

In article <8995@apple.Apple.Com> darin@apple.UUCP (Darin Adler) writes:
>In article <9105@agate.BERKELEY.EDU> c60a-4ag@web7a.berkeley.edu (Robert Menke) writes:
>> ... I got a weird hybrid of what I wanted and the unselected icon. Is
>> this a flaw in ResEdit, or some undocumented "Feature" of the Finder (V6.0)

>of Inside Mac says. It says that there should be a mask "consisting of the
>icon's outline filled with black". Some people took advantage of the Xor-
>ing effect to create "animated icons". Unfortunately, when user coloring of

I _hate_ those 'animated' icons.  Try putting one of them on a non-white
background sometime (like the desktop which I do a lot of).  What a mess!
Why don't those folks go back to their C-64s...  The mask is for punching a
hole in the background, and the icon is for filling it back in.  RTFM Red
Ryder and LSC.  I'm glad Apple has the guts to 'break' programs that have
clearly violated the rules.  

+----------------+
! II      CCCCCC !  Jim Cathey
! II  SSSSCC     !  ISC Systems Corp.
! II      CC     !  TAF-C8;  Spokane, WA  99220
! IISSSS  CC     !  UUCP: uunet!iscuva!jimc
! II      CCCCCC !  (509) 927-5757
+----------------+
			"With excitement like this, who is needing enemas?"

dee@cca.CCA.COM (Donald Eastlake) (04/28/88)

In article <1407@iscuva.ISCS.COM> jimc@iscuva.ISCS.COM (Jim Cathey) writes:
>In article <8995@apple.Apple.Com> darin@apple.UUCP (Darin Adler) writes:
>>In article <9105@agate.BERKELEY.EDU> c60a-4ag@web7a.berkeley.edu (Robert Menke) writes:
>>> ... I got a weird hybrid of what I wanted and the unselected icon. Is
>>> this a flaw in ResEdit, or some undocumented "Feature" of the Finder (V6.0)
>>of Inside Mac says. It says that there should be a mask "consisting of the
>>icon's outline filled with black". Some people took advantage of the Xor-
>>ing effect to create "animated icons". Unfortunately, when user coloring of
>I _hate_ those 'animated' icons.  Try putting one of them on a non-white
>background sometime (like the desktop which I do a lot of).  What a mess!
>Why don't those folks go back to their C-64s...  The mask is for punching a
>hole in the background, and the icon is for filling it back in.  RTFM Red
>Ryder and LSC.  I'm glad Apple has the guts to 'break' programs that have
>clearly violated the rules.  

On the other hand, I think that animated ICONs are really neat and a
very MAC-like extension to the interface.

Maybe I am missing something but I don't see any reason for Apple to
have "broken" these programs insteaded of just fixing ICONs so they work
aninated in color.  Especially with the CalcMask call to QuickDraw, the
"mask" part of the ICN# does not seem logically necessary.  Why not just
have the Finder calcualte the mask from the regular ICON or from the xor
as appropriate?

It is too bad that you think the original Apple guidelines are the word
of God and that any deviation therefrom must be excommunicated.

-- 
	+1 617-969-9570		Donald E. Eastlake, III
	ARPA: dee@CCA.CCA.COM	usenet:	{cbosg,decvax,linus}!cca!dee
	P. O. Box N, MIT Branch P. O., Cambridge, MA 02139-0903 USA

sho@tybalt.caltech.edu (Sho Kuwamoto) (04/29/88)

In article <27481@cca.CCA.COM> dee@CCA.CCA.COM.UUCP (Donald Eastlake) writes:
>In article <1407@iscuva.ISCS.COM> jimc@iscuva.ISCS.COM (Jim Cathey) writes:
>>
>>I _hate_ those 'animated' icons.  [...]
>>I'm glad Apple has the guts to 'break' programs that have
>>clearly violated the rules.  
>
>On the other hand, I think that animated ICONs are really neat and a
>very MAC-like extension to the interface.
>
>Maybe I am missing something but I don't see any reason for Apple to
>have "broken" these programs insteaded of just fixing ICONs so they work
>aninated in color.  Especially with the CalcMask call to QuickDraw, the
>"mask" part of the ICN# does not seem logically necessary.  Why not just
>have the Finder calcualte the mask from the regular ICON or from the xor
>as appropriate?
>
>It is too bad that you think the original Apple guidelines are the word
>of God and that any deviation therefrom must be excommunicated.
>

There two reasons *I* don't like animated icons:
  1) They look ugly on the desktop
  2) It is often difficult to tell whether or not an item is hilighted

If you don't believe me about 2), take a look at the shareware version of
Dungeons of Doom, or the actual commercial version of Shadowgate.  For an
extreme example, take a look at some Amiga icons where animated icons are
rampant.

As for why the Finder doesn't just calculate the mask... I don't know.  
CalcMask() hasn't been around forever, so it's obvious why it wasn't 
used initially.  As for why they don't switch, I think there are two reasons.
First, there is nothing to be gained by doing this except for a tiny bit
of disk space (yeah, right).  It doesn't burden the programmer at all,
because of programs such as Resedit.  In addition, some icons might
look better if the mask were, say, one pixel larger than the icon,
whereas others might not.  It gives more flexibility to the
programmer.

Now when will apple put cicn's in the finder....


						-Sho
 (sho@tybalt.caltech.edu, sho@caltech.bitnet, ...!cit-vax!tybalt!sho)

c60a-4ag@web8h.berkeley.edu (Robert Menke) (04/29/88)

In article <27481@cca.CCA.COM> dee@CCA.CCA.COM.UUCP (Donald Eastlake) writes:
...
>On the other hand, I think that animated ICONs are really neat and a
>very MAC-like extension to the interface.
>
>Maybe I am missing something but I don't see any reason for Apple to
>have "broken" these programs insteaded of just fixing ICONs so they work
>aninated in color...

As someone told me through the mail, the actual reason for making the new icons
AND with their masks instead of XORing with them is to support the "open
application" icon generated under MultiFinder. ResEdit, the version I have, has
not been updated to realize this.

Thanks to all those people who replied.

							--Rob

--
How Wabewalker became one with the net:  |
    >LOGIN                               | Robert-Aurin Menke
    >TYPE "RN REC.ARTS.ANIME"            |   c60a-4ag@widow.berkeley.EDU
    >READ ARTICLES                       |