• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

Hypercard Programing

uliwitness

Active member
That’s a nice overview. “PICT resource with a mask” wasn’t really a thing, though. A PICT resource was just a sequence of QuickDraw instructions that were followed to the letter. So if you pasted your PICT from an object-oriented “draw” program like MacDraw, and those instructions didn’t include whiting out the drawing area, you would get a transparent PICT. (Whereas if you pasted your image from MacPaint, you’d get a bitmap inside your PICT, which by definition whites out all the white pixels as part of rendering the bitmap.)

If you pasted a bitmap into MacDraw then copied that into a PICT resource, you would still get an opaque bitmap.

Of course QuickDraw made it possible to draw bitmaps with a mask in general, which one could have accessed in HyperCard via an XCMD. I’m sure someone must have created a way to do this at some point.
Yeah, I may have simplified too much here. MacDraw II (or maybe it was already ClarisDraw at the time?) had an option to make a bitmap transparent. I don't remember if it just used a pen mode that wouldn't draw white pixels, or if it actually generated a mask internally using some seed fill algorithm and set that as the clip region in the resulting PICT file when you exported it. But any way, there was a way to generate transparent bitmpap PICTs despite not having an alpha channel.
 
Last edited:

Crutch

Well-known member
That’s pretty cool, I didn’t know that about MacDraw II (?), yeah allowing a fancy clipRgn is probably the solution. I know PICTs don’t support CopyMask or SeedFill, but you could also use CopyBits with a maskRgn inside a PICT which would be another way to do it.
 
Top