Follow-up Comment #2, bug #18570 (project mypaint):
Below is a patch that makes the filter strength depend in pressure.
Soft pressure = no filtering, hard pressure = normal filtering. As the
filtering decreases (at the end of the stroke), the line catches up with the
cursor (which may be a bit unexpected if you were tracking the line with your
eye instead of tracking the cursor).
I think we should try to make this a normal mapping (eg. filter time may
change with any input).
diff --git a/brushlib/brush.hpp b/brushlib/brush.hpp
index d10c397..2c2d20f 100644
--- a/brushlib/brush.hpp
+++ b/brushlib/brush.hpp
@@ -624,7 +624,10 @@ public:
y += rand_gauss (rng) * settings[BRUSH_TRACKING_NOISE]->base_value *
base_radius;
}
- float fac = 1.0 - exp_decay
(settings[BRUSH_SLOW_TRACKING]->base_value, 100.0*dtime);
+ float filter = settings[BRUSH_SLOW_TRACKING]->base_value;
+ //if (pressure < 0.5) filter = 0.0;
+ filter *= pressure;
+ float fac = 1.0 - exp_decay (filter, 100.0*dtime);
x = states[STATE_X] + (x - states[STATE_X]) * fac;
y = states[STATE_Y] + (y - states[STATE_Y]) * fac;
}
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?18570>
_______________________________________________
Nachricht geschickt von/durch Gna!
http://gna.org/
_______________________________________________
Mypaint-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/mypaint-bugs