- Drawing Program
- Select from 16+ Colors (Left)
- Buttons
- Undo and Redo
- Increase or Decrease Drawing Size
- Draw with Shapes (Square, Several Types of Triangles, Polygons, Circles, Several types of Arrows.)
- FPS Counter (Top Left)
- Cursor Position (Top Left)
- Clear entire canvas
- Eraser
- Able to undo a cleared canvas.
- Can deselect from a shape.
- Clone the repository
git clone https://github.com/MujyKun/basic2dgraphics.git
- Go to the repo directory
cd basic2dgraphics
- Running with Python ^3.9 is recommended.
- Install requirements with either
pip install -r requirements.txt
- If you do not have pip, you can install it with
python get-pip.py
orpython -m ensurepip --upgrade
- If you do not have pip, you can install it with
- If you have poetry you can use
poetry install
.
- Start the program with
python run.py
- Create sub-surfaces so that the creation of certain objects such as buttons do not need to be recreated on every frame.
- How to use relative position of sub-surfaces to detect button presses.
- How to manage the events.
- How to manage the frame rate.
- How to process undo and redo tasks.
- How to handle drawing with shapes.
- How to manage color swapping efficiently.
- An eraser can just be the background color.
- How to render text with a background and process it as a button.
- How to use the pygame library.