Asked • 07/11/19

How Could One Write This Basic PAINT Statement in JavaScript?

In BASIC there is a command called PAINT that looks like this: PAINT (column, row), color, color-stop It takes x/y coordinates as a starting place and begins filling it and the surrounding pixels in with color until it reaches the color defined in color-stop. An example with values might be: PAINT (200, 400), 4, 6 QuickBasic uses 0-15 to represent different colors. Each of these colors has an equivalent hexadecimal value. In the lines preceding the PAINT there are usually lines, circles, etc. drawn of a different (the color-stop) color which set boundaries for how much screen space the PAINT command can actually utilize. Any ideas on how to accomplish something similar in JavaScript?

1 Expert Answer


Jerry T. answered • 07/12/19

USC Grad for Programming and Web Development Tutor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.


Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.