Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # additiveRGBtransparency4polygons.py
- from PIL import Image, ImageDraw
- img = Image.new('RGB', (400, 400))
- cv = ImageDraw.Draw(img, 'RGBA')
- cv.rectangle([(0, 0), (400, 400)], (255, 255, 255, 255)) # white
- cv.rectangle([(100, 100), (400, 400)], (255, 255, 0, 255)) # yellow
- cv.rectangle([(0, 0), (300, 300)], (0, 0, 255, 125)) # blue
- img.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement