Created
November 17, 2015 08:02
-
-
Save anonymous/729d5437fc105b18c3a1 to your computer and use it in GitHub Desktop.
DigitNine.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scene import * | |
class DigitNineScene(Scene): | |
def setup(self): | |
# This will be called before the first frame is drawn. | |
pass | |
def draw(self): | |
# This will be called for every frame (typically 60 times per second). | |
background(0.9, 0, 0.9) | |
fill(1, 1, 1) | |
pos = self.bounds.center().as_tuple() | |
(img, siz) = render_text('9','Helvetica',400) | |
rect(pos[0],pos[1],*siz) | |
tint(0,0,0) | |
image(img, pos[0], pos[1]) | |
tint(0.5,0,0) | |
image_quad(img, pos[0], pos[1], | |
pos[0]+siz.w, pos[1], | |
pos[0], pos[1]+siz.h, | |
pos[0]+siz.w, pos[1]+siz.h, | |
0,0, | |
siz.w,0, | |
0,siz.h, | |
siz.w, siz.h) | |
run(DigitNineScene()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment