make a note about a flood fill library

This commit is contained in:
cmdr2 2023-05-24 10:08:00 +05:30 committed by GitHub
parent d3334f9dfa
commit eba83386c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -834,6 +834,7 @@ function pixelCompare(int1, int2) {
}
// adapted from https://ben.akrin.com/canvas_fill/fill_04.html
// May 2023 - look at using a library instead of custom code: https://github.com/shaneosullivan/example-canvas-fill
function flood_fill(editor, the_canvas_context, x, y, color) {
pixel_stack = [{ x: x, y: y }]
pixels = the_canvas_context.getImageData(0, 0, editor.width, editor.height)