[GrafX2] #155: Basic digitizer support (stylus 'eraser' support)

8 views
Skip to first unread message

GrafX2

unread,
Feb 5, 2020, 8:05:13 AM2/5/20
to gra...@googlegroups.com
#155: Basic digitizer support (stylus 'eraser' support)
---------------------------+------------------------
Reporter: wyattfward@… | Owner: pulkomandy
Type: enhancement | Status: new
Priority: minor | Milestone: 2.8
Component: GrafX2 | Version: 2.6
Keywords: tablet stylus |
---------------------------+------------------------
I have an older thinkpad tablet convertible (X201 Tablet) with a wacom
digitizer built in, running Debian Linux. The stylus has a back side that
acts as an eraser, which can be differentiated from the normal tip by
software. It'd be great if grafx2 could treat the eraser end like a right-
click and draw the secondary colour with it.

On my machine, at least, using a program called sdl-jstest, I can see that
SDL2 can differentiate between the eraser and the normal tip. This is done
by button 0 activating when the pen tip is detected in proximity of the
screen, and button 1 activating when the eraser is close. The actual
"touch-down" (seen as a tap or a "click" event) is indicated by mouse
button 2.

More simply put, in pseudo-C:
{{{
if(button2)
{
if(button0) /* pen tip */
{
// handle pen tip
}
else if(button1) /* pen eraser */
{
// handle eraser
}
}
}}}

There may be a better way to do this that doesn't depend on joystick
bindings, but I don't know. Probably this should really be in a switch-
case.

Thanks for the software, by the way. I'm planning to upgrade my ECS-modded
Amiga 500 with a kickstart 3.x ROM (currently I'm just on 2.04) so I can
try using it there, too. The high degree of portability (especially for
this day and age of Wintel dominance) is hugely appreciated (even if I
wish it also supported WB2.1).

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/155>
GrafX2 <http://pulkomandy.tk/projects/GrafX2>
The ultimate 256-color painting program

GrafX2

unread,
Feb 5, 2020, 8:12:41 AM2/5/20
to gra...@googlegroups.com
#155: Basic digitizer support (stylus 'eraser' support)
---------------------------+---------------------------
Reporter: wyattfward@… | Owner: pulkomandy
Type: enhancement | Status: new
Priority: minor | Milestone: 2.8
Component: GrafX2 | Version: 2.6
Resolution: | Keywords: tablet stylus
---------------------------+---------------------------

Comment (by wyattfward@…):

Doing [mouse button] && [joystick button] might be even better, if there's
a way to select a joystick to use, since the stylus is already making a
mouse click event occur.

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/155#comment:1>

GrafX2

unread,
Nov 11, 2020, 10:01:15 AM11/11/20
to gra...@googlegroups.com
#155: Basic digitizer support (stylus 'eraser' support)
---------------------------+---------------------------
Reporter: wyattfward@… | Owner: pulkomandy
Type: enhancement | Status: new
Priority: minor | Milestone: 2.8
Component: GrafX2 | Version: 2.6
Resolution: | Keywords: tablet stylus
---------------------------+---------------------------

Comment (by Thomas Bernard):

you mean the pen tip/eraser selection is done with Joystick button ?

or is it also with mouse button ?
you could provide log of sdl-jstest

--
Ticket URL: <http://pulkomandy.tk/projects/GrafX2/ticket/155#comment:2>
Reply all
Reply to author
Forward
0 new messages