Re: [AD] pressure support

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 20 Feb 2010, at 18:32 , Peter Wang wrote:
> You should update event emitting code for other ports as well.
> What should pressure-insensitive devices report?

Unfortunately I have no idea how they'd work (that's probably the easy part to figure out) and no means of testing them. Should be marked as something that would need to be done.
At least on OS X, a normal mouse reports "1" if the button is down, "0" if it isn't. Makes sense to me.

> What events are generated when you touch the tablet, then increase the
> pressure, decrease the pressure, then release?  Multiple
> MOUSE_BUTTON_DOWN events in a row, with varying pressures, followed by a
> single MOUSE_BUTTON_UP?

I guess. Although on OS X, the pressure is also reported when a movement event is generated.
Someone with a stylus (Trent?) should probably test this.

> I think a single pressure field is not enough; some tablets support
> tilt-x, tilt-y as well.  And some support multiple styluses, too.
> We probably need to treat pressure and tilt as additional axes.

Maybe. In a sense having a float for pressure sortof does this already, and it probably works better that way than as an analogue of the z or w parameters.
The question of multiple styluses is not so straightforward, since we have no API to deal with multiple pointing devices... for the event system a simple workaround is to include an identifier for the device that generated the event (if known), but for the state-based API this is not so straightforward.

Evert



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/