Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions