[PATCH v3 wayland-protocols] Add the tablet protocol

Bill Spitzak spitzak at gmail.com
Tue Feb 2 21:12:46 UTC 2016

On Mon, Feb 1, 2016 at 6:38 PM, Jason Gerecke <killertofu at gmail.com> wrote:

> Ultimately, the tilt information is almost universally used by
> applications to set brush orientation. To do that, you have to use
> some trig to transform the X and Y tilt values into something like
> Alt-Az form. Tilt on a scale of 0-1 is fine for calculating the
> azimuth, but you can't calculate the altitude angle without knowing
> what 100% physically corresponds to. You can guess (e.g. assume it
> corresponds to the reasonable physical limit of +-90 degrees), get a
> horribly wrong answer (since the hardware limit is actually +-64
> degrees), and then either ignore the discrepancy or fudge other bits
> of the brush engine to not do nonsensical things. Actually, to be
> fair, that's exactly how GIMP does things right now :P

I think a lot of software treats the tilt information as actually the
position of a point some distance up the pen relative to the tip. I would
guess the hardware produces this directly (by reusing the proximity
hardware for a different point higher up in the pen). To get a projection
of the pen onto the tablet surface, these values can be fed to atan2.

If they were actual angles, they must be the angle of the projection of the
pen onto the two vertical planes of the x and y axis. This is really noisy
when the pen is near one of the axis, and I would think the hardware/driver
could not produce this except by calculating atan2 of a more linear value.

Therefore I would be very suspicious of any claim that the values being
produced are angles. The current api reporting them as normalized values
seems better.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20160202/0c7de878/attachment.html>

More information about the wayland-devel mailing list