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

Mouse Click Coordinates

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.

5 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

Mouse Click Coordinates Kevin Myers 13 Mar 08:27
  Mouse Click Coordinates Sven Neumann 13 Mar 12:04
Mouse Click Coordinates Kevin Myers 13 Mar 12:09
  Mouse Click Coordinates Sven Neumann 13 Mar 12:52
  Mouse Click Coordinates David Neary 13 Mar 13:04
Kevin Myers
2004-03-13 08:27:02 UTC (over 20 years ago)

Mouse Click Coordinates

Hello,

Is there any way that I can write a GIMP add-in that can obtain the coordinates of user mouse clicks in the main GIMP image window? My add-in needs the user to be able to click on specific locations within the main image window in order to obtain various coordinates for subsequent processing.

Thanks, s/KAM

Sven Neumann
2004-03-13 12:04:27 UTC (over 20 years ago)

Mouse Click Coordinates

Hi,

"Kevin Myers" writes:

Is there any way that I can write a GIMP add-in that can obtain the coordinates of user mouse clicks in the main GIMP image window? My add-in needs the user to be able to click on specific locations within the main image window in order to obtain various coordinates for subsequent processing.

No, there isn't. All you can do is to show a representation of the image in the plug-in dialog and have the user click there.

Sven

Kevin Myers
2004-03-13 12:09:05 UTC (over 20 years ago)

Mouse Click Coordinates

Sven, you're the guru, so you would know. However, how is it that I can't get the coordinates, when apparantly something like the crop tool can? Is the crop tool specially written using internal gimp facilities that aren't available to a normal add-in?

Thanks again, s/KAM

----- Original Message ---

Sven Neumann
2004-03-13 12:52:53 UTC (over 20 years ago)

Mouse Click Coordinates

Hi,

"Kevin Myers" writes:

Sven, you're the guru, so you would know. However, how is it that I can't get the coordinates, when apparantly something like the crop tool can? Is the crop tool specially written using internal gimp facilities that aren't available to a normal add-in?

Would you mind to define "normal add-in" then? I assumed you meant a plug-in and the crop tool, like all other tools, is completely implemented in the core.

Sven

David Neary
2004-03-13 13:04:08 UTC (over 20 years ago)

Mouse Click Coordinates

Hi Kevin,

Kevin Myers wrote:

However, how is it that I can't
get the coordinates, when apparantly something like the crop tool can? Is the crop tool specially written using internal gimp facilities that aren't available to a normal add-in?

This is the difference between a tool and a plug-in. A tool is something which (usually) operates locally on the basis of a mouse click (the colour tools are the exceptions, which often causes some confusion). A plug-in usually gets a copy of a drawable to work on, and doesn't have access to things like mouse click events which are captured and treated in the core.

Cheers, Dave.