Mustergenerator/Form generator 1.0.py

43 lines
777 B
Python

# -*- coding: utf-8 -*-
"""
Created on Tue Oct 24 15:14:56 2023
@author: Lukas
"""
import matplotlib.pyplot as plt
from PIL import Image
#from PIL.ExifTags import TAGS
from PIL import Image, ImageDraw
länge = 1000
höhe = 1000
x1= 10
y1= 10
r= 25
ax= 60
ay= 60
im = Image.new('RGB', (länge, höhe), (128, 128, 128))
draw = ImageDraw.Draw(im)
#x =x1
y =y1
while y <= höhe:
x=x1
while x <= länge:
draw.ellipse((x-r, y-r, x+r, y+r), fill=(255, 0, 0), outline=(0, 0, 0))
x =x+ax
y =y+ay
#draw.rectangle((200, 100, 300, 200), fill=(0, 192, 192), outline=(255, 255, 255))
# draw.line((350, 200, 450, 100), fill=(255, 255, 0), width=10)
im.save("C:/Users/Lukas/Desktop/test.png")