Creating windowShapes in Rev

Ken Norris pixelbird at interisland.net
Tue Dec 30 15:02:59 EST 2003


Hi Dar,

> Date: Mon, 29 Dec 2003 20:56:56 -0700
> From: Dar Scott <dsc at swcp.com>
> Subject: Re: Creating windowShapes in Rev
> 
> 
> On Monday, December 29, 2003, at 08:12 PM, Ken Norris wrote:
> 
>> Now, how do I create complex shapes to match outlines of other images
>> I want
>> to overlay?
> 
> This might help:
> http://www.altuit.com/webs/altuit2/RunRev/Downloads.htm
------------
I assume you mean the 'Compositing Example' stack, yes? It's very cool, and
I will need to study what happens.

What's really needed is a full-blown image processor plugin, eh?
------------
> I have something, but it is ugly and really needs nested arrays.
------------
Nested arrays? Do you mean you are creating some paint tools to accomplish
these tasks? Perhaps by examining what's under the tool point, changing the
arrays and redrawing when you save?
------------
> You might also consider taking a picture with export snapshot to a
> variable and then looking for white or some other color to make
> transparent parts in the final picture.
------------
If I 'export snapshot' into an 'image' will it automatically convert to an
image format, i.e., Rev's own 1-byte proprietary format?

If so, then I think I see a little of what you mean. If we use a proprietary
method, we *should* be able to do this:

1) If we can 'export snapshot' into an image, it should produce an 8-bit
image rectangle with white pixels outside the paint area to the edges of the
rectangle.

2) Use the maskData property to set all the white pixels to transparent.

3) In order to facilitate a mask I can understand when I see it, I will want
to change all non-transparent pixels to black (or some other 8-bit color to
distinguish it from overlaid images for alignment purposes) during the
process.

You still have to go through every pixel and re-render, right?

All this could be solved with a zoom control, a lasso tool, and some pixel
controls in Rev's Paint Palette, so that's on my wish list.
------------ 
> Think the weatherman before a bluescreen.
------------
Hmmm...must be a Windows thing. Being a Mac person, I've never seen a
'bluescreen'. Mac Sad Face, yes, Chimes of Death, yes, but no BlueScreen ;-)
------------
> I made the same ID mistake, BTW.
------------
I'd be willing to bet that everyone does the first time they use it.

I understand that in this case there is nothing but an image ID to set the
stack to, but IMO it's still an unexpected deviation from the usual syntax.
I mean, looking at a script, you could easily mistake setting the stack to
another stack ID or something, without the designation of "image" or
"stack". 

Thanks much,
Ken N.




More information about the use-livecode mailing list