3

How can I add support for tablet drawing to my projects? What I mean is that most pen tablets have the functionality of acting as "normal" pointing devices when held regularly, but when the pen is flipped, it acts as an eraser (OneNote works this way, for example).

How can I detect which side of the pen is being used?

menjaraz
  • 7,551
  • 4
  • 41
  • 81
Martin Melka
  • 7,177
  • 16
  • 79
  • 138
  • 1
    I am making this for some people who use Wacom Bamboo tablets - http://www.wacom.eu/index2.asp?pid=9240&lang=en. I didn't think that it was brand-specific, sorry – Martin Melka Feb 10 '12 at 09:18
  • @Magicmaster: Waow! 3rd generation, with new wireless capabilities, improved multi-touch functionality and pen technology in a single device. – menjaraz Feb 10 '12 at 17:09
  • Wacom Bamboo Pen&Touch series 1 and 2. – Martin Melka Feb 10 '12 at 17:17

2 Answers2

4

I would follow the native API of your tablet. Your tablet's vendor has very well described SDK including several examples (in Visual C++).

What you are specifically looking for is the eraser detection

TLama
  • 75,147
  • 17
  • 214
  • 392
  • +1, I personally recommend using the vendor's SDK if it's available. Hopefully they also release Delphi SDK. – menjaraz Feb 11 '12 at 04:19
  • 1
    I have deleted my answer, it's speculative and misleading. I managed to harness a stock G-Pen 4500 tablet with Delphi's standard gesture when Delphi 2010 was released (It doesn't even take a driver to work). Thanks to your notice and references you provided and delving into related [linux resource](http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=How_Wacom_tablets_work) I realize that Wacom Bamboo Pen&Touch series 1 and 2 are completely very different beasts. How can I tell if I don't even have at hand one of them to harness. Thank you again for your guidance. – menjaraz Feb 11 '12 at 04:57
  • @Magicmaster: Please share you findings on harnessing those new generation tablets using Delphi. thanks in advance. – menjaraz Feb 12 '12 at 08:31
0

Dealing with WinTab is easy enough if all you want is to detect device type. However it can get a lot more confusing if you want to process absolute positions, pen orientation and pressure. There's a good C++ lib for dealing with this:

http://www.billbaxter.com/projects/bbtablet/index.html

Even if you don't want to go through the effort of wrapping it to use it directly, you can learn from the source if you get stuck.

3yE
  • 508
  • 3
  • 12