After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 143163 - Align layer & Position Layer
Align layer & Position Layer
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: Plugins
git master
Other All
: Normal enhancement
: Future
Assigned To: GIMP Bugs
GIMP Bugs
: 167906 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-05-25 23:24 UTC by Jakub Steiner
Modified: 2018-05-24 11:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Dialog Mockup (10.05 KB, image/png)
2004-05-25 23:25 UTC, Jakub Steiner
Details
glade file (single dialog) (13.52 KB, application/x-glade)
2004-05-25 23:27 UTC, Jakub Steiner
Details
glade file (two dialogs) (21.79 KB, application/x-glade)
2004-05-25 23:28 UTC, Jakub Steiner
Details

Description Jakub Steiner 2004-05-25 23:24:28 UTC
This is a feature request to implement two functions:

1) Precise positioning a layer on image canvas (numerically)
2) Aligning of a layer on image canvas or relative to a layer above/below (top,
left, right...)

-------------------------------
On Tue, 2004-05-25 at 16:05 -0400, John Culleton wrote:
Been playing with the DTP program scribus and its tutorials 
> a bit. One feature in that program is the ability to place 
> an object exactly on the layer by specifying starting 
> location and dimensions numerically.  A rule can also be 
> placed exactly by specifying its X or Y coordinate. This is 
> handy for things like book covers where placements have to 
> be exact or the image is useless. Drag and drop is not 
> adequate.  
> 

I have, in fact, been wanting something like this too. And a very similar
functionality is aligning a layer on the image. I have made a little mockup of
two dialogs.

http://jimmac.musichall.cz/stuff/gimp/align-layer.png
http://jimmac.musichall.cz/stuff/gimp/position-layer.png

They both require a custom control, which may be expensive in terms of developer
time, but definitely a lot more usable than what "align visible layers" uses
currently for example. It is really hard to use and hardly intuitive. The
control defines what part of the current layer (boundary) is to be aligned. 

Combining these two into a single dialog seems to be a better solution though:

http://jimmac.musichall.cz/stuff/gimp/position-layer2.png

Open Questions and Issues:

      * The spinboxes and the unit combobox aren't accessible with a mnemonic.
      * In some cases multiple source nodes give same results. I still find the
interface more intuitive though.
      * I am not sure if the dialog should remember it's previous settings or
fill in the current position (and recalculate when selecting different nodes?).
      
--------------------------
Comment 1 Jakub Steiner 2004-05-25 23:25:24 UTC
Created attachment 28018 [details]
Dialog Mockup
Comment 2 Jakub Steiner 2004-05-25 23:27:38 UTC
Created attachment 28019 [details]
glade file (single dialog)
Comment 3 Jakub Steiner 2004-05-25 23:28:13 UTC
Created attachment 28020 [details]
glade file (two dialogs)
Comment 4 Sven Neumann 2004-05-26 01:00:23 UTC
Shouldn't this be part of the Layer Properties dialog?

A (perhaps) related note:

I've added the gravity icons to the gimp stock icon collection a while ago
because  I wanted to implement a similar widget. The icons that are in GIMP now
are a bit large though. But since they aren't used, we can exchange them for
smaller ones.
Comment 5 Jakub Steiner 2004-05-26 19:21:43 UTC
I have actually looked at scribus and they do have positioning implemented in a
property dialog. Initially I though the fact that you need to define the
basepoint for the positioning calls for having this as an "action" or "function"
rather than "property". Having it as a layer property sounds like a good thing too.
Comment 6 Sven Neumann 2004-05-27 20:06:40 UTC
Optimistically setting this on the 2.2 milestone. It shouldn't be difficult to
implement this.
Comment 7 Alan Horkan 2004-08-17 20:22:25 UTC
screenshot which was posted to the mailing list and I assume is the same as the
glad file where both dialogs are combined
http://jimmac.musichall.cz/stuff/gimp/position-layer2.png

Incidentally this looks a whole like like the dialog in Adobe Image Ready for
the "File, Place..." feature, which inserts a file as a new layer (it doesn't
include a preview though).  

The reason I mention this is because I've written a script to do "File,
Place..." which I could easily adapted to do positioning of the current layer
instead of the inserted file until someone is ready to implement it properly
(although I'm a bit short of time I think I might have time to make the
modifications sometime this week).  
Unfortunately the user interface is butt ugly due to the (albeit reasonable)
limitations of Script-Fu GUI.  I was in fact going for very close to Jimmacs
mockup.  I'm pretty sure the script works in all cases but I have not finished
testing it.  
http://matrix.netsoc.tcd.ie/~horkana/dev/gnome/gimp/script-fu/scripts/file-place.scm

Perhaps whoever implements this feature will also add a "File, Place..." feature
at the same time.  I'd be more than happy to see this (or any of my other
scripts) made obselete.  



