Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Command/API to move to particular coordinate?
#1
Is there a command / plugin / API that will center the window on a particular coordinate? E.g. I enter 2000, 3000 and it moves the window to that coordinate.

My use case is that I have a 10000x10000 image and a list of coordinates where I need to fix things. Currently I scroll, then stop to read the cursor position in the lower left, scroll some more, and repeat until I find the desired location, which is tedious. I'd like to be able to jump directly to a position.I looked through script fu but couldn't figure out if there is a  better way.

Thanks!
Reply
#2
The only way I see to do this is a 2 steps process to repeat for each location:
- use the rectangle select tool : set manually it's size and position in the tool options to center it on the location
- then menu View > Zoom > Zoom to selection
Reply
#3
It might be a good request to the Gimp developers for a center view at X,Y or there might already be one, I do not know.

Quote:My use case is that I have a 10000x10000 image and a list of coordinates where I need to fix things..

Fix things ? Fix what at...where ?

There are scripts/plugins that will take a list of coordinates and set-up guides that can be used to centre layers.

If it is a copied image / selection /... then there is a python plugin that will paste into @ X,Y coordinates.  

Might be useful, attached. Unzip. paste-xy.py  It should work with MacOS goes in your Gimp user plugins folder, wherever that is in MacOS. Check that it is executable.

Works like this: https://i.imgur.com/5A6wHSd.mp4  Not centered, standard graphics, X,Y is top left corner.


Attached Files
.zip   paste-xy.zip (Size: 1.58 KB / Downloads: 65)
Reply
#4
(05-06-2022, 04:57 PM)Ken Shirriff Wrote: Is there a command / plugin / API that will center the window on a particular coordinate? E.g. I enter 2000, 3000 and it moves the window to that coordinate.

My use case is that I have a 10000x10000 image and a list of coordinates where I need to fix things. Currently I scroll, then stop to read the cursor position in the lower left, scroll some more, and repeat until I find the desired location, which is tedious. I'd like to be able to jump directly to a position.I looked through script fu but couldn't figure out if there is a  better way.

Thanks!

No way. Script and plugins are by design barred from interacting with the UI.
Reply
#5
Thanks everyone for the suggestions. timanni: your idea of selecting and then zooming solves my problem. I added a keyboard shortcut for zooming, which makes it even easier. rich2005: you asked what I'm fixing. I'm fixing layout problems on a chip image.
Reply


Forum Jump: