Hi, guys! I'm interested in writing my applications with FLTK2.So, I'd like to contribute some fixes and suggestions for FLTK2, if they will be relevant.
For this time, as my application should use graphical tablet widely, I've found few issues, which I'd like to fix and improve. I've prepared a patch, which does the following:
1. Fixes stylus tilt values, for Wacom tablets at Linux. (It's not FLTK bug, actually, and
it's still a question)2. Full tablet support mode (Lin & Win). Current FLTK events provides 1-pixel precision,
based on cursor moving. It appears to be sufficient for common purposes, but it limits tablet possibilities heavily.3. In Linux tilt has same direction as cursor position value. In Windows - Y axis is inversed.
Details:1. The bug appears only with linuxwacom driver 0.7.2 - 0.7.6 versions. They put into high bytes of axis_data[3] & axis_data[4] of XDeviceMotionEvent (which represent tilt values) additional
data about tablet serial number and Id. They use only low bytes to get tilt values - see the sample code: http://linuxwacom.sourceforge.net/index.php/quantumtest This compatibility problem has been discussed here: http://www.nabble.com/Tilt-not-working-in-gsumi-gimp-inkscape-for-Intuos2-A4-serial-td10455046.html#a10610063I've tried recent driver vesions - the problem disappeared with them. But, the reference code still uses this, and I found the same inside Qt sources. So, it's better to fix it, for Wacom it will work fine.
2. Currently we can respond to tablet input only when we get MOVE event - i.e. it's 1-pixel percise, and we can't catch pressure/tilt changes without moving. I've added TABLET_SPECIAL event, which is sent with every low-level tablet message (with my Wacom, it's 200 times per second). I've also added position variables in native tablet coordinates, so you can use all advantages of modern tablets (5080 dpi in my case). This features will be useful in some high-precision valuator widget, or in graphical/3D applications.
3. Y tilt in Windows was inversed: I think, we should have same behaviour at Win & Lin, so I fixed it.
One more remark: In Linux tilt value is between [-1, 1].In Win I've got something like [-0.6667, 0.6667]. It's because on Win we get angle as a tilt, but we don't consider maximum angle value. I haven't found yet, if it possible to get maximum value of tilt in Windows.
If you have thoughts about what must be corrected or what else may be done here - I'll correct the patch.
-- Alexander
tablet__2008-03-09.patch
Description: Binary data
_______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
