RSS/Atom feed Twitter
Site is read-only, email is disabled

Is there a way to update the cursor position from within a tool?

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

Is there a way to update the cursor position from within a tool? Karl Günter Wünsch 27 Jul 22:01
  Is there a way to update the cursor position from within a tool? Alastair M. Robinson 28 Jul 12:08
Karl Günter Wünsch
2006-07-27 22:01:02 UTC (almost 18 years ago)

Is there a way to update the cursor position from within a tool?

I have a problem. Because of the aspect pegging in the rectangle selection tool the cursor position and the corner of the area can move asynchronously because of rounding effects in conjunction with the set aspect ratio.

That's why I would like to update the cursor position after all of the calculations are through to reflect the results.

regards Karl Günter Wünsch

Alastair M. Robinson
2006-07-28 12:08:10 UTC (almost 18 years ago)

Is there a way to update the cursor position from within a tool?

Hi,

Karl Günter Wünsch wrote:

I have a problem. Because of the aspect pegging in the rectangle selection tool the cursor position and the corner of the area can move asynchronously because of rounding effects in conjunction with the set aspect ratio.

When you say asynchronously, are we talking about the corner of the selection parting company with the mouse by a couple of pixels, or can the selection get "left behind"?

I haven't looked at the code - but can you keep the coordinates as floats, and round down only when you draw the selection box - and avoid the cumulative rounding error that way?

That's why I would like to update the cursor position after all of the calculations are through to reflect the results.

That's not a good idea - Adobe PageMaker does that for guide-snapping, and it feels *awful* - especially when you get interactions between guides, causinig the cursor's position to *oscillate* rapidly between two or more positions!

I think what you're suggesting would subtly change the "feel" of the mouse while creating a selection - hopefully, there's a better solution to the problem. :)

All the best, --
Alastair M. Robinson