Scaling mouse movements

I am programming a vector drawing program, using interactive drawing with a mouse. It works really well until I try to scale the drawing. Then the mouse cooridinates are not using the same scale as the existing drawing.

So I nned to scale the mouse movement based on the scale of the drawing.

Is there an easy way to do this ?

cheers,
Jim Parker

i’m assuming by nn’d you ment mm’d… OpenGL doesn’t provide anything more than a low level graphics api, you’re pretty much on your own to find a solution to any input related problems. In the same situation I personally would manually transform the mouse as well…

I think your own the right track, there is not eacy way to do it.

You have to scale the mouse movement based on the screen scale.

Originally posted by Jim Parker:
[b]I am programming a vector drawing program, using interactive drawing with a mouse. It works really well until I try to scale the drawing. Then the mouse cooridinates are not using the same scale as the existing drawing.

So I nned to scale the mouse movement based on the scale of the drawing.

Is there an easy way to do this ?

cheers,
Jim Parker [/b]

I tried this some time ago for dragging/picking objects on the screen. But failed to get it to map exactly and couldn;t stop the points/mouse from drifting apart.