Patcher zoom + screentoworld message to jit.gl.sketch: scaling problem?

Jun 14, 2011 at 12:59am

Patcher zoom + screentoworld message to jit.gl.sketch: scaling problem?

After zooming my patcher, “screentoworld” messages to gl.sketch produce scaled results, even though the mouse reports from the pwindow are no different.

jit.gl.sketch drawing commands are rendered the same regardless of patcher zoomfactor, so an object at “0,0″ will always be drawn at the center, even when we are zoomed in. But screentoworld queries to gl.sketch report “0,0″ at different places depending on patcher zoom and window scroll.

If I multiply the pwindow mouse coordinates by the patcher zoomfactor before delivering them as a screentoworld query then everything is fine.

Sounds convoluted, but this patch shows the behavior. I don’t really understand why it works. Do you?

– Pasted Max Patch, click to expand. –
#57595

You must be logged in to reply to this topic.