I recently just released a new application for drawing called, “DoodlePad“. This simple application allows you to draw on the canvas and change your brush color, size, and background of your canvas. It also allows you to save your drawing, create a new one, or open an existing image. One of the tricky parts that I ran into when developing this application was trying to provide a good user experience by allowing them to have a background color.
This wasn’t as easy as I had first imagined since the Canvas is transparent by default. At first I thought I could simply create a fill style and then fill the Canvas rectangle with whatever color a user chose. However this didn’t work out very well when I was testing because as soon as I would start drawing and then want to change the background, all of my art work up till then would be covered with the new background.
Now comes the problem, when I want to dump all the beautiful work that the user has done create a masterpiece, the canvas no longer has any information concerning the background.