We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Relative scale/translation mouse
Page Index Toggle Pages: 1
Relative scale/translation mouse (Read 324 times)
Relative scale/translation mouse
May 27th, 2006, 11:56pm
 
I had a search for "relative scale mouse" on these boards and didn't find anything useful...

What I want is the relative x/y position of the mouse after a using P5's scale() and translate() methods.

I'm suprised it hasn't been implemented yet. Its very useful. If you compare against Flash, Flash has a _xmouse and _ymouse properties for every movieclip, calculated relative to that movieclip.

In MyGUI library, I keep track of the mouse position by passing the relative scale/translated positions to the next object in a group.

Now, processing doesn't work with movieclips like Flash does. But, after scaling/translating the scene, I think there should be some easy accessor method for getting the xmouse and ymouse positions relative to objects drawn on the screen.

e.g. screenMouseX, screenMouseY

Thoughts any one?

Regards,
- Markavian
Page Index Toggle Pages: 1