(define (my-duplicate-layer image layer) (let* ((dup-layer (car (gimp-layer-copy layer 1)))) (gimp-image-add-layer image dup-layer (-(car (gimp-image-get-layer-position image layer)) 0)) dup-layer)) ( define ( Wielokrotne-obracanie image drawable n p inter center x y marge) (gimp-undo-push-group-start image) (let* ( (i 1) (a 7) (r 0) (f) (act) (intrt)) (set! i 1) (set! a n) (set! r ( / 360 a )) (set! r ( * r 3.14159 )) (set! r ( / r 180 )) (set! f drawable) (set! intrt 1) (plug-in-autocrop-layer 1 image drawable) (if (= inter 0) (set! intrt 3) ) (if (= inter 1) (set! intrt 2) ) (if (= inter 2) (set! intrt 1) ) (if (= inter 3) (set! intrt 0) ) (if (= center 0) (begin (set! x (/ (car(gimp-image-width image)) 2)) (set! y (/ (car(gimp-image-height image)) 2)) )) (if (= p TRUE) ( gimp-drawable-transform-rotate drawable (/ r 2) 0 x y 0 intrt 0 3 0 ) (plug-in-autocrop-layer 1 image drawable) ) (- a 1) ( while ( < i a ) (my-duplicate-layer image drawable) (set! drawable (car (gimp-image-get-active-layer image))) ( gimp-drawable-transform-rotate drawable (* r i) 0 x y 0 intrt 0 3 0 ) (plug-in-autocrop-layer 1 image drawable) (if (= i 1) (set! act (car (gimp-image-get-active-layer image))) ) (set! i ( + i 1 ) ) (set! drawable f) ) (gimp-image-set-active-layer image act) (set! i 1) (if (= marge TRUE) (begin ( while ( < i a ) (set! drawable (car (gimp-image-get-active-layer image))) (gimp-image-merge-down image drawable 0) ( set! i ( + i 1 ) ) ) ) ) ) (gimp-displays-flush) (gimp-undo-push-group-end image) ) (script-fu-register "Wielokrotne-obracanie" _"_Wielokrotne obracanie..." "Duplikuje i obraca warstwy dookola wyznaczonego punktu" "Sebastian Jakubicki" "Sebastian Jakubicki" "October 2008" "" SF-IMAGE "Image" 0 SF-DRAWABLE "Drawable" 0 SF-ADJUSTMENT "Ilosc kopi na okregu" '(12 0 10000 1 10 0 1) SF-TOGGLE "Obracaj pierwsza warstwe" FALSE SF-OPTION "Interpolacja" '("Sinc(Lanczos3)" "Szescienna" "Liniowa" "Brak") SF-OPTION "Centrum obrotu" '("Obracaj dookola obrazu" "Obracaj dookola wybranego punktu") SF-ADJUSTMENT "Punkt - X" '(0 -10000 10000 1 10 0 1) SF-ADJUSTMENT "Punkt - Y" '(0 -10000 10000 1 10 0 1) SF-TOGGLE "Polacz warstwy" TRUE ) (script-fu-menu-register "Wielokrotne-obracanie" "/Layer/")