;; -*-scheme-*- (define (script-fu-guides-remove image drawable) (gimp-image-undo-group-start image) (set! guide-id 0) (set! guide-id (car (gimp-image-find-next-guide image 0))) (delete-guides image guide-id) (gimp-image-undo-group-end image) (gimp-displays-flush) ) (define (delete-guides image guide-id) ;; check if not 0 (no guides), otherwise delete the guide (if (not (= guide-id 0)) (begin (gimp-image-delete-guide image guide-id) ;; start from 0 every time, dont need 'next' any guide will do (delete-guides image (car (gimp-image-find-next-guide image 0))) ) ) ) ;; To be consistant with other funtions name uses remove rather than clear ;; Adobe Photoshop 7 used "Clear Guide_s" but mnemonic was already taken (script-fu-register "script-fu-guides-remove" _"/View/Clear Guides" _"Clear Guides. Removes all horizontal and vertical guides. " "Alan Horkan. " ; author "Alan Horkan, 2004. Dedicated to the Public Domain. " ; rights "April 2004" "" ; works with all image types SF-IMAGE "Image" 0 SF-DRAWABLE "Drawable" 0 )