;; -*-scheme-*- ;; Stefano Angaran 2009. No copyright. Public Domain. (define (script-fu-guide-new-center image drawable) (let* ( (width (car (gimp-image-width image))) (height (car (gimp-image-height image))) (position1 50) (position2 50) ) (set! position1 (/ (* height position1) 100)) (set! position2 (/ (* width position2) 100)) (if (<= position1 height) (gimp-image-add-hguide image position1)) (if (<= position2 width) (gimp-image-add-vguide image position2)) (gimp-displays-flush) ) ) (script-fu-register "script-fu-guide-new-center" _"Find Center..." _"Add a guide at the position specified as a percentage of the image size" "Stefano Angaran" "Stefano Angaran, 2004" "June 2009" "*" SF-IMAGE "Input Image" 0 SF-DRAWABLE "Input Drawable" 0 ) (script-fu-menu-register "script-fu-guide-new-center" "/Image/Guides")