[Gambas-user] Reading pen pressure from wacom tablets

Ricardo Díaz Martín oceanosoftlapalma at ...626...
Wed Aug 15 20:09:09 CEST 2012


Hi,

After some days waiting for the delivery I got new wacom bamboo pen.

I was doing some test using the attached project and I got some crash
(project and IDE).

I you move the tablet pen to the screen limits then you got a signal 22 and
a segment fault. You got it when you are running the app and when you are
in the IDE too. When the IDE crash you can see 'core' was generated (but I
don't know where is it to attach to this mail).

Other issue is Pointer.Rotation got the same value every time -14.0625

XTilt and YTilt values are always 0 (maybe this wacom tablet doesn't
support this...)

Type and Pressure work fine.

And interesting thing is when tablet is being registered, PositionX and
PositionX are float and when mouse is registered are integers values.

The gdb bt for the project was:
#0  QBasicAtomicInt::ref (this=0x3000002a2) at
/usr/include/qt4/QtCore/qatomic_x86_64.h:121
#1  0x00007ffff5da1132 in QString (other=..., this=0x7fffffffcd40) at
/usr/include/qt4/QtCore/qstring.h:726
#2  text (this=0x7fffffffd2e0) at /usr/include/qt4/QtGui/qevent.h:236
#3  CWidget::eventFilter (this=0x7ffff6008290, widget=0x9586d0,
event=0x7fffffffd2e0) at CWidget.cpp:2819
#4  0x00007ffff45f1f6c in
QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*,
QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007ffff4b14806 in QApplicationPrivate::notify_helper(QObject*,
QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#6  0x00007ffff4b19afc in QApplication::notify(QObject*, QEvent*) () from
/usr/lib/x86_64-linux-gnu/libQtGui.so.4
#7  0x00007ffff45f1e9c in QCoreApplication::notifyInternal(QObject*,
QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007ffff4b83643 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#9  0x00007ffff4b934fe in QApplication::x11ProcessEvent(_XEvent*) () from
/usr/lib/x86_64-linux-gnu/libQtGui.so.4
#10 0x00007ffff4bbd0d2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#11 0x00007ffff2e80d53 in g_main_context_dispatch () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007ffff2e810a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007ffff2e81164 in g_main_context_iteration () from
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff46213bf in
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
() from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#15 0x00007ffff4bbcd5e in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#16 0x00007ffff45f0c82 in
QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib/x86_64-linux-gnu/libQtCore.so.4
#17 0x00007ffff45f0ed7 in
QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from
/usr/lib/x86_64-linux-gnu/libQtCore.so.4
#18 0x00007ffff45f5f67 in QCoreApplication::exec() () from
/usr/lib/x86_64-linux-gnu/libQtCore.so.4
#19 0x00007ffff5d9a949 in hook_loop () at main.cpp:777
#20 0x00000000004046d8 in main (argc=1, argv=0x7fffffffe138) at gbx.c:417

The system information:

[System]

OperatingSystem=Linux

Kernel=3.2.0-27-generic

Architecture=x86_64

Memory=5965424 kB

DistributionVendor=Ubuntu

DistributionRelease="Ubuntu 12.04 LTS"

Desktop=Gnome


[Gambas 3]

Version=3.2.90

Path=/usr/local/bin/gbx3


[Libraries]

Qt4=libQtCore.so.4.8.1

GTK+=libgtk-x11-2.0.so.0.2400.10


Regards,

Ricardo Díaz

2012/8/10 Ricardo Díaz Martín <oceanosoftlapalma at ...626...>

> Thanks Benoit,
>
> I'm going directly to the shop to buy a wacom tablet to test it.
>
> Hope to try it this weekend.
>
> I'll keep you informed.
>
> Regards,
>
>
> 2012/8/10 Benoît Minisini <gambas at ...1...>
>
>> 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
>>
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WacomTest-0.0.2.tar.gz
Type: application/x-gzip
Size: 7886 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20120815/540fcc1a/attachment.bin>


More information about the User mailing list