Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/drawxos.py
diff options
context:
space:
mode:
Diffstat (limited to 'drawxos.py')
-rw-r--r--drawxos.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/drawxos.py b/drawxos.py
index ac1b3cd..fcc6ed9 100644
--- a/drawxos.py
+++ b/drawxos.py
@@ -2,7 +2,9 @@ import os, sys
import pygame
from pygame.locals import *
-def drawXOs(screen,image,x=3,y=3,backgroundColor=(255,255,255)):
+
+def drawXOs(image,x=3,y=3,backgroundColor=(255,255,255)):
+ screen = pygame.display.get_surface()
(xsize,ysize) = screen.get_size()
(xx,yy) = image.get_size()
mult = min(float(xsize)/(xx*x),float(ysize)/(yy*y))
@@ -28,11 +30,11 @@ def drawXOs(screen,image,x=3,y=3,backgroundColor=(255,255,255)):
def main():
pygame.init()
- screen = pygame.display.set_mode((1280,1000))
+ pygame.display.set_mode((1280,1000))
image = pygame.image.load("XO.png")
- drawXOs(screen,image,100,50);
+ drawXOs(image,100,50);
raw_input()