ScratchData LogoScratchData
Back to Bargonaut's profile

Flood Fill 2.0

BABargonaut•Created May 20, 2016
Flood Fill 2.0
11
10
389 views
View on Scratch

Instructions

Draw a shape and press the 'F' key while pointing inside it. It will fill the white area with the current color. You can draw with the white color (for erasing), but you can't fill with the white color. Try changing the fill-pen-size, too, but don't go too big if you have small shapes.

Description

Flood Fill now works with Scratch 2.0, and is much faster than v1.0! This program demonstrates how to fill a closed shape with a color. Even around holes! It only fills in white shapes, since Scratch doesn't let you set a variable to match a color. It uses the "stack scanline" flood fill algorithm, which is explained here -- http://lodev.org/cgtutor/floodfill.html Enjoy.

Project Details

Project ID110554044
CreatedMay 20, 2016
Last ModifiedMay 22, 2016
SharedMay 21, 2016
Visibilityvisible
CommentsAllowed