Re: [Gimp-user] Layer positioning via dialog

2006-06-22 Thread saulgoode

Quoting Mauro Condarelli [EMAIL PROTECTED]:



I would be much happier if I could have some kind of feedback.
E.g.: a box showing the position of the layer into the canvas.

Any further idea??


The following Script-fu will allow you to enter numerical offsets into  
a dialog box. Script-fu is unable to provide a visual preview of the  
result but perhaps this will suit your needs (you can UNDO the  
operation if the result is unsatisfactory).



Save the text below as a file named layer-offset.scm in your scripts  
directory. The command will appear as Script-Fu-Transform-Layer  
Offset.


(define (script-fu-layer-offset image layer offset-x offset-y resize?)
  (gimp-image-undo-group-start image)
  (gimp-layer-set-offsets layer offset-x offset-y)
  (if (= resize? TRUE)
(gimp-image-resize-to-layers image)
)
  (gimp-displays-flush)
  (gimp-image-undo-group-end image)
  )

(script-fu-register script-fu-layer-offset
 Image/Script-Fu/Transform/Layer offset
 Offset the layer relative to the image
 Saul Goode
 Saul Goode
 6/22/2006
 
 SF-IMAGEImage0
 SF-DRAWABLE Drawable 0
 SF-ADJUSTMENT Offset X '( 1553 0 5000 1 10 0 1 )
 SF-ADJUSTMENT Offset Y '( 1038 0 5000 1 10 0 1 )
 SF-TOGGLE Resize image? TRUE
 )

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Layer positioning via dialog

2006-06-22 Thread Mauro Condarelli
 ==
 Date: Thu, 22 Jun 2006 03:50:10 -0700
 From: [EMAIL PROTECTED]
 To: gimp-user@lists.XCF.Berkeley.EDU
 Subject: Re: [Gimp-user] Layer positioning via dialog
 ==
 
 Quoting Mauro Condarelli [EMAIL PROTECTED]:
 
 
  I would be much happier if I could have some kind of feedback.
  E.g.: a box showing the position of the layer into the canvas.
 
  Any further idea??
 
 The following Script-fu will allow you to enter numerical offsets 
 into
 a dialog box. Script-fu is unable to provide a visual preview 
 of the
 result but perhaps this will suit your needs (you can UNDO the
 operation if the result is unsatisfactory).
 
 
 Save the text below as a file named layer-offset.scm in your 
 scripts
 directory. The command will appear as Script-Fu-Transform-Layer
 Offset.
 

THANKS!!!

Nice :)
.. since You seem so knowledgeable...

Is there a simple way to to make a dialog that does not change the values, but 
updates them when I move the layer?

Is this possible at all? I mean: is it possible for a dialog to react to 
changes made to the image? This seems to imply some kind of 
notification/callback mechanism that I don't know if it's implemented at all.

I *will* try to get info about the available functions in the docs, but a 
pointer would be welcome. :)

TiA
Mauro


___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Layer positioning via dialog

2006-06-21 Thread VytautasP

Mauro Condarelli wrote:
Hi, 
I have a set of layers I need to position in the image at precise (to the pixel) positions.

I *know* I can move them using the move tool, but it is a real pain.
I Have been searching for some dialog where I can say exactly where in the 
canvas (much bigger than the layers) I want to have the (e.g.) top left corner 
of the layer.
I have seen the Layer-Transform-Offset menu, but this gives an offset for the 
content into the leayer, while I need to set the offset of the layer into the image.
I know It must be available somewhere, but I can't find it! :(

Thanks for Your help!
Mauro
You can move with move tool with keyboard for higher precision. Choose 
layer with Page Up/Down key, press M and you can move chosen layer with 
arrows keys by 1 pixel, or by 10 pixels with arrows keys, while holding 
Shift button.

___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user