Investigating the missing "pressure" when palette changes.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Looking into the source code, the relevant files seem to be as follows:
./ui/dialog/swatches.cpp - swatch changes
./widgets/toolbox.cpp - usepressure (see "Use the pressure of the input device")
./dyna-draw-context.cpp - (see "Influence of pressure on thickness")
Using gdb to attach to the inkscape process, and putting a breakpoint on
dyna-draw-context.cpp at the line 437 just after the line where the pressure
value is determined
double pressure_thick = (dc->usepressure ? dc->pressure : 1.0);
we see that normally (e.g. when using the "Auto" palette), the values are OK:
But after switching to the "Inkscape default" palette and back again
to the "Auto" palette, the pressure_thick is "stuck" at 1 all the time,
because even though dc->usepressure is TRUE, the dc->pressure value
is "stuck" at 1. Why?
Investigating the missing "pressure" when palette changes. ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~
~~~~~~~
Looking into the source code, the relevant files seem to be as follows:
./ui/dialog/ swatches. cpp - swatch changes toolbox. cpp - usepressure (see "Use the pressure of the input device") draw-context. cpp - (see "Influence of pressure on thickness")
./widgets/
./dyna-
Using gdb to attach to the inkscape process, and putting a breakpoint on context. cpp at the line 437 just after the line where the pressure
dyna-draw-
value is determined
double pressure_thick = (dc->usepressure ? dc->pressure : 1.0);
we see that normally (e.g. when using the "Auto" palette), the values are OK:
Breakpoint 1, sp_dyna_draw_brush (event_ context= 0x3fbc120, event=0x3ce61c0) src/dyna- draw-context. cpp:438 CONTEXT( dc)->desktop- >d2w(brush) ;
at ../../inkscape/
438 Geom::Point brush_w = SP_EVENT_
(gdb) print pressure_thick
$3 = 0.10400390625
(gdb) cont
Continuing.
But after switching to the "Inkscape default" palette and back again
to the "Auto" palette, the pressure_thick is "stuck" at 1 all the time,
because even though dc->usepressure is TRUE, the dc->pressure value
is "stuck" at 1. Why?
Breakpoint 1, sp_dyna_draw_brush (event_ context= 0x3fbc120, event=0x41c5b40) src/dyna- draw-context. cpp:438 CONTEXT( dc)->desktop- >d2w(brush) ;
at ../../inkscape/
438 Geom::Point brush_w = SP_EVENT_
(gdb) print pressure_thick
$17 = 1
(gdb) cont
Continuing.