[Gambas-user] Reading pen pressure from wacom tablets
Ricardo Díaz Martín
os.ricardo.diaz at ...626...
Sat Aug 18 20:44:59 CEST 2012
2012/8/17 Benoît Minisini <gambas at ...1...>
> Le 17/08/2012 12:24, Ricardo Díaz Martín a écrit :
> > Ok, so when you define special events for tablets and make PointerX and
> > PointerY relative to the control I'll change the project.
> >
> > Regards,
> >
>
> Hi again,
>
> 1) In revision #5051, I have updated the Tablet event management:
>
> - Finally I decided to keep the DrawingArea tablet property. But I
> renamed it 'Tablet' instead of 'UseTablet'.
>
> - So there is no special events. Just MouseDown, MouseUp and MouseMove.
>
> - Pointer absolute coordinates are now returned in Pointer.ScreenX and
> Pointer.ScreenY properties.
>
> - Pointer.X and Pointer.Y return the pointer coordinates relative to the
> control receiving the events.
>
> 2) I have modified gb.gtk so that it enables all detected XInput pointer
> devices (they are all disabled by default apparently). Does it change
> something when you use your example with gb.gtk?
>
> I have a strange idea anyway if it does not work: using the GIMP device
> configuration file to configure the devices! But the user will have to
> install GIMP and configure XInput devices from it. A bit weird, isn't it?
>
>
Sorry but still the same issue. When you set the gb.gtk component the
pointer type is always 0 (it means mouse detected). I don't know how you
can configure XInput in gtk using the GIMP configuration file at runtime.
> 3) I'd like to put your project in the Gambas examples, but it has a few
> problems. Can you fix them?
>
> - Controls should be made private to the form.
>
I usually set to public to use Me.
> - It is useless and slower to write 'Me.MyControl' to access MyControl
> from its form. Just write 'MyControl'.
>
>
I'm faster writing code when I use Me. Why? Because I usually have to make
forms with a lot of controls (most of them textboxes) filled with database
values. For this reason I have to use long identifiers for controls names.
So when you are writing the code it's really easy to write Me. + the first
part of the control name I want to use and I can easy select it from code
completion. I know you can start writing the name of control for code
completion but most of times I didn't remember the beginning of control's
name. But it's only my point of view.... or maybe is a long time ugly habit
I got! ;-) Anyway I did form controls private and delete all the Me.
> - Can you use the Paint class instead of the Draw class? The Paint class
> can draw things anti-aliased at floating-point coordinates.
>
>
I attach new version using Paint class but I can't see any difference in
the final draw. Must it be a clear difference using Paint class instead
Draw?
Thanks in advance.
>
> --
> 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: TabletTest-0.0.9.tar.gz
Type: application/x-gzip
Size: 19576 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20120818/ee5ce032/attachment.bin>
More information about the User
mailing list