Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
multitouch
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
multitouch
Commits
48fbec2e
Commit
48fbec2e
authored
13 years ago
by
Taddeüs Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Applied pep8.
parent
31a4bae6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/draw.py
+4
-1
4 additions, 1 deletion
tests/draw.py
tests/parse_arguments.py
+4
-4
4 additions, 4 deletions
tests/parse_arguments.py
tests/tap.py
+2
-0
2 additions, 0 deletions
tests/tap.py
with
10 additions
and
5 deletions
tests/draw.py
+
4
−
1
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
)
...
...
This diff is collapsed.
Click to expand it.
tests/parse_arguments.py
+
4
−
4
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
...
...
This diff is collapsed.
Click to expand it.
tests/tap.py
+
2
−
0
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment