Bitmap/Flood fill: Difference between revisions

Content added Content deleted
m (→‎{{header|Processing Python mode}}: style fix: constants and globals assigned earlier)
Line 2,020: Line 2,020:


tolerance = 15
tolerance = 15
fill_color = color(250, 0, 0)
allowed = False
allowed = False


def setup():
def setup():
global img, fill_color
global img
size(600, 400)
size(600, 400)
img = loadImage("image.png")
img = loadImage("image.png")
fill_color = color(250, 0, 0)
fill(0, 0, 100)
fill(0, 0, 100)

image(img, 0, 0, width, height)
image(img, 0, 0, width, height)
textSize(18)
textSize(18)