tperry2x wrote: ↑Wed May 01, 2024 9:53 am
I'll credit you in the release notes for OXT Lite if that's okay Paul.
I'll work on ideas for changing brush pixel colour now too I think.
That's cool.
Building a new tools palette has me playing around with the paint tools in OXT more than I ever have, I'm enjoying it.
The comment I made here about emulating MacPaint/HyperCard(1.x) Paint Multiples / Paint Mirrors kept spinning around my head so I spent a little time this morning trying to do script-control painting
in realtime! HyperCard could do this sort of thing so OXT should be able too.
I got stumped at first, but then I found some nice snippet of code that Bernd (Bn) shared about 8 years ago. The trick seems to be to NOT choose a paint tool before painting, otherwise no mouse or drag messages get sent to the image control or any other script object. So you have to be in 'browse tool" mode (you can set the cursor so that it
looks like you're on a paint tool) and then on mouseDown your script takes control, using a loop to 'draw' based on mouse position.
Once I got the jist of it I had a bunch of fun changing random colors
while painting and painting multiple lines simultaneously. Now I just have to figure out the difference between the global screen coordinates and the top,Left,right,Bottom of the image control its painting on so I can reflect the lines being drawn. I'm trying to write the script with relative object references ("of me", "the target", etc.) so that it can be attached to an image control as a behavior script.