Sub-pixel positioning

Adrian Page adrian at
Fri Mar 19 17:24:03 CET 2004

On Thursday 18 March 2004 1:20 pm, Boudewijn Rempt wrote:
> > I've managed to get it to work in krita now but something odd is going on
> > as it's impossible to draw straight lines (with the brush tool). They're
> > always rough and jagged, as though my hand was shaking badly. The strange
> > thing is that even if I put a ruler on the pad and draw along the edge of
> > that, it's still rough and jagged. Haven't investigated why yet, but it
> > works fine in the gimp.
> Strange -- I never had that problem when my graphire was still working --
> but that's a lot of hacking on KisPainter ago. Qt has a simple example for
> tabletEvent -- does that show the same thing?

I've fixed it now. It turned out to be a 2.6 kernel change that meant events 
were getting sent twice. It worked in gimp because that reads the tablet's 
position directly, whereas Qt reads the 'core pointer''s position, which was 
affected by the extra events, related to my ps/2 mouse I think.

Anyway, during this process I did manage to learn some things about XInput and 
how we could handle the tablet events in the event filter which would allow 
us to use the full resolution of the tablet coordinates. That would allow 
sub-pixel positioning even when the image is viewed at 1:1. We could also use 
the full pressure resolution rather than Qt's fixed 256 levels.


More information about the kimageshop mailing list