Commit 176773dc authored by Kevin Cozens's avatar Kevin Cozens

Second stage in removing use of deprecated functions in Script-Fu scripts

Applied most of the mega patch from br0cc0li (see bug #647834) with
additional de-tabbing and changes in whitespace.
parent 0bd1c2f0
......@@ -33,8 +33,12 @@
aa
feather
frad)
(gimp-ellipse-select img (- cx rx) (- cy ry) (+ rx rx) (+ ry ry)
op aa feather frad)
(gimp-context-push)
(gimp-context-set-antialias aa)
(gimp-context-set-feather feather)
(gimp-context-set-feather-radius frad frad)
(gimp-image-select-ellipse img op (- cx rx) (- cy ry) (+ rx rx) (+ ry ry))
(gimp-context-pop)
)
(define (use-tile img
......
......@@ -108,6 +108,8 @@
_"Border Layer" 100 NORMAL-MODE))))
(gimp-context-push)
(gimp-context-set-antialias FALSE)
(gimp-context-set-feather FALSE)
(gimp-image-undo-group-start img)
......@@ -121,41 +123,29 @@
(gimp-drawable-fill layer TRANSPARENT-FILL)
(gimp-context-set-background (adjcolour colour dvalue))
(gimp-free-select img
10
(gen_top_array xsize ysize owidth oheight width height)
CHANNEL-OP-REPLACE
0
0
0.0)
(gimp-image-select-polygon img
CHANNEL-OP-REPLACE
10
(gen_top_array xsize ysize owidth oheight width height))
(gimp-edit-fill layer BACKGROUND-FILL)
(gimp-context-set-background (adjcolour colour (/ dvalue 2)))
(gimp-free-select img
10
(gen_left_array xsize ysize owidth oheight width height)
CHANNEL-OP-REPLACE
0
0
0.0)
(gimp-image-select-polygon img
CHANNEL-OP-REPLACE
10
(gen_left_array xsize ysize owidth oheight width height))
(gimp-edit-fill layer BACKGROUND-FILL)
(gimp-context-set-background (adjcolour colour (- 0 (/ dvalue 2))))
(gimp-free-select img
10
(gen_right_array xsize ysize owidth oheight width height)
CHANNEL-OP-REPLACE
0
0
0.0)
(gimp-image-select-polygon img
CHANNEL-OP-REPLACE
10
(gen_right_array xsize ysize owidth oheight width height))
(gimp-edit-fill layer BACKGROUND-FILL)
(gimp-context-set-background (adjcolour colour (- 0 dvalue)))
(gimp-free-select img
10
(gen_bottom_array xsize ysize owidth oheight width height)
CHANNEL-OP-REPLACE
0
0
0.0)
(gimp-image-select-polygon img
CHANNEL-OP-REPLACE
10
(gen_bottom_array xsize ysize owidth oheight width height))
(gimp-edit-fill layer BACKGROUND-FILL)
(gimp-selection-none img)
......
......@@ -128,6 +128,8 @@
)
(gimp-context-push)
(gimp-context-set-antialias TRUE)
(gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
;(gimp-image-resize img (+ length height) (+ height height) 0 0)
......@@ -138,7 +140,7 @@
(gimp-edit-clear glow-layer)
(gimp-edit-clear ruler-layer)
(gimp-free-select img 6 big-arrow CHANNEL-OP-REPLACE TRUE FALSE 0)
(gimp-image-select-polygon img CHANNEL-OP-REPLACE 6 big-arrow)
(gimp-context-set-foreground '(103 103 103))
(gimp-context-set-background '(0 0 0))
......
......@@ -39,6 +39,7 @@
)
(gimp-context-push)
(gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
(gimp-image-resize img (+ length height) (+ height height) 0 0)
......@@ -52,9 +53,9 @@
(gimp-edit-clear glow-layer)
(gimp-edit-clear ruler-layer)
(gimp-rect-select img
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE
(/ height 2) (/ height 2)
length height CHANNEL-OP-REPLACE FALSE 0)
length height)
(gimp-context-set-foreground '(79 79 79))
(gimp-context-set-background '(0 0 0))
......
......@@ -24,8 +24,12 @@
flatten)
(define (center-ellipse img cx cy rx ry op aa feather frad)
(gimp-ellipse-select img (- cx rx) (- cy ry) (+ rx rx) (+ ry ry)
op aa feather frad)
(gimp-context-push)
(gimp-context-set-antialias aa)
(gimp-context-set-feather feather)
(gimp-context-set-feather-radius frad frad)
(gimp-image-select-ellipse img op (- cx rx) (- cy ry) (+ rx rx) (+ ry ry))
(gimp-context-pop)
)
......
......@@ -85,6 +85,7 @@
)
(gimp-context-push)
(gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
......@@ -101,7 +102,7 @@
(gimp-image-insert-layer img button-layer 0 -1)
(gimp-layer-set-offsets button-layer (/ glow-radius 2) (/ glow-radius 2))
(gimp-selection-none img)
(gimp-rect-select img 0 0 img-width img-height CHANNEL-OP-REPLACE FALSE 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 img-width img-height)
(gimp-context-set-foreground '(100 100 100))
(gimp-context-set-background '(0 0 0))
......@@ -112,12 +113,12 @@
(gimp-edit-clear glow-layer)
(gimp-rect-select img
(gimp-image-select-rectangle img
CHANNEL-OP-REPLACE
(/ glow-radius 4)
(/ glow-radius 4)
(- img-width (/ glow-radius 2))
(- img-height (/ glow-radius 2))
CHANNEL-OP-REPLACE FALSE 0 )
(- img-height (/ glow-radius 2)))
(gimp-context-set-foreground glow-color)
(gimp-edit-fill glow-layer FOREGROUND-FILL)
......
......@@ -20,6 +20,8 @@
)
(gimp-context-push)
(gimp-context-set-antialias TRUE)
(gimp-context-set-feather FALSE)
(gimp-selection-none img)
(script-fu-util-image-resize-from-layer img logo-layer)
......@@ -28,7 +30,7 @@
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill bg-layer BACKGROUND-FILL)
(gimp-edit-clear glow-layer)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-selection-grow img grow)
(gimp-selection-feather img feather)
(gimp-context-set-foreground glow-color)
......
......@@ -54,7 +54,7 @@
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill bands-layer BACKGROUND-FILL)
; The text layer is never shown: it is only used to create a selection
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-context-set-foreground '(255 255 255))
(gimp-edit-fill bands-layer FOREGROUND-FILL)
......@@ -74,7 +74,7 @@
(let ((bands-layer-mask (car (gimp-layer-create-mask bands-layer
ADD-BLACK-MASK))))
(gimp-layer-add-mask bands-layer bands-layer-mask)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-selection-border img fade-size)
(gimp-edit-fill bands-layer-mask FOREGROUND-FILL)
(gimp-layer-remove-mask bands-layer MASK-APPLY)))
......
......@@ -23,7 +23,7 @@
(gimp-context-set-background bg-color)
(gimp-edit-fill bg-layer BACKGROUND-FILL)
(gimp-edit-clear shadow-layer)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-context-set-background '(0 0 0))
(gimp-selection-feather img 7.5)
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
......
......@@ -44,7 +44,7 @@
(gimp-edit-fill highlight-layer FOREGROUND-FILL)
(gimp-context-set-background bg-color)
(gimp-drawable-fill bg-layer BACKGROUND-FILL)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-context-set-background '(0 0 0))
(gimp-selection-feather img 7.5)
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
......
......@@ -81,7 +81,7 @@
)
(gimp-context-push)
(gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
; Create bumpmap layer
......@@ -91,16 +91,16 @@
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-rect-select img 0 0 bevel-width img-height CHANNEL-OP-REPLACE FALSE 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 bevel-width img-height)
(blend-bumpmap img bumpmap 0 0 (- bevel-width 1) 0)
(gimp-rect-select img 0 0 img-width bevel-width CHANNEL-OP-REPLACE FALSE 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 img-width bevel-width)
(blend-bumpmap img bumpmap 0 0 0 (- bevel-width 1))
(gimp-rect-select img (- img-width bevel-width) 0 bevel-width img-height CHANNEL-OP-REPLACE FALSE 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE (- img-width bevel-width) 0 bevel-width img-height)
(blend-bumpmap img bumpmap (- img-width 1) 0 (- img-width bevel-width) 0)
(gimp-rect-select img 0 (- img-height bevel-width) img-width bevel-width CHANNEL-OP-REPLACE FALSE 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 (- img-height bevel-width) img-width bevel-width)
(blend-bumpmap img bumpmap 0 (- img-height 1) 0 (- img-height bevel-width))
(gimp-selection-none img)
......
......@@ -83,6 +83,8 @@
)
(gimp-context-push)
(gimp-context-set-antialias TRUE)
(gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
(gimp-image-insert-layer img background 0 -1)
......@@ -100,19 +102,19 @@
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-context-set-background '(127 127 127))
(gimp-rect-select img 1 1 (- size 2) (- size 2) CHANNEL-OP-REPLACE FALSE 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 1 1 (- size 2) (- size 2))
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-context-set-background '(255 255 255))
(gimp-rect-select img 2 2 (- size 4) (- size 4) CHANNEL-OP-REPLACE FALSE 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 2 2 (- size 4) (- size 4))
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-context-set-background '(127 127 127))
(gimp-free-select img 6 big-arrow CHANNEL-OP-REPLACE TRUE FALSE 0)
(gimp-image-select-polygon img CHANNEL-OP-REPLACE 6 big-arrow)
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-context-set-background '(0 0 0))
(gimp-free-select img 6 med-arrow CHANNEL-OP-REPLACE TRUE FALSE 0)
(gimp-image-select-polygon img CHANNEL-OP-REPLACE 6 med-arrow)
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-selection-none img)
......@@ -127,7 +129,7 @@
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-context-set-background '(192 192 192))
(gimp-free-select img 6 small-arrow CHANNEL-OP-REPLACE TRUE FALSE 0)
(gimp-image-select-polygon img CHANNEL-OP-REPLACE 6 small-arrow)
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-selection-none img)
......
......@@ -27,6 +27,8 @@
)
(gimp-context-push)
(gimp-context-set-antialias TRUE)
(gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
(gimp-image-insert-layer img background 0 -1)
......@@ -44,11 +46,11 @@
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-context-set-background '(127 127 127))
(gimp-ellipse-select img 1 1 (- diameter 2) (- diameter 2) CHANNEL-OP-REPLACE TRUE FALSE 0)
(gimp-image-select-ellipse img CHANNEL-OP-REPLACE 1 1 (- diameter 2) (- diameter 2))
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-context-set-background '(255 255 255))
(gimp-ellipse-select img 2 2 (- diameter 4) (- diameter 4) CHANNEL-OP-REPLACE TRUE FALSE 0)
(gimp-image-select-ellipse img CHANNEL-OP-REPLACE 2 2 (- diameter 4) (- diameter 4))
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-selection-none img)
......@@ -60,7 +62,7 @@
; Background
(gimp-context-set-background '(0 0 0))
(gimp-ellipse-select img 0 0 diameter diameter CHANNEL-OP-REPLACE TRUE FALSE 0)
(gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 diameter diameter)
(gimp-selection-invert img)
(gimp-edit-clear background)
(gimp-selection-none img)
......
......@@ -61,6 +61,7 @@
)
(gimp-context-push)
(gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
(gimp-image-insert-layer img background 0 1)
......@@ -78,11 +79,11 @@
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-context-set-background '(127 127 127))
(gimp-rect-select img 1 1 (- width 2) (- height 2) CHANNEL-OP-REPLACE FALSE 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 1 1 (- width 2) (- height 2))
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-context-set-background '(255 255 255))
(gimp-rect-select img 2 2 (- width 4) (- height 4) CHANNEL-OP-REPLACE FALSE 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 2 2 (- width 4) (- height 4))
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-selection-none img)
......
......@@ -31,6 +31,7 @@
)
(gimp-context-push)
(gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
(gimp-image-insert-layer img background 0 -1)
......@@ -48,11 +49,11 @@
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-context-set-background '(127 127 127))
(gimp-rect-select img 1 1 (- width 2) (- height 2) CHANNEL-OP-REPLACE FALSE 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 1 1 (- width 2) (- height 2))
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-context-set-background '(255 255 255))
(gimp-rect-select img 2 2 (- width 4) (- height 4) CHANNEL-OP-REPLACE FALSE 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 2 2 (- width 4) (- height 4))
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-selection-none img)
......
......@@ -52,10 +52,13 @@
(gimp-edit-clear blend-layer)
(gimp-context-set-background bg-color)
(gimp-drawable-fill shadow-layer BACKGROUND-FILL)
(gimp-rect-select img b-size-2 b-size-2 (- width b-size) (- height b-size) CHANNEL-OP-REPLACE TRUE b-size-2)
(gimp-context-set-feather TRUE)
(gimp-context-set-feather-radius b-size-2 b-size-2)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE b-size-2 b-size-2 (- width b-size) (- height b-size))
(gimp-context-set-feather FALSE)
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-layer-add-mask text-shadow-layer tsl-layer-mask)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill tsl-layer-mask BACKGROUND-FILL)
......@@ -85,7 +88,7 @@
(gimp-layer-translate blend-layer (- b-size) (- b-size))
(gimp-layer-translate text-shadow-layer (- ts-size) (- ts-size))
(gimp-layer-translate drop-shadow-layer ds-size ds-size)
(gimp-selection-layer-alpha blend-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE blend-layer)
(gimp-layer-add-mask drop-shadow-layer dsl-layer-mask)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill dsl-layer-mask BACKGROUND-FILL)
......@@ -159,6 +162,8 @@
(text-layer (car (gimp-text-fontname img -1 0 0 text b-size TRUE size PIXELS font)))
)
(gimp-context-push)
(gimp-context-set-antialias TRUE)
(gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
(gimp-context-set-foreground text-color)
......
......@@ -52,7 +52,7 @@
(gimp-context-set-background '(191 191 191))
(gimp-selection-none img)
(gimp-layer-set-lock-alpha blur-layer FALSE)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-edit-fill blur-layer BACKGROUND-FILL)
(plug-in-gauss-rle RUN-NONINTERACTIVE img blur-layer 5.0 1 1)
(gimp-selection-none img)
......
......@@ -55,6 +55,7 @@
;--- main program structure starts here, begin of "if-1"
(begin
(gimp-context-push)
(gimp-context-set-feather FALSE)
(set! img (car (gimp-image-duplicate org-img)))
(gimp-image-undo-disable img)
......@@ -93,18 +94,18 @@
(set! bl-y-off (cadr (gimp-drawable-offsets bl-layer)))
;--- select a rectangular area to blend
(gimp-rect-select img bl-x-off bl-y-off bl-width bl-height CHANNEL-OP-REPLACE 0 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE bl-x-off bl-y-off bl-width bl-height)
;--- select at least 1 pixel!
(gimp-rect-select img bl-x-off bl-y-off (+ bl-width 1) bl-height CHANNEL-OP-ADD 0 0)
(gimp-image-select-rectangle img CHANNEL-OP-ADD bl-x-off bl-y-off (+ bl-width 1) bl-height)
(if (= fadeout FALSE)
(begin
(set! nofadeout-bl-x-off (car (gimp-drawable-offsets bl-layer)))
(set! nofadeout-bl-width (+ nofadeout-bl-x-off bl-x))
(set! nofadeout-bl-width (max nofadeout-bl-width 1))
(gimp-rect-select img nofadeout-bl-x-off bl-y-off
nofadeout-bl-width bl-height
CHANNEL-OP-REPLACE 0 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE
nofadeout-bl-x-off bl-y-off
nofadeout-bl-width bl-height)
)
)
......
......@@ -32,6 +32,7 @@
)
(gimp-context-push)
(gimp-context-set-feather FALSE)
(gimp-selection-none img)
(script-fu-util-image-resize-from-layer img logo-layer)
......@@ -54,7 +55,7 @@
; work-around for sobel edge detect screw-up (why does this happen?)
; the top line of the image has some garbage instead of the bgcolor
(gimp-rect-select img 0 0 width 1 CHANNEL-OP-ADD FALSE 0)
(gimp-image-select-rectangle img CHANNEL-OP-ADD 0 0 width 1)
(gimp-edit-clear logo-layer)
)
......
......@@ -72,7 +72,7 @@
(gimp-selection-all img)
(gimp-edit-clear bump-layer)
(gimp-selection-none img)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-edit-fill bump-layer BACKGROUND-FILL)
(gimp-edit-bucket-fill logo-layer
PATTERN-BUCKET-FILL NORMAL-MODE 100 255 FALSE 1 1)
......@@ -80,7 +80,7 @@
(gimp-layer-set-lock-alpha bump-layer FALSE)
(plug-in-spread RUN-NONINTERACTIVE img bump-layer spread-amount spread-amount)
(gimp-selection-layer-alpha bump-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE bump-layer)
(plug-in-gauss-rle RUN-NONINTERACTIVE img bump-layer blur-amount TRUE TRUE)
(gimp-selection-none img)
......@@ -98,7 +98,7 @@
(gimp-selection-all img)
(gimp-edit-clear shadow-layer)
(gimp-selection-none img)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
(gimp-selection-none img)
......
......@@ -30,7 +30,7 @@
(gimp-edit-fill layer2 BACKGROUND-FILL)
(gimp-edit-fill layer3 BACKGROUND-FILL)
(gimp-edit-clear shadow)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-item-set-visible logo-layer FALSE)
(gimp-item-set-visible shadow FALSE)
(gimp-item-set-visible background FALSE)
......@@ -44,13 +44,13 @@
(gimp-selection-none img)
(set! layer1 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
; if the original image contained more than one visible layer:
(while (> (car (gimp-image-get-item-position img layer1))
(while (> (car (gimp-image-get-item-position img layer1))
(car (gimp-image-get-item-position img shadow)))
(gimp-image-raise-item img layer1)
)
(gimp-invert layer1)
(gimp-layer-add-mask layer1 layer-mask)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-context-set-background '(255 255 255))
(gimp-selection-feather img feather)
(gimp-edit-fill layer-mask BACKGROUND-FILL)
......
......@@ -26,6 +26,8 @@
)
(gimp-context-push)
(gimp-context-set-antialias TRUE)
(gimp-context-set-feather FALSE)
(gimp-image-undo-group-start theImage)
......@@ -41,10 +43,11 @@
(gimp-edit-clear theStain)
(let ((blobSize (/ (rand (- theSize 40)) (+ (rand 3) 1))))
(gimp-ellipse-select theImage
(gimp-image-select-ellipse theImage
CHANNEL-OP-REPLACE
(/ (- theSize blobSize) 2)
(/ (- theSize blobSize) 2)
blobSize blobSize CHANNEL-OP-REPLACE TRUE 0 FALSE)
blobSize blobSize)
)
(script-fu-distress-selection theImage theStain
......
......@@ -32,6 +32,9 @@
)
(gimp-context-push)
(gimp-context-set-feather FALSE)
(gimp-context-set-interpolation INTERPOLATION-NONE)
(gimp-context-set-transform-resize TRANSFORM-RESIZE-ADJUST)
(gimp-selection-none img)
(gimp-image-resize img img-width img-height posx posy)
......@@ -51,19 +54,19 @@
FALSE 0 0 TRUE
0 0 0 (+ height 5))
(gimp-rect-select img 0 (- (/ height 2) feather) img-width (* 2 feather) CHANNEL-OP-REPLACE 0 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 (- (/ height 2) feather) img-width (* 2 feather))
(plug-in-gauss-iir RUN-NONINTERACTIVE img logo-layer smear TRUE TRUE)
(gimp-selection-none img)
(plug-in-ripple RUN-NONINTERACTIVE img logo-layer period amplitude 1 0 1 TRUE FALSE)
(gimp-layer-translate logo-layer 5 5)
(gimp-layer-resize logo-layer img-width img-height 5 5)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(set! channel (car (gimp-selection-save img)))
(gimp-selection-shrink img shrink)
(gimp-selection-invert img)
(plug-in-gauss-rle RUN-NONINTERACTIVE img channel feather TRUE TRUE)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-selection-invert img)
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill channel BACKGROUND-FILL)
......@@ -71,27 +74,26 @@
(plug-in-bump-map RUN-NONINTERACTIVE img logo-layer channel 135 45 depth 0 0 0 0 FALSE FALSE 0)
(gimp-selection-layer-alpha logo-layer)
(gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(set! fs (car (gimp-selection-float shadow-layer 0 0)))
(gimp-edit-clear shadow-layer)
(gimp-drawable-transform-perspective-default fs
(gimp-item-transform-perspective fs
(+ 5 (* 0.15 height)) (- height (* 0.15 height))
(+ 5 width (* 0.15 height)) (- height (* 0.15 height))
5 height
(+ 5 width) height
FALSE FALSE)
(+ 5 width) height)
(gimp-floating-sel-anchor fs)
(plug-in-gauss-rle RUN-NONINTERACTIVE img shadow-layer smear TRUE TRUE)
(gimp-rect-select img 5 5 width height CHANNEL-OP-REPLACE FALSE 0)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 5 5 width height)
(gimp-edit-copy logo-layer)
(set! fs (car (gimp-edit-paste reflect-layer FALSE)))
(gimp-floating-sel-anchor fs)
(gimp-drawable-transform-scale-default reflect-layer
0 0 width (* 0.85 height)
FALSE FALSE)
(gimp-drawable-transform-flip-simple reflect-layer ORIENTATION-VERTICAL
TRUE 0 TRUE)
(gimp-item-transform-scale reflect-layer
0 0 width (* 0.85 height))
(gimp-context-set-transform-resize TRANSFORM-RESIZE-CLIP)
(gimp-item-transform-flip-simple reflect-layer ORIENTATION-VERTICAL
TRUE 0)
(gimp-layer-set-offsets reflect-layer 5 (+ 3 height))
(set! layer-mask (car (gimp-layer-create-mask reflect-layer ADD-WHITE-MASK)))
......
......@@ -15,14 +15,15 @@
; along with this program. If not, see <http://www.gnu.org/licenses/>.
;
;
; drop-shadow.scm version 1.04 1999/12/21
; drop-shadow.scm version 1.05 2011/4/21
;
; CHANGE-LOG:
; 1.00 - initial release
; 1.01 - fixed the problem with a remaining copy of the selection
; 1.02 - some code cleanup, no real changes
; 1.03 - can't call gimp-edit-fill until layer is added to image!
;
; 1.04
; 1.05 - replaced deprecated function calls with new ones for 2.8
;
; Copyright (C) 1997-1999 Sven Neumann <sven@gimp.org>
;
......@@ -63,7 +64,7 @@
(gimp-layer-add-alpha drawable)
(if (= (car (gimp-selection-is-empty image)) TRUE)
(begin
(gimp-selection-layer-alpha drawable)
(gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
(set! from-selection FALSE))
(begin
(set! from-selection TRUE)
......
......@@ -6,13 +6,16 @@
(position-y (cadr (gimp-drawable-offsets drawable)))
)
(gimp-context-push)
(gimp-context-set-feather FALSE)
(gimp-image-undo-group-start img)
(letrec ((loop (lambda (i max)
(if (< i max)
(begin
(if (= orientation 0)
(gimp-rect-select img position-x (+ i position-y) width 1 CHANNEL-OP-REPLACE FALSE 0)
(gimp-rect-select img (+ i position-x) position-y 1 height CHANNEL-OP-REPLACE FALSE 0))
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE position-x (+ i position-y) width 1)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE (+ i position-x) position-y 1 height))
(if (= type 0)
(gimp-edit-clear drawable)
(gimp-edit-fill drawable BACKGROUND-FILL))
......@@ -27,6 +30,7 @@
)
(gimp-selection-none img)
(gimp-image-undo-group-end img)
(gimp-context-pop)
(gimp-displays-flush)
)
)
......
......@@ -17,20 +17,20 @@
(width (+ (car (gimp-drawable-width logo-layer)) border))
(height (+ (car (gimp-drawable-height logo-layer)) border))