[comp.sys.mac.hypercard] opaque paint problem

np@doc.ic.ac.uk (Nigel Perry) (01/24/89)

[System Tools 6.0.2, HyperCard 1.2.1, Mac+ 1Mb 20Mb HD]

Opaque paint doesn't seem to work properly, can anybody suggest a solution
or is this a real bug? Scenario: background picture of keyboard, background
transparent buttons over some of the keys including "return", card picture
of ']' button painted opaque. This is done so when the return button is
highlighted it looks "L" shaped. Now this works fine, but leave the card
and come back again and the card picture has gone transparent! I've
temporarily fixed the problem by using an "openCard" handler to
select the card picture and make it opaque again, but this is slow.
Any ideas, have I misunderstood opaque paint?

P.S. I asked this before but got no reply, any idea what a "WCMD" is?
One appeared in HC2-1.1 (UK 1.1) its called "SoundCapToRes", it is NOT
an XCMD...

				Nigel.
---
Nigel Perry                                  Department of Computing
                                             Imperial College
Janet: np@uk.ac.ic.doc                       London
DARPA: np%uk.ac.ic.doc@ucl-cs                SW7
Uucp:  np@icdoc.UUCP, ukc!icdoc!np           England

stadler@Apple.COM (Andy Stadler) (01/27/89)

In article <584@gould.doc.ic.ac.uk> np@doc.ic.ac.uk (Nigel Perry) writes:
>
>Opaque paint doesn't seem to work properly, can anybody suggest a solution
>or is this a real bug? Scenario: background picture of keyboard, background
>transparent buttons over some of the keys including "return", card picture
>of ']' button painted opaque. This is done so when the return button is
>highlighted it looks "L" shaped. Now this works fine, but leave the card
>and come back again and the card picture has gone transparent! I've
>temporarily fixed the problem by using an "openCard" handler to
>select the card picture and make it opaque again, but this is slow.
>Any ideas, have I misunderstood opaque paint?
>

Hypercard has a 'feature' which was designed to remove spurious opaque areas
which tend to clutter up a painted card.  If hypercard determines that the
opaque areas of a card aren't doing anything (that is, if you removed the
opaqueness, would the image still come out the same?) then it will -remove-
the opaque bits.  This speeds up hypercard for a number of reasons, incl.
smaller file, less bits to worry about, etc.

But the problem is when you are using opaque to obscure a button.  If you need
opaque to 'stick', you must convince hypercard not to remove this.  There are
two ways to do this...

(1) Put a black dot in the background image of your ']' key.  The opaque will
    cover it up so the end user won't see it;  And hypercard will say 'the
    opaque is doing something, I better not remove it!'

(2) Use opaque somewhere else in the card.  Hypercard will only remove opaque
    if it can -completely- remove the opaque.

--Andy        stadler@apple.com

dan@Apple.COM (Dan Allen) (01/28/89)

In article <584@gould.doc.ic.ac.uk> np@doc.ic.ac.uk (Nigel Perry) writes:
>
>[System Tools 6.0.2, HyperCard 1.2.1, Mac+ 1Mb 20Mb HD]
>
>Opaque paint doesn't seem to work properly, can anybody suggest a solution
>Any ideas, have I misunderstood opaque paint?

I believe this problem was fixed in HyperCard 1.2.2.  We fixed lots of
bugs and I would recommend this version to everyone.

Dan Allen
HyperCard Team
Apple Computer