get pen location in jit.qt.sketch

May 16, 2006 at 12:41pm

get pen location in jit.qt.sketch

Greetings,

I’ve been trying to figure out how to query the jit.qt.sketch object
to give me its current drawing position, something along the lines of
the “getpenloc” message one would send to an lcd. If it’s in the
docs its buried deep. Does anyone know the answer to this off the
top of their heads?

Thanks,

M

#25995
May 16, 2006 at 6:17pm

This is not possible. You will need to keep track of the incoming
drawing commands.

-Joshua

#77181
May 16, 2006 at 8:30pm

Ouch, that hurts. Would there be some other way of determining if
the object was drawing beyond the visible GL world?

Thanks,

M

#77182
May 16, 2006 at 8:43pm

On May 16, 2006, at 1:30 PM, mattyo wrote:

> Ouch, that hurts. Would there be some other way of determining if
> the object was drawing beyond the visible GL world?

If you can record your “movetos” and concatenate your matrix
transformations (glposition/scale/rotate) appropriately, you will
have a point. You can then use the JS accessible worldtoscreen to
determine if this point is in your window. In a future version
jit.gl.render will have worldtoscreen/screentoworld available as part
of the patcher.

-Joshua

#77183
May 17, 2006 at 12:25am

Thanks for the help — I predict wailing an gnashing of teeth in my
future, but at least I’ve got a place to start….

M

#77184

You must be logged in to reply to this topic.