[comp.sys.mac.hypercard] Problems with HyperCard Opaque

marvel@cheops.cis.ohio-state.edu (Howard P Marvel) (07/15/89)

I have had a strange problem with HyperCard graphics.  I am pasting
pictures, generally from the clipboard, onto backgrounds that have art
and fields.  Once I position the information, I select "Opaque" from
the Paint menu, obtaining the desired effect.  The problem is that the
effect is not permanent.  A copy-card, paste card sequence leads to
the new card layer being transparent, and going back to the original
card finds that card's card layer transparent as well.  This has
happened to me numerous times when using either an SE or a CX.
Needless to say, it is a major irritant.  I'm using the latest system,
6.0.3, and HyperCard 1.2.2.  Am I doing something wrong?  If not, is
this a known bug, and is there a workaround?

I know that this does not always happen, and I am apparently leaving
out a step that leads to the problem, as I cannot always duplicate the
problem, but I'd sure appreciate some help in avoiding it in the future.

jdevoto@Apple.COM (Jeanne A. E. DeVoto) (07/16/89)

In article <54926@tut.cis.ohio-state.edu> Howard P Marvel <marvel@cis.ohio-state.edu> writes:
>
>I have had a strange problem with HyperCard graphics.  I am pasting
>pictures, generally from the clipboard, onto backgrounds that have art
>and fields.  Once I position the information, I select "Opaque" from
>the Paint menu, obtaining the desired effect.  The problem is that the
>effect is not permanent.  A copy-card, paste card sequence leads to
>the new card layer being transparent, and going back to the original
>card finds that card's card layer transparent as well.

I have seen similar things happen in some of my own stacks. I believe
what is happening is that HyperCard checks the card picture to see whether
any opaque pixels cover a black pixel in the background graphic. If not,
HyperCard will turn the card picture transparent, since doing so will
not change the appearance of the card.

The problem is that, apparently, the check is only made for black pixels
in the background graphic, not for black pixels in background fields and
buttons. This means that an opaque area that was covering up a button can
be changed to transparent, letting the button show through.

Since Hyp[erCard appears to only make this change when the entire card
can be made transparent without showing a background black pixel, it can
be worked around by making certain that there is always a black pixel in
the background graphic that is covered by an opaque pixel in the card
graphic. In other words, put a single black dot in a corner of the background
picture, then make sure that for card pictures that need to stay partly
or completely opaque, there is an opaque pixel over that black dot. This
should block HyperCard from changing the transparency of card pictures.


====== jeanne a. e. devoto =================================================
 Usenet: jdevoto@apple.com  |  You may not distribute this article under a
         jdevoto@well.UUCP  |  compilation copyright without my permission.
____________________________________________________________________________
 Disclaimer: I doubt anyone in Apple Corporate  |  CI$ 72411,165
 knows what Usenet is, let alone what I post.   |