> Shouldn't this be part of the Layer Properties dialog?

I think it would be best in the Layer Menu as a replacement for the old Align
Layers Dialog, making it part of the Layer Properties makes it that little bit
harder to find.  

Also, it might be good if postion boxes showed the current layer postion by
default.  

Comment 8 Alan Horkan 2004-08-19 23:22:12 UTC
Jimmac, until someone does this properly here's a Script-Fu version that mostly
works.   
http://matrix.netsoc.tcd.ie/~horkana/dev/gnome/gimp/script-fu/script-fu.html

It will align the current layer based on the size of the image
http://matrix.netsoc.tcd.ie/~horkana/dev/gnome/gimp/script-fu/scripts/layer-align.scm
Comment 9 Sven Neumann 2004-10-03 23:15:43 UTC
Jimmac, if I wanted to implement your dialog with the nice positioning widget,
I'd need two graphics to use for the widget. One should be the background image,
the shaded white canvas surrounded by a checkerboard. The other would be the red
marker that shows the selected position. Please make sure you use the standard
checkersize and checkerboard colors. Your mockups have a color-cast in the
checkerboard.
Comment 10 Sven Neumann 2004-10-26 15:29:40 UTC
Oh, well. We have no choice but to bump this to the next development cycle then :(
Comment 11 Sven Neumann 2005-02-19 23:36:10 UTC
*** Bug 167906 has been marked as a duplicate of this bug. ***
Comment 12 weskaggs 2006-06-16 16:15:19 UTC
Moving milestone from Future to 2.4 and raising severity to blocker, because this is probably resolved by the new Alignment tool, but we will want to at least revisit it.  If there are remaining issues that can't be resolved for 2.4, we can reset the target and severity.
Comment 13 weskaggs 2006-08-10 19:22:59 UTC
There are improvements needed in the Alignment tool, but this bug report is not a good place to discuss them, so I am going to bump the target and lower the severity. We should open new bug reports for specific issues concerning the Alignment tool.
Comment 14 Martin Nordholts 2008-05-28 17:47:43 UTC
Not much going on here, setting milestone to Future. Let's put it on a specific milestone when something is actually happening.
Comment 15 Bruno 2008-07-03 17:44:53 UTC
"1) Precise positioning a layer on image canvas (numerically)"

I wish GIMP was more generally aware of pixel coordinates.

This means the status bar (or some dedicated UI element) should show the coordinates (top-left and bottom-right) and dimensions of active selection, layer, or whole image.
Even better if these were directly editable.

Currently it shows only the mouse coordinates and drag movements, which is much less useful.
Comment 16 Sven Neumann 2008-07-04 07:02:50 UTC
Bruno, go ahead then and send us a patch.
Comment 17 Nick Levinson 2008-10-06 04:49:23 UTC
Aligning by font baseline:

I'd like to be able to align layers that have text on a common baseline according to the baseline information already included in or with a font file.

This normally is easy. However, I mixed several font sizes in a line of text, and the layers were near the top of the canvas. In addition, some fonts and some characters in some fonts have baselines that are not visually obvious, as when a single character is taken from a font and descenders render its baseline visually unclear, or when a font is nonalphanumeric, e.g., pictorial, but I understand that most or all fonts include information that locates the baseline.

If baseline alignment is already included in the latest Gimp, that's great. I'm not looking for a retroactive reprogramming, just suggesting a future feature.

I'm running Gimp 2.2.7 on Linux Fedora Core 4 with Gnome desktop 2.10.0. I didn't see a separate bug on this, and it didn't seem appropriate to start a new bug for this.

Thank you.

-- 
Nick
Comment 18 Nick Levinson 2008-10-06 05:14:04 UTC
For extra value:

Perhaps I should add to that aligning baselines (a) to a curve numerically defined, (b) to a freeform line, and (c) numerically relative to a line (i.e., above or below).

The x-height could aid some special effects, though it would be much more rarely used, and I don't know if font files ever define an x-height. (In this context, x-height is not along an x-axis or relative to a 0 point but typographically is the height of the lower-case x, which in the given font is generally the height of most lower-case letters without their ascenders.)

Baseline alignment alone would be useful even without these additions.

Thanx.

-- 
Nick
Comment 19 LightningIsMyName 2010-08-23 20:54:32 UTC
bump - I would like to re-open this. Some images are broken (the ones that were linked), the glade files won't open for me, and the align tool was already introduced. So I'll ask for some updated details:

Do we want this integrated with the align tool or as an independent dialog?
If we want it inside an independent dialog, then:
1. Where do we want this? I suggest "<Image>/Layer/Position..."
2. Is the dialog mockup (the one from comment #1) still relevant?

I'll try to do it as soon as decisions on the above question are made. This bug is open since 2.2 - let's try to finally finish this...
Comment 20 GNOME Infrastructure Team 2018-05-24 11:06:49 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/81.