get pen location in jit.qt.sketch


    May 16 2006 | 12:41 pm
    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

    • May 16 2006 | 6:17 pm
      This is not possible. You will need to keep track of the incoming
      drawing commands.
      -Joshua
    • May 16 2006 | 8:30 pm
      Ouch, that hurts. Would there be some other way of determining if
      the object was drawing beyond the visible GL world?
      Thanks,
      M
    • May 16 2006 | 8:43 pm
      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
    • May 17 2006 | 12:25 am
      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