Giter Club home page Giter Club logo

painter's Introduction

Web-Based Painter

This is a web application that allows users to draw and edit shapes on a canvas. The application was developed using Vue.js and Express.js.

How to Run the Project

  1. Open the Painter folder using an IDE such as IntelliJ IDEA.
  2. Run src\main\java\eg.edu.alexu.csd.oo.p.draw.cs\CsApplication (Port:8090).
  3. Open the Paint folder using an IDE such as Visual Studio Code.
  4. Install "axios" (npm install axios).
  5. Run src\components\Paint.vue (npm run serve).
  6. Open http://localhost:8080/ in your web browser.

UML Class Diagram

image

Design Pattern

We used the Factory design pattern to generate new shapes depending on the type of the shape.

Features

The project supports geometric shapes, including:

  • Line Segment
  • Circle
  • Ellipse
  • Triangle
  • Rectangle
  • Square

The application allows the following functionalities on all shapes:

  • Draw
  • Color
  • Resize
  • Move
  • Copy
  • Delete

It also allows users to undo or redo any action performed.

Design Decision

We have decided to put two toolboxes, one on the left and the other on the right, with a canvas between them that users can draw on. The left toolbox includes the group of shapes, and the border color picker. The right toolbox includes the group of possible operations, the group of tools, and the fill color picker.

Snapshots of UI & User Guide

Drawing Shapes

To draw a shape, click on any icon, then go to the canvas and click and drag. If the user clicks on any shape icon, the shape will stay with them until they click on another icon.

Setting Border and Fill Colors

If the user wants to make a shape that has a border color, they should pick a color from the color picker that lies in the left toolbox before they draw the selected shape. If the user wants to make a shape that is filled with a color, they should pick this color from the color picker that lies in the right toolbox before they draw the selected shape. Every time the user picks a new shape, they must pick a new fill color, but the border color stays the same.

image

Deleting Shapes

To delete a shape, the user must click on the delete icon, then click on the shape they want to delete. The delete operation is permanent, and the user cannot undo it. Every time the user wants to delete a shape, they must go back to the delete icon, then click on it again (You cannot delete many shapes at the same time).

Before After

Copying Shapes

To copy a shape, the user must click on the copy icon, then click on the shape they want to copy. Every time the user wants to copy a shape, they must go back to the copy icon, then click on it again (You cannot copy many shapes at the same time).

Coppied filled Circle

Moving Shapes

To move a shape, the user must click on the move icon, then click on the shape they want to move and drag it. Every time the user wants to move a shape, they must go back to the move icon, then click on it again (You cannot move many shapes at the same time).

Before moving the copied circle Moved Circle

Resizing Shapes

To resize a shape, the user must click on the resize icon, then click on the shape they want to resize and drag it. Every time the user wants to resize a shape, they must go back to the resize icon, then click on it again (You cannot resize many shapes at the same time).

Resizing the Elipse

painter's People

Contributors

ssammlek avatar farahmourad avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.