A basic desktop paint application built using Python's Tkinter library. This app allows users to free-draw, erase, and draw predefined shapes like rectangles, circles/ovals, and straight lines. It also includes essential features like color selection, brush size adjustment, undo/redo functionality, and a clear canvas option.
This project is suitable for beginners learning GUI development with Tkinter and demonstrates fundamental concepts of event handling, canvas manipulation, and basic history management.
-
Free Drawing: Draw freehand lines on the canvas.
-
Color Selection: Choose from a wide range of colors using a color picker.
-
Brush Size Adjustment: Control the thickness of your brush strokes and shapes.
-
Eraser Tool: Erase parts of your drawing.
-
Shape Tools:
-
Rectangle: Draw perfect rectangles.
-
Circle/Oval: Draw circles or ovals.
-
Straight Line: Draw straight lines.
-
Shape tools are accessible via a pop-up menu for a cleaner UI.
-
-
Undo/Redo: Revert or reapply drawing actions.
-
Clear Canvas: Clear all drawings from the canvas with a single click.
-
Responsive Layout: The canvas and controls adapt to window resizing.
-
Python 3.x: Make sure you have Python installed. You can download it from python.org.
-
Tkinter: Tkinter usually comes pre-installed with Python.
-
Pillow (PIL Fork) (Optional, but good practice if you expand features): If you plan to add image saving/loading, install Pillow:
pip install Pillow
-
Clone the repository (or download the code):
git clone [https://github.com/mertrone/Simple-Paint-App-For-Newcomers-to-Python-Canvas.git](https://github.com/mertrone/Simple-Paint-App-For-Newcomers-to-Python-Canvas.git) cd Simple-Paint-App-For-Newcomers-to-Python-Canvas -
Run the application:
python paint_app.py
-
Python 3.x
-
Tkinter: Standard Python GUI library.
Yusuf Mert Tuna