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
turtle_art_manager-1.0.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for turtle_art_manager-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73e492cbb5b6c1cfc680fa9006c2777795ac80126b1912eb20fb9e986091f729 |
|
MD5 | 196cbb1fd91408f3b2f1948ec4d4df43 |
|
BLAKE2b-256 | 47e44e7f771ac1005b3acaf53491ffd2b94f19d1c68b33185d52a1de6cfacf0f |