GNOME Bugzilla – Bug 143163
Align layer & Position Layer
Last modified: 2018-05-24 11:06:49 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?). --------------------------
Created attachment 28018 [details] Dialog Mockup
Created attachment 28019 [details] glade file (single dialog)
Created attachment 28020 [details] glade file (two dialogs)
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.
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.
Optimistically setting this on the 2.2 milestone. It shouldn't be difficult to implement this.
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.
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
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.
Oh, well. We have no choice but to bump this to the next development cycle then :(
*** Bug 167906 has been marked as a duplicate of this bug. ***
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.
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.
Not much going on here, setting milestone to Future. Let's put it on a specific milestone when something is actually happening.
"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.
Bruno, go ahead then and send us a patch.
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
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
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...
-- 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.