libsdl-org / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
9.52k stars 1.77k forks source link

Coordinate space of SDL_PenMotionEvent is unclear #10863

Open Susko3 opened 1 week ago

Susko3 commented 1 week ago

The docs mention that x and y members of SDL_PenMotionEvent correspond to the position of the pen on the tablet. But there is no way for an application to query the size of this 'tablet' -- no way to map them correctly to the game window.

I think it would make sense that these coordinates are in SDL_Window space.

Also, SDL_PEN_AXIS_XTILT and SDL_PEN_AXIS_YTILT mention a non-existent SDL_PenCapabilityInfo function.

icculus commented 1 week ago

Oh, yeah, I think I intended to normalize these coordinates, like touch events, and it turned out it wasn't possible. I'll double-check this.

Susko3 commented 6 days ago

You should probably also update SDL_ConvertEventToRenderCoordinates to handle pen events when you figure out the coordinate space.