mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-03 11:10:29 +01:00
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>
This commit is contained in:
parent
28f75d9f9d
commit
97cec18d27
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue