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

Mouse Click Coordinates

This discussion is connected to the gimp-user-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.

8 of 8 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 Alexander Rabtchevich 13 Mar 12:27
    Mouse Click Coordinates Sven Neumann 13 Mar 12:58
     Mouse Click Coordinates Alexander Rabtchevich 13 Mar 13:26
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 (about 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 (about 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 (about 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 ---

Alexander Rabtchevich
2004-03-13 12:27:43 UTC (about 20 years ago)

Mouse Click Coordinates

I have another question - is it possible through settings to make GIMP to display the size of rectangular selection, excluding non-image area? Current realization displays the size of the whole selection, even if the part of the selection is outside image boundaries.

If it's impossible, should I fill an issue?

Sven Neumann wrote:

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 Neumann
2004-03-13 12:52:53 UTC (about 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

Sven Neumann
2004-03-13 12:58:27 UTC (about 20 years ago)

Mouse Click Coordinates

Hi,

Alexander Rabtchevich writes:

I have another question - is it possible through settings to make GIMP to display the size of rectangular selection, excluding non-image area? Current realization displays the size of the whole selection, even if the part of the selection is outside image boundaries.

The selection cannot extend the image boundaries. This is a bug in the rectangular selection tool then.

Sven

David Neary
2004-03-13 13:04:08 UTC (about 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.

Alexander Rabtchevich
2004-03-13 13:26:21 UTC (about 20 years ago)

Mouse Click Coordinates

Ok, I've posted a bug.

Sven Neumann wrote:

Hi,

Alexander Rabtchevich writes:

I have another question - is it possible through settings to make GIMP to display the size of rectangular selection, excluding non-image area? Current realization displays the size of the whole selection, even if the part of the selection is outside image boundaries.

The selection cannot extend the image boundaries. This is a bug in the rectangular selection tool then.

Sven