Question
create a JavaScript Canvas paint-like application. Your paint application must support selecting three filled shapes (e.g. circle, square, triangle) from a dropdown menu, and when
create a JavaScript Canvas paint-like application. Your paint application must support selecting three filled shapes (e.g. circle, square, triangle) from a dropdown menu, and when clicking on the Canvas, drawing that shape. The shape drawing must support drawing different sizes. When drawing shapes, the mouse down starts the drawing process by marking the starting location, and the mouse up determines the ending point, or size, of the shape to be drawn. You do not need to do rubberbanding while drawing the shape. You must have also have a color dropdown that is used as the fill color for each shape. You must use local storage to save each drawn shape so that returning to your paint application will redraw all of the previously drawn shapes. You must also have a clear button that clears your drawing and local storage.
A class is not required for this option, but using a different class for each shape will make drawing and storing each shape easier. You may also consider using a shape class as a base class for each of the three shape classes. A base class would hold common properties, such as color and location, and each derived class would contain the draw method.
Option #2 Extra Credit: Add the ability to click and move any shape. When moving a shape, show the shape outline during the mouse down and movement.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started