Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
multitouch
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
multitouch
Commits
48fbec2e
Commit
48fbec2e
authored
Jun 04, 2012
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applied pep8.
parent
31a4bae6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
tests/draw.py
tests/draw.py
+4
-1
tests/parse_arguments.py
tests/parse_arguments.py
+4
-4
tests/tap.py
tests/tap.py
+2
-0
No files found.
tests/draw.py
View file @
48fbec2e
...
...
@@ -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
)
...
...
tests/parse_arguments.py
View file @
48fbec2e
...
...
@@ -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
...
...
tests/tap.py
View file @
48fbec2e
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment