Several Questions

Dar Scott dsc at swcp.com
Sat Jan 10 13:46:26 EST 2004


On Saturday, January 10, 2004, at 11:23 AM, WIlliam Griffin wrote:

> 1. Is there anywhere i can get information, esp. tutorial, on working 
> source code into an external.
>  I have access to endless amounts of source code, but its all useless 
> to me until I know this external magic.

An example external and example stack come with the external SDK.  It 
is easy to get off in the wrong direction or skip a step, so set aside 
a little time to play with this.

>
> 2. Is it possible to distort images, say into a perspective, I need to 
> make a psuedo cube thing for skyboxes?

Scriptable.  See imageData (etc.)
>
> 3. How would one fill a graphic with a gradient color?
Scriptable.
>  Do I always have to import images?
Paste works in a few cases.  You can set the imageData (and maskData 
and alphaData) properties and you can set the image to a PNG value from 
a variable (etc).

> Can I apply color to a generic grayscale image, like QuarkXpress does 
> for its gradients?
Scriptable.
>
> 4. Is there an external or some wicked script that could produce noise 
> of the cloud variety? Filling random pixels?
Scriptable.
>
> 5. If I make a stack, that is masked, how can I go about moving it? 
> Should I designate an area as the draggable area?
Yes.  I'd put window dragging into the card script, so it is the 
default.  I think others have much more experience in how this works in 
the real world.

> 6. I want to use the paint tool , or us imported images, then read 
> from it for color values.

Scriptable.  See imageData.

All this can be slow.  Do what you can at design time instead of run 
time.  Try to process by rows instead of columns.  Currently random 
write to bytes (chars) in imageData is slow; I recommend building row 
segments using 'put ... after ...'.

Summary:  imageData

Dar Scott



More information about the use-livecode mailing list