Advertisement
here2share

# additiveRGBtransparency4polygons.py

Aug 21st, 2015
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. # additiveRGBtransparency4polygons.py
  2.  
  3. from PIL import Image, ImageDraw
  4.  
  5. img = Image.new('RGB', (400, 400))
  6. cv = ImageDraw.Draw(img, 'RGBA')
  7. cv.rectangle([(0, 0), (400, 400)], (255, 255, 255, 255)) # white
  8. cv.rectangle([(100, 100), (400, 400)], (255, 255, 0, 255)) # yellow
  9. cv.rectangle([(0, 0), (300, 300)], (0, 0, 255, 125)) # blue
  10.  
  11. img.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement