From bb1785396f50a433bee9a6d01d2e58caf87c0299 Mon Sep 17 00:00:00 2001 From: Jeremiah Darais Date: Sat, 16 Jan 2016 21:20:26 -0800 Subject: [PATCH] Bug 760737 - Brush angle jumps when tablet pen is tilted horizontally. Fix cursor rotation jump when tablet pen is tilted horizontally. This changes to the correct values for the special case of tilt_x == 0.0. Reviewer (Jehan)'s note: computing the convergence of the tilt function in the `else` block, when tilt_x approaches 0, tilt value indeed converges to 0.25 with tilt_y > 0 and 0.75 (or -0.25 which is the same) with tilt_y < 0. --- app/core/gimpdynamicsoutput.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/core/gimpdynamicsoutput.c b/app/core/gimpdynamicsoutput.c index 451e173327..9bb1eb3475 100644 --- a/app/core/gimpdynamicsoutput.c +++ b/app/core/gimpdynamicsoutput.c @@ -570,9 +570,9 @@ gimp_dynamics_output_get_angular_value (GimpDynamicsOutput *output, if (tilt_x == 0.0) { if (tilt_y >= 0.0) - tilt = 0.5; + tilt = 0.25; else if (tilt_y < 0.0) - tilt = 0.0; + tilt = 0.75; else tilt = -1.0; }