; rotate anim plugin ; 2000 MARIN Laetitia ; titix@amin.unice.fr (define (rotate-and-copy2 img drawable x angle) (if (> x 0) (begin (let ((pouet (car (gimp-layer-copy drawable TRUE)))) (gimp-image-add-layer img pouet 0) (gimp-rotate pouet TRUE (/ (* (- 0 x) 3.14159) 180))) (rotate-and-copy2 img drawable (- x angle) angle)))) (define (script-fu-rotate-anim img drawable angle) (let* ((old-bg-color (car (gimp-palette-get-background))) (old-fg-color (car (gimp-palette-get-foreground))) (sizeX (car (gimp-image-width img))) (sizeY (car (gimp-image-height img)))) (gimp-image-undo-disable img) ;; selection (rotate-and-copy2 img drawable (- 360 angle) angle) (gimp-palette-set-foreground old-fg-color) (gimp-palette-set-background old-bg-color) (gimp-image-undo-enable img) (gimp-displays-flush))) (script-fu-register "script-fu-rotate-anim" "/Script-Fu/Animators/Rotation (1)..." "anim creation by rotate single drawable" "MARIN Laetitia" "MARIN Laetitia" "Fev 2000" "" SF-IMAGE "Image to stamp" 0 SF-DRAWABLE "Drawable to stamp" 0 SF-VALUE "Angle between frames" "15")