This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-01-02 03:23:40

Bargonaut
Scratcher
Registered: 2007-11-05
Posts: 6

Flood Fill Paint Example

http://scratch.mit.edu/projects/Bargonaut/368844

Here's my project which demonstrates a scanline flood fill routine.
It can fill the white area of any closed shape, including around holes.
The project provides a simple paint program to draw things to fill.

The purpose of this is to demonstrate the method to perform a fill.
However, it is slow to find all of the area to fill, and might need
a lot of memory for very large shapes.  Make sure your shape is closed,
so it doesn't draw outside the lines!

This does use list variables, so it requires Scratch 1.3.

Enjoy.
-BS

Offline

 

Board footer