How to work with graphic tablet lazarus / 39-Graphics ---------------------------------------------------------------------- Pierrot · 2013-04-03 16:28 Hi everyone! I have a specific question: How to get a data of pressure level of graphic tablet like wacom (actually Genius). Any help are welcome!!! ---------------------------------------------------------------------- felipemdc · 2013-04-03 18:19 Which operating system? ---------------------------------------------------------------------- Pierrot · 2013-04-04 04:14 win32 xp home ---------------------------------------------------------------------- seaton · 2013-04-08 02:44 Quote from: Pierrot on April 03, 2013, 06:28:45 pmHi everyone! I have a specific question: How to get a data of pressure level of graphic tablet like wacom (actually Genius). Any help are welcome!!! It looks like Wacom have a SDK, genius may have a similar thing, I'm guessing a wrapper may be required around some DLL's ---------------------------------------------------------------------- Pierrot · 2013-04-11 19:01 I found one old tablet component for Delphi (attached). But I can't convert it to lazarus package. Anybody help me please! ---------------------------------------------------------------------- BlueIcaro · 2013-04-11 19:15 Can tell us with problem do you have with the conversion? /BlueIcaro ---------------------------------------------------------------------- Pierrot · 2013-04-12 14:28 Conversion and compilation is now OK. Now I can't install it. Component can't be installed because it don't have the Register procedure. And because i can't convert all files in demo project. And else one. When I try to launch the sample there is an error: Error: identifier idents no member "Handle" In this string: Result := CallWindowProc(FOldWindowProc, Application.Handle, Msg,wParam,lParam); Especially Application.Handle In other places the same errors with Application.Handle What handle can I use? ---------------------------------------------------------------------- ideabrush · 2013-04-13 12:27 I was able to convert the comp to Lazarus but it uses TWin32WidgetSet, which is Win32 specific. Attached is the converted package for Lazarus. Hope it helps. ---------------------------------------------------------------------- Pierrot · 2013-04-13 18:37 Thanx! Installed. But don't work. Unknown error on exit External: SIGSEGV at adress 74656C Also Lazarus drop an error: Unknown Property Enabled. Strange ---------------------------------------------------------------------- ideabrush · 2013-06-30 23:58 I finally spent some time getting this to work again. Attached is a new version. The included demo is re-made as a Lazarus project. The call FWin32WidgetSet.Free is causing SIGSEGV exception. Currently, I commented it out to get rid of the error.  If someone can shed some light on how to properly use a TWin32WidgetSet, it'd be great. I am on Lazarus 1.0.10. The new demo works for me without Lazarus complaining. ---------------------------------------------------------------------- ideabrush · 2013-07-14 03:27 btw, does anybody know what is the right way of getting stylus input under Linux? From this page http://sourceforge.net/apps/mediawiki/linu xwacom/index.php?title=How_Wacom_tablets_work, I see the Linux Wacom driver would route the inputs to 'X input events". So, how do you get those input events in Lazarus? ---------------------------------------------------------------------- circular · 2013-07-18 12:31 Maybe it would possible to add tablet support to LazPaint, but I have no tablet so I can't test it myself. ---------------------------------------------------------------------- ideabrush · 2013-07-18 13:15 So you're the author of LazPaint.  Definitely!  Every modern image editor should support stylus input.  I can help you test LazPaint for stylus support. I have an intous 3 with a 6D art pen meaning that I can test all pressure, tilt and barrel rotation. BTW, I found the slanted layer thumbs in LazPaint interesting. Something I haven't seen in all other image editors. ---------------------------------------------------------------------- circular · 2013-07-19 14:38 Yes I am. The pressure should be interpreted as an alpha level, right? I am not sure about the difference between tilt and barrel rotation. Is it about rotation the pattern? I slanted the layers in order to get a 3d feel about the layer stack. ---------------------------------------------------------------------- ideabrush · 2013-07-19 14:55 Barrel rotation is the rotation about the stylus' own axis (i.e. like when you twist a pen). Pressure can be mapped to either alpha or brush size (or both). A good implementation probably should use some easing in and out when doing the mapping. For this, I strongly suggest you to get at least a cheap graphics tablet to experiment.  I like the slanted thumb idea. I remember Adobe once showed a demo with a stack of layers visualized in 3D to help people understand the stacking. ---------------------------------------------------------------------- Pierrot · 2013-08-06 14:31 Ow, I already forgot about that idea. Yes finally it works! Thanx a lot ideabrush!!! ---------------------------------------------------------------------- Flemming · 2014-08-25 18:29 This is just great ! I finally got my Trust 4200 up and running with Lazarus. Allmost gave it up a couple of years ago. ---------------------------------------------------------------------- lainz · 2015-01-26 17:09 Example working fine! ---------------------------------------------------------------------- cirus · 2015-03-25 00:37 I'm using Intuos with pressure and it's working fine. The solution is to translate the Delphi WinTab component but, of course, it's only for windows.