A package for making turtle art
Project description
Turtle-Art-Manager
The Turtle-Art-Manager package provides Python classes for creating artistic drawings using Turtle graphics.
Installation
You can install the Turtle-Art package using pip:
pip install turtle-art-manager
Classes
TurtleArt Class
The TurtleArt class serves as an abstract base class for creating various artistic shapes using Turtle graphics.
Usage
from turtle import Screen, Turtle
from turtle_art_manager import TurtleArt
class MyArt(TurtleArt):
def _draw_art(self) -> None:
pass
# Example usage:
screen = Screen()
pen = Turtle()
artwork = MyArt(screen, pen)
artwork.draw()
screen.mainloop()
Methods
- draw(): Draws the artistic shape on the screen.
Rectangle Class
The Rectangle class is a subclass of TurtleArt that allows you to draw rectangles on the screen.
Usage
from turtle import Screen, Turtle
from turtle_art_manager import Rectangle
# Example usage:
screen = Screen()
pen = Turtle()
rectangle = Rectangle(screen, pen, width=150, height=80)
rectangle.draw(fill_color=True)
screen.mainloop()
Circle Class
The Circle class is another subclass of TurtleArt that allows you to draw circles on the screen.
Usage
from turtle import Screen, Turtle
from turtle_art_manager import Circle
# Example usage:
screen = Screen()
pen = Turtle()
circle = Circle(screen, pen, radius=50)
circle.draw(fill_color=True)
screen.mainloop()
Attributes
- width (int): Width of the rectangle.
- height (int): Height of the rectangle.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file turtle_art_manager-1.5.tar.gz.
File metadata
- Download URL: turtle_art_manager-1.5.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3bb4193f80da9d6e646ba6968ccd202f76d7b59901a56ce40e0e34c9464a961
|
|
| MD5 |
a14a4081b10f18c20dbbc8edac6f3f1c
|
|
| BLAKE2b-256 |
d5e27767580b4d12e98bfe89012eaaa39f11d35ebf89b5a1a152ed7faa536172
|
File details
Details for the file turtle_art_manager-1.5-py3-none-any.whl.
File metadata
- Download URL: turtle_art_manager-1.5-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7f8d1338a4a6e30f26a048d52db354e486bf934dea299253cfc2a0676af5185
|
|
| MD5 |
d06ef969648e4d42afbe15b05d1f6c12
|
|
| BLAKE2b-256 |
c9bac1e2b26e8f3efc7b4c0bed24d7188b692c29161b353c15fa8b2ad7c27431
|