This drawing app provides the following features:

  1. Modes: Choose between Freehand, Line, Rectangle, or Circle drawing modes via a dropdown.

  2. Color Picker: Select the stroke color using a color input.

  3. Stroke Weight: Adjust the thickness of the lines or shapes (1 to 20 pixels).

  4. Clear Canvas: Reset the canvas to a blank state with a button.

  5. Drawing Mechanics:

    • Freehand: Click and drag to draw freely.

    • Line/Rectangle/Circle: Click to set the starting point, drag to adjust, and release to finalize the shape.

    • Shapes (Line, Rectangle, Circle) show a preview while dragging and are finalized on mouse release....