[Burichan] [Futaba] [Nice] [Pony]  -  [WT]  [Home] [Manage]

[Return] [Entire Thread] [Last 50 posts] [Last 100 posts]
Posting mode: Reply
Name (optional)
Email (optional, will be displayed)
Subject    (optional, usually best left blank)
Message
File []
Embed (advanced)   Help
Password  (for deleting posts, automatically generated)
  • How to format text
  • Supported file types are: AVI, DAT, GIF, JPG, MP3, MP4, PDF, PNG, RAR, SWF, WEBM, ZIP
  • Maximum file size allowed is 200000 KB.
  • Images greater than 250x250 pixels will be thumbnailed.

File 129151848266.png - (1.40KB , 83x83 , cjopazeace.png )
1236 No. 1236 ID: 2563d4

Because oC is dicks.
>>
No. 1237 ID: 2563d4
File cjopaze-tablet-test.rar - (1.68MB )
1237

This is not a drawing application.

It should however be a tech test which draws a crappy dark blue dot-line over the window as you move the mouse, a cyan one while the mouse button is down, and switch instead to a red pressure-sensitive line if you use a stylus. It'll create a file called stderr.txt in its directory which will contain a little info about the tablet(s) it's detected.

I'm particularly interested in how it copes with non-Wacom tablets or multi-monitor setups. (I still need to test things like tablet PC rotation, too.) In theory I'm using standard, base Wintab functionality, and because I use the system mapping in theory it should read the stylus position the same way you've got it mapped to control the mouse pointer outside of graphics programs. In theory.

(Resizing the window will clear it to grey. So don't do that unless you like grey.)
>>
No. 1263 ID: 2563d4
File cjopaze-tablet-test2.rar - (2.11MB )
1263

More debugging spew for those with troublesome tablets. While the stylus is in range (the mouse has not changed), you'll get a couple of debug lines at the top which are, in order:
cursor number (should normally be 1, eraser may be 2); window-relative X and Y co-ordinates (these are what I'm computing to draw the lines---unless you've resized, they should therefore be 0,0 top-left to 639,479 bottom-right within the bounds of the window); percentage pressure; and button information (likely 1 for tip, 2 for side); and if the press is believed to be an eraser (technically checking to see if Wintab says the stylus is "inverted").
On the second line is the RAW X and Y co-ordinates I'm getting from Wintab, which are screen-relative and upside-down. These should go from 0,0 on the bottom-left of your desktop to your screen resolution at the top-right.

(The mapping between these is partially flipping the Y co-ordinate based on the size of the area Wintab tells me it covers, and mostly asking Windows itself to convert screen-relative co-ordinates to window-relative ones.)

And unfortunately I can confirm that it doesn't keep up with display rotation, because the Wintab context keeps on mapping things to the old resolution. Must be a change event to listen to somewhere.
>>
No. 1264 ID: 2563d4
File cjopaze-tablet-test3.rar - (23.27KB )
1264

Tiny change to dump the Wintab context ouput extent to stderr. EXE only; needs all the supporting crap from test2 in its directory.
>>
No. 1265 ID: 2563d4
File cjopaze-tablet-test4.rar - (23.27KB )
1265

Switching from ScreenToClient to MapWindowPoints. Isn't Win32 fun? Lone EXE again.
>>
No. 1266 ID: 2563d4
File cjopaze-tablet-test5.rar - (23.79KB )
1266

This may fix it, or make it much worse.
More importantly, look in your stderr.txt for a "Wintab metrics" line. If your "Out" has a non-zero offset (it's not "+0x0"), that's interesting. The Windows mouse cursor co-ordinate is also displayed; if you can find out where your 0,0 is, and if it seems to be offset from your primary monitor in some way related to the Wintab Out offset, that'd be helpful.
>>
No. 1268 ID: 2563d4
File cjopaze-tablet-test6.rar - (23.86KB )
1268

Variation of the offset correction which I think makes more sense. There is one extra piece of debugging; I'll restate this since it's getting confusing:
RAW is what the Wintab event contains. This is documented as being 0,0, Y-up from the bottom-left; apparently of the whole virtual desktop area.
MOUSE is what Windows' mouse GetCursorPos() returns at roughly the time of the event (not a good thing to rely on since it can get behind). The Windows co-ordinate system is 0,0, Y-down from the top-left of the primary monitor.
MTRAN is MOUSE translated via ScreenToClient() and should be from 0,0, Y-down, from the top-left of the window area.
cur is RAW after origin correction, Y invert, and ScreenToClient(). It's what's used to draw the dots and should match MTRANS.
>>
No. 1269 ID: 2563d4
File cjopaze-tablet-test7.rar - (23.75KB )
1269

Version that also dumps the sensitivity values for Dylan.
>>
No. 1350 ID: 2563d4

https://sourceforge.net/projects/cjopazedraw/
[Return] [Entire Thread] [Last 50 posts] [Last 100 posts]

Delete post []
Password  
Report post
Reason