Skip to content

Instantly share code, notes, and snippets.

@guyhillyer
Created December 2, 2012 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guyhillyer/4191121 to your computer and use it in GitHub Desktop.
Save guyhillyer/4191121 to your computer and use it in GitHub Desktop.
bug
from scene import *
from PIL import Image
class MyScene (Scene):
def setup(self):
self.x = 0
self.sz = int(self.bounds.w)
self.img = Image.new('RGBA', (self.sz, self.sz))
def draw(self):
for i in range (0, self.sz - 1):
self.img.putpixel((self.x, i), (self.x,i,0,255))
self.imgid = load_pil_image(self.img)
image(self.imgid,0,0)
self.x = self.x + 1 if self.x < self.sz else 0
scene = MyScene()
run(scene)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment