Using maskData/alphaData
Ben Rubinstein
benr_mc at cogapp.com
Tue Jan 28 09:48:01 EST 2003
What is the relationship between the maskData and alphaData properties of an
image (and come to that, the 'opaque' property?).
All three of these properties affect the opacity of an image; but I can't
find any reference (either in MetaCard docs or in Revolution) to how they
interact.
Does the opaque property override the alphadata/maskdata? Or is it ignored?
If the maskData, say, makes the top half of the image transparent and the
bottom half opaque; and the alphaData makes the left side translucent and
the right side opaque; what would be the specifed/expected behaviour? Does
one take precedence over the other, or are they supposed to be combined in
some way? Is it the last one set that should take effect?
I ask these questions, rather than just doing the tests to find out for
myself, because I've been trying for many many hours now and am getting very
inconsistent behaviour. I've found Ken Ray's tip on always resetting the
imageData after setting mask or alpha, and I'm doing that consistently; but
still code that works one moment, stops working shortly afterwards. The
only consistency I get is if I throw away my image and import a new one.
(It's not enought to reset the imageData from a backup, I actually have to
throw away the control altogether). But for the app that I'm trying to work
towards, I need to be able to work and re-work with a single iamge, so I
need to have some understanding of what properties are affecting the
control.
Any help gratefully received,
Ben Rubinstein | Email: benr_mc at cogapp.com
Cognitive Applications Ltd | Phone: +44 (0)1273-821600
http://www.cogapp.com | Fax : +44 (0)1273-728866
More information about the metacard
mailing list