[Gambas-user] Reading pen pressure from wacom tablets
    Benoît Minisini 
    gambas at ...1...
       
    Fri Aug 10 01:46:20 CEST 2012
    
    
  
Le 25/07/2012 08:15, Ricardo Díaz Martín a écrit :
> Hi,
>
> I wonder if there is some way to read the pen pressure from wacom like
> tablets in gambas. I have read some documentations for java and looks like
> wacon tablets works like a normal mouse with some extra properties you can
> get: pressure, rubber mode, etc...
>
> I know there is qt4 support for this but I have not experience with qt4. I
> can do it in java but of course I prefer gambas3 :-p
>
> Regards,
> Ricardo Díaz
Hi,
Since revision #5024, you can catch tablet events with Gambas. But I 
can't test it, so I need you now!
At the moment, it works like that:
1) Only DrawingArea can catch tablet events. You need to set its new 
'UseTablet' property to TRUE.
2) Then each tablet event will raise a MousePress, MouseMove or 
MouseRelease event.
3) The properties of the tablet event are stored inside the new 
'Pointer' static class.
4) The 'Pointer' class has the following properties:
- X : the floating point X global coordinate.
- Y : the floating point Y global coordinate.
- XTilt: the X tilt.
- YTilt: the Y tilt.
- Pressure: the pressure.
- Rotation: the rotation.
- Type: the pointer type, which be either Pointer.Mouse, Pointer.Pen, 
Pointer.Eraser or Pointer.Cursor.
I have no idea if it works. Maybe I will buy a Wacom tablet, I don't 
know. But now I'm waiting for your returns!
Thanks in advance.
Regards,
-- 
Benoît Minisini
    
    
More information about the User
mailing list