delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/20/09:50:36

Date: Mon, 20 Jan 1997 07:58:23 -0500 (EST)
From: root <root AT capslock DOT com>
Reply-To: "Mike A. Harris" <mharris AT sympatico DOT ca>
To: "Gautam N. Lad" <gautam AT interlog DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: GRID and SNAP for Mouse
In-Reply-To: <5bqvfa$a73@news.interlog.com>
Message-ID: <Pine.LNX.3.93.970120075559.8267A-100000@capslock.com>
MIME-Version: 1.0

On 18 Jan 1997, Gautam N. Lad wrote:

> Hi,
> Is it possible to make the mouse snap on pixels.  What I mean, is
> the mouse usually moves around smoothly, but what if I wanted to
> have a grid, say 10x10, and the mouse to move from pixel 1 to pixel
> 10?  
> What I'm basically saying is I want to have a snap effect, on a 
> grid.  Equivalent to many CAD programs such as AutoCAD that have
> the Snap function (F9).
> 
> I'm using DJGPP v2.00 and GRX v2.0.

Blit your own mouse pointer onto the screen.  Read the mouse co-ords,
multiply by 10, then blit your pointer.  You might want to lower the mouse
sensitivity or threshold first so that the mouse doesn't wizz off the
screen now though.


Mike A. Harris                           http://www3.sympatico.ca/mharris
My dynamic address:      http://www3.sympatico.ca/mharris/ip-address.html
mailto:mharris AT sympatico DOT ca        mailto:mharris AT blackwidow DOT saultc DOT on DOT ca
HELP: How do you get talkd to work under Linux with a dynamic IP address?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019