A simple Paint-like application written in Python using the graphics.py library.
This project allows you to draw lines by dragging your mouse, change colors, adjust pen size, clear the canvas, and quit the program.
It’s a fun way to practice Python graphics programming and create your own mini Paint app!
The Simple Paint App is designed to be a beginner-friendly project for learning Python graphics.
It uses John Zelle’s graphics.py library to provide a basic drawing canvas.
Users can interactively draw lines, change colors, adjust pen thickness, clear the canvas, and exit the program using keyboard shortcuts.
- Draw lines by clicking and dragging the mouse.
- Change pen color randomly with
C. - Increase/decrease pen size with
+or-. - Clear the canvas with
X. - Quit the program with
Q.
- Make sure you have Python 3 installed.
- Install the
graphics.pylibrary:
pip install graphics.pyNote:
graphics.pyis John Zelle’s simple graphics library for Python.
Run the program:
python paint.py| Action | Key / Mouse |
|---|---|
| Draw | Click and drag mouse |
| Change color | C |
| Increase pen size | + or = |
| Decrease pen size | - |
| Clear canvas | X |
| Quit | Q |
- Keep clicking and dragging to draw continuous lines.
- Use
Cmultiple times to cycle through different colors. - Adjust pen size to create thin or thick lines.
This project is open-source and free to use.