Answer the question
In order to leave comments, you need to log in
How to draw on a canvas with an image?
There is a code: https://jsfiddle.net/3ab9vc0L/
When you click on the 256x256 button, an image is drawn on the canvas Tell me
how to make it possible to draw with a pencil (drawing occurs when you click the mouse) over the image?
Example:
How the pencil works - when you click on the canvas with the mouse, the photo now disappears and the default background appears and a pixel with a new color is already drawn there (the color is visible in the Current Color button)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question