update python
This commit is contained in:
parent
67f9aa6a69
commit
c6a295a4e5
1 changed files with 5 additions and 5 deletions
10
vloed.py
10
vloed.py
|
|
@ -64,7 +64,7 @@ class Canvas(object):
|
|||
self.height = options.height if options.height else screeninfo.current_h
|
||||
pygame.mixer.quit()
|
||||
self.screen = pygame.display.set_mode((self.width, self.height),
|
||||
pygamelocals.DOUBLEBUF)
|
||||
pygamelocals.DOUBLEBUF | pygame.FULLSCREEN)
|
||||
|
||||
def clear(self, r=0, g=0, b=0): # pylint: disable=C0103
|
||||
""" Fill the entire screen with a solid colour (default: black)"""
|
||||
|
|
@ -76,8 +76,8 @@ class Canvas(object):
|
|||
if a == 255:
|
||||
color = (r*256*256) + (g*256) + b
|
||||
if self.factor>1:
|
||||
for w in xrange(0, self.factor):
|
||||
for h in xrange(0, self.factor):
|
||||
for w in range(0, self.factor):
|
||||
for h in range(0, self.factor):
|
||||
self.pixels[(x*self.factor) + w][(y*self.factor) + h] = color
|
||||
else:
|
||||
self.pixels[x][y] = color
|
||||
|
|
@ -135,7 +135,7 @@ class Canvas(object):
|
|||
self.limit)
|
||||
if self.debug:
|
||||
print('%d pixels received, protocol V %d' % (pixelcount, protocol))
|
||||
for i in xrange(0, pixelcount):
|
||||
for i in range(0, pixelcount):
|
||||
pixel = struct.unpack_from(
|
||||
packetformat,
|
||||
data,
|
||||
|
|
@ -202,7 +202,7 @@ class PixelVloedClient(object):
|
|||
self.height = servers[0]['height']
|
||||
else:
|
||||
# lets list all found servers and allow the user to make a selection
|
||||
for i in xrange(0, len(servers)):
|
||||
for i in range(0, len(servers)):
|
||||
print('ID: %d' % i)
|
||||
print('%(ip)s:%(port)d, %(width)d*%(height)dpx\n' % servers[i])
|
||||
while not self.ipaddress:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue