summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-06-27 11:33:49 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-06-27 14:52:26 +1000
commit97cec18d2755b287d1f65cae88138b19cc5fff4e (patch)
treebc94635ecfb8b02fae7c0974218778322531bbb5 /tools
parent28f75d9f9debf4fcc78029e2ddca5c7feac06571 (diff)
tools: reduce tilt scale to 1/30 of the input value
The x/y tilt angle comes in as degrees, so our scale could be as large as 90x the original size. Scale to something more sensible. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/event-gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/event-gui.c b/tools/event-gui.c
index 605f00a..b67ca45 100644
--- a/tools/event-gui.c
+++ b/tools/event-gui.c
@@ -272,7 +272,7 @@ draw_tablet(struct window *w, cairo_t *cr)
cairo_set_source_rgb(cr, .8, .8, .2);
cairo_translate(cr, w->tool.x, w->tool.y);
- cairo_scale(cr, 1.0 + w->tool.tilt_x, 1.0 + w->tool.tilt_y);
+ cairo_scale(cr, 1.0 + w->tool.tilt_x/30.0, 1.0 + w->tool.tilt_y/30.0);
cairo_arc(cr, 0, 0,
1 + 10 * max(w->tool.pressure, w->tool.distance),
0, 2 * M_PI);