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

Applied pyflakes and pep8.

parent 7ea7d1e4
import vtk
from math import degrees
from threading import Thread
from objreader import read_obj
from touch import MultitouchServer
......
#!/usr/bin/env python
import pygame
import sys
import time
from touch import MultitouchServer, screen_size
from math import degrees, cos, sin
from events import Rotate
pygame.init()
FULLSCREEN = '-f' in sys.argv[1:]
......@@ -115,7 +112,8 @@ def update():
end_x = x
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
pygame.display.flip()
......
......@@ -7,9 +7,8 @@ from threading import Thread
from screen import screen_size
from tuio_server import TuioServer2D
from logger import Logger
from events import Event, DownEvent, UpEvent, MoveEvent, Tap, \
SingleTap, DoubleTap, Flick, Rotate, Pinch, \
Pan
from events import Event, DownEvent, UpEvent, MoveEvent, Tap, SingleTap, \
DoubleTap, Rotate, Pinch, Pan
# Heuristic constants
# TODO: Encapsulate screen resolution in distance heuristics
......@@ -251,7 +250,6 @@ class MultitouchServer(Logger):
# There are no touch points, move the centroid out of the screen
self.centroid = -1., -1.
def centroid_movement(self):
cx, cy = self.centroid
ocx, ocy = self.old_centroid
......
from ..tracker import GestureTracker, Gesture
from ..geometry import Positionable
from ..tracker import GestureTracker
from utils import PointGesture
......
import time
from threading import Thread
from ..tracker import GestureTracker, Gesture
from ..tracker import GestureTracker
from ..geometry import Positionable
from utils import PointGesture
......
......@@ -65,7 +65,7 @@ class CircularWindow(Window, CircularSurface):
"""
Circular window.
"""
def __init__(self, x, y, width, height, **kwargs):
def __init__(self, x, y, radius, **kwargs):
Window.__init__(self, **kwargs)
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