[Gimp-user] Doing a select without the mouse?
- From: paynekj <forums gimpusers com>
- To: gimp-user-list gnome org
- Cc: team gimpusers com
- Subject: [Gimp-user] Doing a select without the mouse?
- Date: Thu, 24 Jan 2013 23:52:30 +0100
As a matter of fact, yes.
Preconditions:
- have the Script-Fu console open
- know the id of the image you want to create a selection for
- read the documentation of the gimp-rect-select procedure in the
procedure browser
Then, in the Script-Fu console:
(gimp-rect-select image x y width height operation feather
feather-radius)
For example, assuming you've got an image with the id 1:
(gimp-rect-select 1 23 23 42 42 2 1 5)
HTH,
Michael
Wouldn't it make sense to take this to the next step and write a script -
prompting for the required values, then assigning a keyboard shortcut?
For example:
(define (script-fu-ga2013_rect_select image drawable x y width height)
(gimp-rect-select image x y width height CHANNEL-OP-REPLACE FALSE 0)
(gimp-displays-flush) ; flush the display
)
(script-fu-register "script-fu-ga2013_rect_select"
_"Rectangle Selection..."
"Make a rectangular selection"
"Thing"
"Thing"
"24/01/2013"
"*"
SF-IMAGE "Input Image" 0
SF-DRAWABLE "Input Drawable" 0
SF-ADJUSTMENT "x" '(0 0 10000 1 10 0 1)
SF-ADJUSTMENT "y" '(0 0 10000 1 10 0 1)
SF-ADJUSTMENT "width" '(10 0 10000 1 10 0 1)
SF-ADJUSTMENT "height" '(20 0 10000 1 10 0 1)
)
(script-fu-menu-register "script-fu-ga2013_rect_select" "<Image>/Select/")
--
paynekj (via www.gimpusers.com/forums)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]