A
A
Alexander Wolf2013-05-01 22:55:17
JavaScript
Alexander Wolf, 2013-05-01 22:55:17

How to make floodfill in html5 canvas?

55207.png
Hello! Can you please tell me how to implement something similar to FloodFill (delphi)? Those. we have a closed figure and a certain point inside it. We choose a color and paint over everything until we reach the border? The syntax is something like this:

floodFill(pointX, pointY, fillColor, borderColor, canvas);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PomanoB, 2013-05-02
@mannaro

The easiest way:
jsfiddle.net/SSh2C/
And there are articles on filling algorithms on habrahabr.ru

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question