Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get the (x;y) coordinates of a layer ? [Script-Fu]
#3
(07-23-2024, 02:44 PM)gasMask Wrote: Hi,

I don't know Scheme, but I knew to look for 'offsets', and I found this in a version of Akkana Peck's 'arrow.scm' script.

Code:
            (set! x_offset (car (gimp-drawable-get-offsets drawable)))
            (set! y_offset (cadr (gimp-drawable-get-offsets drawable)))

The call that is documented in the current versions is (gimp-drawable-offsets drawable). (gimp-drawable-get-offsets drawable) is probably deprecated.

But, caution, there is also a (gimp-drawable-offset drawable wrap-around fill-type offset-x offset-y) (no final s) which is a different animal (it shifts the layer contents within the current layer boundaries).
Reply


Messages In This Thread
RE: How to get the (x;y) coordinates of a layer ? [Script-Fu] - by Ofnuts - 07-23-2024, 03:49 PM

Forum Jump: