Commit 48fbec2e authored by Taddeüs Kroes's avatar Taddeüs Kroes

Applied pep8.

parent 31a4bae6
......@@ -118,7 +118,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()
......@@ -134,10 +135,12 @@ def rotate(gesture):
global angle
angle += gesture.get_angle()
def pinch(gesture):
global scale
scale = min(scale * gesture.get_scale(), MAX_SCALE)
transform = TransformationTracker(win)
transform.rotate(rotate)
transform.pinch(pinch)
......
......@@ -6,14 +6,14 @@ from src.logger import Logger
# Parse arguments
def create_parser():
parser = argparse.ArgumentParser(description='Basic test program for usage '
'of multi-touch API.')
parser = argparse.ArgumentParser(description='Basic test program for '
'usage of multi-touch API.')
parser.add_argument('--log', metavar='LOG_LEVEL', default='INFO',
choices=['DEBUG', 'INFO', 'WARNING'],
help='set log level (defaults to INFO)')
parser.add_argument('--logfile', metavar='FILENAME',
help='filename for the log file (the log is printed to '
'stdout by default)')
help='filename for the log file (the log is printed '
'to stdout by default)')
return parser
......
......@@ -18,9 +18,11 @@ win = FullscreenWindow(server=server)
# Add tracker and handlers
tracker = TapTracker(win)
def handler(gesture):
pass
tracker.tap(handler)
tracker.single_tap(handler)
tracker.double_tap(handler)
......
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