Skip to content

elahehakb/python-advanced-paint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Advanced Paint App by Elaheh Akbarian

A fun and advanced Paint-like application written in Python using the graphics.py library.
This project allows you to draw lines and various shapes (circle, square, rectangle, triangle), change colors, adjust pen size, clear the canvas, and quit the program.
It’s an interactive way to practice Python graphics programming and create your own mini Paint app!


Project Description

The Advanced Paint App is designed for users who want a richer drawing experience.
It uses John Zelle’s graphics.py library to provide a canvas where users can draw lines, shapes, and experiment with colors and pen sizes.

Users can interactively:

  • Draw lines by clicking and dragging the mouse.
  • Draw circles, squares, rectangles, and triangles by selecting the shape key.
  • Change pen color randomly.
  • Adjust pen thickness.
  • Clear the canvas while keeping instructions visible.
  • Quit the program at any time using a key.

Features

  • Draw lines with mouse drag.
  • Draw shapes: Circle (O), Square (S), Rectangle (R), Triangle (T).
  • Change pen color randomly with C.
  • Increase/decrease pen size with + or -.
  • Clear the canvas with X (info text remains).
  • Quit the program with Q.
  • Display current shape, color, and pen size at the top of the window.

Installation

  1. Make sure you have Python 3 installed.
  2. Install the graphics.py library:
pip install graphics.py

Note: graphics.py is John Zelle’s simple graphics library for Python.

Usage

Run the program:

python paint.py

Controls

Action Key / Mouse
Draw line Click and drag mouse
Draw circle O
Draw square S
Draw rectangle R
Draw triangle T
Change color C
Increase pen size + or =
Decrease pen size -
Clear canvas X
Quit Q

Tips

  • Keep clicking and dragging to draw continuous lines.
  • Use C multiple times to cycle through different colors.
  • Adjust pen size to create thin or thick shapes.
  • Shape selection only affects the next click; you can switch between shapes anytime.

License

This project is open-source and free to use.

Releases

No releases published

Packages

No packages published

Languages