Eraser hitbox calculates collision based on maximum base thickness, ignoring pen pressure
Describe the bug
There is a mismatch between the visual rendering of a stroke and the eraser's collision detection (hitbox). When drawing with a pressure-sensitive pen, the eraser deletes strokes based on the brush's maximum configured thickness, completely ignoring the actual visual thickness of the stroke modified by low pen pressure.
As a result, the eraser deletes light-pressure strokes from far away, even when the red eraser cursor is nowhere near the visible ink.
To Reproduce
Steps to reproduce the behavior:
Set the pen tool to a high base thickness (e.g., 50) and enable pressure sensitivity.
Set the brush style to solid.
Draw multiple dots or strokes using maximum, medium, and very low pen pressure.
Try to erase the strokes slowly.
The stroke drawn with maximum pressure is erased correctly (only when the red eraser cursor touches the ink).
The stroke drawn with low pressure (visually thin) is erased prematurely, long before the red eraser cursor touches the visible ink.
Expected behavior
The eraser hitbox should calculate the intersection using the actual stroke thickness at that specific point (pressure-adjusted thickness), not the brush's maximum base thickness. The eraser should only delete the stroke when the cursor touches the visible ink.
Console Output
gustavo@fedora:~$ flatpak --env=RUST_LOG=rnote=debug --env=RUST_BACKTRACE=1 run com.github.flxzt.rnote
0.000075568s DEBUG rnote: .. tracing subscriber initialized.
23.051848882s DEBUG rnote_engine::store: State has not changed, no need to record.
(rnote:2): Gtk-CRITICAL **: 08:31:07.495: The layout manager of type GtkBoxLayout 0x56202f23a870 does not create GtkLayoutChild instances
Desktop:
OS: Fedora 44
App Version: Rnote 0.14.2
Installation Source: Flatpak
Desktop Environment: Gnome 50.4
Display Server: wayland
Input Source: External Graphics Tablet, Wacom CTL672
Source: flxzt/rnote