Commit 18683177 authored by Taddeüs Kroes's avatar Taddeüs Kroes

Applied pyflakes and pep8.

parent 7ea7d1e4
import vtk import vtk
from math import degrees from math import degrees
from threading import Thread
from objreader import read_obj from objreader import read_obj
from touch import MultitouchServer from touch import MultitouchServer
......
#!/usr/bin/env python #!/usr/bin/env python
import pygame import pygame
import sys import sys
import time
from touch import MultitouchServer, screen_size from touch import MultitouchServer, screen_size
from math import degrees, cos, sin from math import degrees, cos, sin
from events import Rotate
pygame.init() pygame.init()
FULLSCREEN = '-f' in sys.argv[1:] FULLSCREEN = '-f' in sys.argv[1:]
...@@ -115,7 +112,8 @@ def update(): ...@@ -115,7 +112,8 @@ def update():
end_x = x end_x = x
dtap[0] -= BEAM_INCREMENT dtap[0] -= BEAM_INCREMENT
pygame.draw.line(screen, BEAM_COLOR, (start_x, y), (end_x, y), BEAM_WIDTH) pygame.draw.line(screen, BEAM_COLOR, (start_x, y), (end_x, y),
BEAM_WIDTH)
# Update canvas # Update canvas
pygame.display.flip() pygame.display.flip()
......
...@@ -7,9 +7,8 @@ from threading import Thread ...@@ -7,9 +7,8 @@ from threading import Thread
from screen import screen_size from screen import screen_size
from tuio_server import TuioServer2D from tuio_server import TuioServer2D
from logger import Logger from logger import Logger
from events import Event, DownEvent, UpEvent, MoveEvent, Tap, \ from events import Event, DownEvent, UpEvent, MoveEvent, Tap, SingleTap, \
SingleTap, DoubleTap, Flick, Rotate, Pinch, \ DoubleTap, Rotate, Pinch, Pan
Pan
# Heuristic constants # Heuristic constants
# TODO: Encapsulate screen resolution in distance heuristics # TODO: Encapsulate screen resolution in distance heuristics
...@@ -251,7 +250,6 @@ class MultitouchServer(Logger): ...@@ -251,7 +250,6 @@ class MultitouchServer(Logger):
# There are no touch points, move the centroid out of the screen # There are no touch points, move the centroid out of the screen
self.centroid = -1., -1. self.centroid = -1., -1.
def centroid_movement(self): def centroid_movement(self):
cx, cy = self.centroid cx, cy = self.centroid
ocx, ocy = self.old_centroid ocx, ocy = self.old_centroid
......
from ..tracker import GestureTracker, Gesture from ..tracker import GestureTracker
from ..geometry import Positionable
from utils import PointGesture from utils import PointGesture
......
import time import time
from threading import Thread from threading import Thread
from ..tracker import GestureTracker, Gesture from ..tracker import GestureTracker
from ..geometry import Positionable from ..geometry import Positionable
from utils import PointGesture from utils import PointGesture
......
...@@ -65,7 +65,7 @@ class CircularWindow(Window, CircularSurface): ...@@ -65,7 +65,7 @@ class CircularWindow(Window, CircularSurface):
""" """
Circular window. Circular window.
""" """
def __init__(self, x, y, width, height, **kwargs): def __init__(self, x, y, radius, **kwargs):
Window.__init__(self, **kwargs) Window.__init__(self, **kwargs)
CircularSurface.__init__(self, x, y, radius) CircularSurface.__init__(self, x, y, radius)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment