Is it possible in Lua to make a normal (Flash-like) bucket fill? You know, one where you click inside your shape and it automatically fills in all directions until it hits an edge?
It would seem to me that this tool would need to be able to search the list of shapes for those closest to the click spot, and then generate a fill object above them. How would you check to ensure that the area is closed, though?
(To properly emulate a bucket, the tool should be able to flow out through an opening in a shape and fill everything in sight. This starts to sound very, very complicated, though; I'd be happy with a tool that just worked in closed spaces.)
Flash-style bucket fill
Moderators: Víctor Paredes, Belgarath, slowtiger
-
- Posts: 32
- Joined: Tue Aug 03, 2004 10:16 pm
- Location: California
Agree with AcouSvnt. By the sounds of things, it sound like you want the program to be exactly like flash.
--Scott
cribble.net
cribble.net
-
- Posts: 32
- Joined: Tue Aug 03, 2004 10:16 pm
- Location: California
Hmm... If by that you mean some of Flash's better drawing tools come over to Moho, then you're right. Wouldn't it be nice to dump Flash once and for all and just use Moho?cribble wrote:Agree with AcouSvnt. By the sounds of things, it sound like you want the program to be exactly like flash.
Of course Moho already has fills, but think about a very intricate shape. For example, think about some of those over the top dresses that anime designers love to create, the ones with thousands of ruffles, jewels and the like. Moho can handle the lines just fine, but coloring the damn thing can be a pain, unless you really planned it well before drawing it.
Rather than spending time trying to select all the points along the edge of a region (which might actually cross several shapes), it would be much easier to just click with a paint bucket tool and bam, the region's filled.
As I see it, such a tool script depends on the answer to one key question: Given a point, is there a way in a script to detect all the surrounding points across all shapes? Extra points if the way works with an open shape.
If anyone has some thoughts on how this might work within Moho, I'd love to hear them -- or better yet, find examples within the current scripts that might yield insights.
(Or, sigh, I'll just wait for the script docs to be done.

Something is confusing me here:
Points is moho are linked. From one, is very easy to find all the ones that link to it.
Not all linked points form an outline. I can easily delete one line without deleting the points.
Points are there to define the limit of outlines and shapes. Shapes do not include outline. You can create a shapeless outline and a outlineless shape.
From above asserts, I may think of creating a shape without outlines, and it is changeable as easy as applying a new color or gradient to it. Over it, I can draw lines (outlines) that do not need to be closed around the shape.
Do you recall those old aqua paintings with the lines dranw on black chinesse ink? Sort like it.
Points is moho are linked. From one, is very easy to find all the ones that link to it.
Not all linked points form an outline. I can easily delete one line without deleting the points.
Points are there to define the limit of outlines and shapes. Shapes do not include outline. You can create a shapeless outline and a outlineless shape.
From above asserts, I may think of creating a shape without outlines, and it is changeable as easy as applying a new color or gradient to it. Over it, I can draw lines (outlines) that do not need to be closed around the shape.
Do you recall those old aqua paintings with the lines dranw on black chinesse ink? Sort like it.
