There is the procedure gimp-drawable-offsets
. If called with a layer id, it will return the offsets in x- and y-direction as a list.
Example via the Script-Fu console:
> (gimp-layer-set-offsets 2 42 23)
(#t)
> (gimp-drawable-offsets 2)
(42 23)
The first command offsets the layer with id 2 by 42 pixels in x- and 23 pixels in y-direction. The layer id is an educated guess I made; for real purposes you'd have to determine a suitable id, e.g. the currently active layer: gimp-image-get-active-layer
.
The second command return the offsets as a list, in order to access them as numbers you can use the standard Scheme procedures car
and cdr
(and their concatenation shortcuts, such as cadr
):
> (car (gimp-drawable-offsets 2))
42
> (cadr (gimp-drawable-offsets 2))
23
This isn't a tool, in GIMP's terminology. And the dialog this menu entry pops up is only for changing the layer size and the offset is for moving it around within the resulting size. This isn't the offset to the image edges. – Michael Schumacher – 2015-09-28T11:44:50.473