Skip to content

charlie-goldenowl/draw_drag_ovals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Screenshot 2024-06-21 at 17 33 44

Draw and Drag Ovals on Canvas

This simple web application allows users to draw and interact with ovals on an HTML canvas. You can draw ovals by clicking and dragging on the canvas, and you can also select and drag existing ovals to new positions.

Features

  • Drawing: Click and drag to draw ovals on the canvas.
  • Selection: Click inside an existing oval to select it.
  • Dragging: Move selected ovals to new positions by dragging them.
  • Color Cycling: Each newly drawn oval cycles through predefined colors.

Technologies Used

  • HTML5 Canvas: Used for drawing and rendering ovals.
  • JavaScript: Handles user interactions, oval drawing, selection, and dragging.
  • CSS: Provides basic styling for the canvas and page layout.

Getting Started

To run this application locally, follow these steps:

  1. Clone the repository:

    git clone <repository-url>
    cd draw-and-drag-ovals
  2. Open index.html in your web browser.

  3. Click on the canvas to draw ovals. Click inside an oval to select it, then drag to move it.

Usage

  • Drawing: Click and drag on the canvas to draw ovals.
  • Selection: Click inside an existing oval to select it for dragging.
  • Dragging: While holding the mouse down inside a selected oval, drag it to move it to a new position.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Inspired by the need to create interactive drawing tools in web applications.
  • Built with guidance from various online tutorials and resources on HTML5 canvas and JavaScript.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published