Question: Drawing a Shape Paint Program Allow the user to select if they want filled or outline. Allow the user to change the color (Hint: look

Drawing a Shape Paint Program

  1. Allow the user to select if they want filled or outline.
  2. Allow the user to change the color (Hint: look up HTML form color input)
  3. You will have buttons (Preferably toggle inputs) to allow the user to draw a rectangle, an n-point polygon, a line, circle and a triangle.
  4. You will allow the user to draw a rectangle with the same method that he employs, however, you will draw a temporary rectangle showing the user where the first point was clicked and where the mouse cursor is.
  5. For the N-point polygon you will draw the current polygon until the user has finished.
  6. For the line you will simply select a point and then another point. (Again draw a temporary line to show the user where the line would currently be)
  7. For the circle, select the center of thecircle selecta second point to specify the radius (Again creating a temporary circle to show the user where it would be).
    1. If the circle is filled, you can use triangle fan to fill it.
    2. However, you will only want to use triangle fan on circle.
  8. For the triangle, the user will select three points to draw the triangle. (A temporary triangle will be drawn while the user is selecting the 3rd point).
  9. At anytime the user can cancel drawing an object by clicking the right button.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!