Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Scaling mouse movements

  1. #1
    Guest

    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

  2. #2
    Junior Member Newbie
    Join Date
    Jun 2002
    Posts
    3

    Re: Scaling mouse movements

    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...

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,096

    Re: Scaling mouse movements

    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:
    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

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    668

    Re: Scaling mouse movements

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •