Touch input contact size
I noticed that it has been really helpful to determine the contact size of a touch input by using PointerEvent.width/height to improve accuracy.
I'm not sure about other platforms, but a quick look at the Windows API revealed POINTER_TOUCH_INFO.rcContact.
In any case, like force, this could be wrapped in an Option.
Wayland should have it as well https://wayland.app/protocols/wayland#wl_touch:event:shape
The thing is that device may not support reporting the shape of the input, so I'd assume it must be an Option.
Also, it's an ellipse and not a rectangle on Wayland, so it's a bit weird here.
After some digging into this lately, all these APIs are meant to represent ellipsis.
- Web should move all
WindowEvent::Touchto use touch events instead of pointer events. These expose much richer information (Touch.radiusX/YandTouch.rotationAngle) and align much more with other backends. They also clearly state that the contact points are ellipsis. - Wayland has
wl_touch::shapeandwl_touch::orientationdescribing the ellipsis. - Windows has
POINTER_TOUCH_INFO.rcContactandPOINTER_TOUCH_INFO.orientation, which are supposed to represent an ellipsis as well, but is just not documented as such. Chromium treats this information as an ellipsis as well.
Just stumbled on Navigator.maxTouchPoints as well, didn't dig into cross-platform APIs yet.