gimp-gap r733 - in branches/gap-2-4: . gap



Author: neo
Date: Tue Feb 12 12:43:46 2008
New Revision: 733
URL: http://svn.gnome.org/viewvc/gimp-gap?rev=733&view=rev

Log:
2008-02-12  Sven Neumann  <sven gimp org>

	Merged change by Kevin Cozens from trunk:

	* gap/sel-to-anim-img.scm: Fixed bad syntax in let block. Moved
	some set! calls in to let block. De-tabified.


Modified:
   branches/gap-2-4/ChangeLog
   branches/gap-2-4/gap/sel-to-anim-img.scm

Modified: branches/gap-2-4/gap/sel-to-anim-img.scm
==============================================================================
--- branches/gap-2-4/gap/sel-to-anim-img.scm	(original)
+++ branches/gap-2-4/gap/sel-to-anim-img.scm	Tue Feb 12 12:43:46 2008
@@ -1,6 +1,6 @@
 ; The GIMP -- an image manipulation program
 ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
-; 
+;
 ; Selection to AnimationImage
 ; This script requires plug-in-gap-layers-run-animfilter (that is part of
 ; the gap Plugin-collection, available in the plugin registry)
@@ -10,7 +10,7 @@
 ;    (base functions taken from Selection to Image ((c) by Adrian Likins adrian gimp org)
 ; - added number of copies and
 ; - optional { BG-FILL | TRANS-FILL }
-; - if there was no selection at begin the selection is cleared at end 
+; - if there was no selection at begin the selection is cleared at end
 ; - optional call of plug-in-gap-layers-run-animfilter
 ;   (to create animation effects by applying any available PDB filter foreach copy
 ;    (==layer) of the generated image
@@ -21,12 +21,12 @@
 ; it under the terms of the GNU General Public License as published by
 ; the Free Software Foundation; either version 2 of the License, or
 ; (at your option) any later version.
-; 
+;
 ; This program is distributed in the hope that it will be useful,
 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ; GNU General Public License for more details.
-; 
+;
 ; You should have received a copy of the GNU General Public License
 ; along with this program; if not, write to the Free Software
 ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
@@ -34,31 +34,27 @@
 
 (define (script-fu-selection-to-anim-image image drawable copies bgfill filter-all)
   (let* (
-         (idx 0)
-	 (draw-type (car (gimp-drawable-type-with-alpha drawable)))
-	 (image-type (car (gimp-image-base-type image)))
-	 (old-bg (car (gimp-context-get-background)))
-         (selection-bounds)
-         (select-offset-x)
-         (select-offset-y)
-         (selection-width)
-         (selection-height)
-         (from-selection)
-         (active-selection)
-         (brush-draw)
-         (draw-name)
-         (brush-image))
-
-    (set! selection-bounds (gimp-selection-bounds image))
-    (set! select-offset-x (cadr selection-bounds))
-    (set! select-offset-y (caddr selection-bounds))
-    (set! selection-width (- (cadr (cddr selection-bounds)) select-offset-x))
-    (set! selection-height (- (caddr (cddr selection-bounds)) select-offset-y)) 
+        (idx 0)
+        (draw-type (car (gimp-drawable-type-with-alpha drawable)))
+        (image-type (car (gimp-image-base-type image)))
+        (old-bg (car (gimp-context-get-background)))
+        (selection-bounds (gimp-selection-bounds image))
+        (select-offset-x (cadr selection-bounds))
+        (select-offset-y (caddr selection-bounds))
+        (selection-width (- (cadr (cddr selection-bounds)) select-offset-x))
+        (selection-height (- (caddr (cddr selection-bounds)) select-offset-y))
+        (active-selection 0)
+        (from-selection 0)
+        (brush-draw 0)
+        (draw-name "")
+        (brush-image 0)
+        )
+
 
     (gimp-image-undo-disable image)
 
     (if (= (car (gimp-selection-is-empty image)) TRUE)
-	(begin
+        (begin
           ; if the layer has no alpha select all
           (if (= (car (gimp-drawable-has-alpha drawable)) FALSE)
              (begin
@@ -68,13 +64,13 @@
                 (gimp-selection-layer-alpha drawable)
              )
           )
-	  (set! active-selection (car (gimp-selection-save image)))
-	  (set! from-selection FALSE)
-	)
-	(begin 
-	  (set! active-selection (car (gimp-selection-save image)))
-	  (set! from-selection TRUE)
-	)
+          (set! active-selection (car (gimp-selection-save image)))
+          (set! from-selection FALSE)
+        )
+        (begin
+          (set! active-selection (car (gimp-selection-save image)))
+          (set! from-selection TRUE)
+        )
     )
 
     (gimp-edit-copy drawable)
@@ -112,21 +108,18 @@
         ; of plug-in-gap-layers-run-animfilter)
         (plug-in-gap-layers-run-animfilter 0 brush-image brush-draw "plug-in-bend" 1)
     )
-)
+  )
 )
 
 (script-fu-register "script-fu-selection-to-anim-image"
-		    _"<Image>/Script-Fu/Animators/Selection to AnimImage..."
-		    "Create a multilayer image from current selection and apply any PDB Filter to all layer-copies"
-		    "Wolfgang Hofer <hof gimp org>"
-		    "Wolfgang Hofer"
-		    "2006/05/01"
-		    "RGB RGBA GRAY GRAYA"
-		    SF-IMAGE "Image" 0
-		    SF-DRAWABLE "Drawable" 0
+                   _"<Image>/Script-Fu/Animators/Selection to AnimImage..."
+                    "Create a multilayer image from current selection and apply any PDB Filter to all layer-copies"
+                    "Wolfgang Hofer <hof gimp org>"
+                    "Wolfgang Hofer"
+                    "2006/05/01"
+                    "RGB RGBA GRAY GRAYA"
+                    SF-IMAGE "Image" 0
+                    SF-DRAWABLE "Drawable" 0
                     SF-ADJUSTMENT _"Number of Copies"           '(10 1 1024 1 10 0 1)
                     SF-TOGGLE     _"Fill with BG Color"         TRUE
                     SF-TOGGLE     _"Anim-Filter for all Copies" TRUE)
-
-
-



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]