[AD] pressure support

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


On 2010-02-20, eglebbk@xxxxxxxxxx <eglebbk@xxxxxxxxxx> wrote:
> Revision: 12954
>           http://alleg.svn.sourceforge.net/alleg/?rev=12954&view=rev
> Author:   eglebbk
> Date:     2010-02-20 16:50:23 +0000 (Sat, 20 Feb 2010)
> 
> Log Message:
> -----------
> Added "pressure" field to the mouse event struct and mouse state, which can
> be used with pressure sensitive pointing devices (ie, tablets/stylus).
> Implemented on OS X (although I don't have a stylus, so I only ever see the
> values 0 and 1).

You should update event emitting code for other ports as well.
What should pressure-insensitive devices report?

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 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.

Peter




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