diff --git a/example.py b/example.py deleted file mode 100644 index 4ee886c..0000000 --- a/example.py +++ /dev/null @@ -1,19 +0,0 @@ -""" -Example script that uses treimage. -""" -from PIL import Image, ImageDraw -from treimage.trebuchet import D - - -CANVAS_SIZE = (640, 640) -WHITE = (255, 255, 255) -RED = (255, 0, 0) - -a = D(10, 10, 10, 0.3) -print("Size:", a.size) -print(a.points) - -with Image.new('RGB', CANVAS_SIZE, WHITE) as im: - draw = ImageDraw.Draw(im) - draw.polygon(a.points, fill=RED) - im.show() diff --git a/setup.py b/setup.py index 35ff1bc..1b281dd 100644 --- a/setup.py +++ b/setup.py @@ -2,8 +2,9 @@ from setuptools import setup, find_packages setup( name="treimage", + author="Brandon Rozek", description="Copy an image out of trebuchets.", - version="0.1", + version="0.8", packages=find_packages(), install_requires=['Pillow~=7.1.2'] ) \ No newline at end of file diff --git a/treimage/__init__.py b/treimage/__init__.py index 14452bb..9b49227 100644 --- a/treimage/__init__.py +++ b/treimage/__init__.py @@ -22,7 +22,9 @@ def create(image_path: str, shape: trebuchet.FlexibleTrebuchet = trebuchet.D, Parameters ========== image_path: str - The path of the image that we wish to emulate + The path of the image that we wish to emulate. + shape: trebuchet.FlexibleTrebuchet + The trebuchet shape to use. Options: A, B, C, D. color: Optional[Tuple[int, int, int]] A RGB tuple containing the color of the Trebuchet tile. If None, then we average the color of the surrounding area.