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,068

    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
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    653

    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.

Similar Threads

  1. Scaling i want to add scaling to my codeould someone advise me how
    By cloudracer in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-27-2014, 02:07 PM
  2. Replies: 7
    Last Post: 03-21-2005, 03:46 AM
  3. Perspective Movements of objects
    By Sunset in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-02-2004, 01:24 PM
  4. easy way for movements in 3D space?
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 09-18-2002, 10:00 AM
  5. Strafe movements
    By imported_robert in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-29-2001, 09:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean