script-fu: port all scripts to the new gimp-drawable-edit functions

This commit is contained in:
Michael Natterer
2018-04-16 20:12:12 +02:00
parent 90ef8b123c
commit 233ac80de1
27 changed files with 161 additions and 128 deletions

View File

@ -121,15 +121,13 @@
(set! greyness (/ (* index 255) thickness)) (set! greyness (/ (* index 255) thickness))
(gimp-context-set-background (list greyness greyness greyness)) (gimp-context-set-background (list greyness greyness greyness))
;(gimp-selection-feather image 1) ;Stop the slopey jaggies? ;(gimp-selection-feather image 1) ;Stop the slopey jaggies?
(gimp-edit-bucket-fill bump-layer BUCKET-FILL-BG LAYER-MODE-NORMAL (gimp-drawable-edit-fill bump-layer FILL-BACKGROUND)
100 0 FALSE 0 0)
(gimp-selection-shrink image 1) (gimp-selection-shrink image 1)
(set! index (+ index 1)) (set! index (+ index 1))
) )
; Now the white interior ; Now the white interior
(gimp-context-set-background '(255 255 255)) (gimp-context-set-background '(255 255 255))
(gimp-edit-bucket-fill bump-layer BUCKET-FILL-BG LAYER-MODE-NORMAL (gimp-drawable-edit-fill bump-layer FILL-BACKGROUND)
100 0 FALSE 0 0)
;------------------------------------------------------------ ;------------------------------------------------------------
; ;

View File

@ -108,6 +108,8 @@
_"Border Layer" 100 LAYER-MODE-NORMAL)))) _"Border Layer" 100 LAYER-MODE-NORMAL))))
(gimp-context-push) (gimp-context-push)
(gimp-context-set-paint-mode LAYER-MODE-NORMAL)
(gimp-context-set-opacity 100.0)
(gimp-context-set-antialias FALSE) (gimp-context-set-antialias FALSE)
(gimp-context-set-feather FALSE) (gimp-context-set-feather FALSE)
@ -127,27 +129,27 @@
CHANNEL-OP-REPLACE CHANNEL-OP-REPLACE
10 10
(gen_top_array xsize ysize owidth oheight width height)) (gen_top_array xsize ysize owidth oheight width height))
(gimp-edit-fill layer FILL-BACKGROUND) (gimp-drawable-edit-fill layer FILL-BACKGROUND)
(gimp-context-set-background (adjcolor color (/ dvalue 2))) (gimp-context-set-background (adjcolor color (/ dvalue 2)))
(gimp-image-select-polygon img (gimp-image-select-polygon img
CHANNEL-OP-REPLACE CHANNEL-OP-REPLACE
10 10
(gen_left_array xsize ysize owidth oheight width height)) (gen_left_array xsize ysize owidth oheight width height))
(gimp-edit-fill layer FILL-BACKGROUND) (gimp-drawable-edit-fill layer FILL-BACKGROUND)
(gimp-context-set-background (adjcolor color (- 0 (/ dvalue 2)))) (gimp-context-set-background (adjcolor color (- 0 (/ dvalue 2))))
(gimp-image-select-polygon img (gimp-image-select-polygon img
CHANNEL-OP-REPLACE CHANNEL-OP-REPLACE
10 10
(gen_right_array xsize ysize owidth oheight width height)) (gen_right_array xsize ysize owidth oheight width height))
(gimp-edit-fill layer FILL-BACKGROUND) (gimp-drawable-edit-fill layer FILL-BACKGROUND)
(gimp-context-set-background (adjcolor color (- 0 dvalue))) (gimp-context-set-background (adjcolor color (- 0 dvalue)))
(gimp-image-select-polygon img (gimp-image-select-polygon img
CHANNEL-OP-REPLACE CHANNEL-OP-REPLACE
10 10
(gen_bottom_array xsize ysize owidth oheight width height)) (gen_bottom_array xsize ysize owidth oheight width height))
(gimp-edit-fill layer FILL-BACKGROUND) (gimp-drawableedit-fill layer FILL-BACKGROUND)
(gimp-selection-none img) (gimp-selection-none img)
(gimp-image-undo-group-end img) (gimp-image-undo-group-end img)
(gimp-displays-flush) (gimp-displays-flush)

View File

@ -115,18 +115,20 @@
(if (= fadeout TRUE) (if (= fadeout TRUE)
(begin (begin
; blend with 20% offset to get less transparency in the front ; blend with 20% offset to get less transparency in the front
(gimp-edit-blend bl-mask BLEND-FG-BG-RGB LAYER-MODE-NORMAL (gimp-context-set-gradient-fg-bg-rgb)
GRADIENT-LINEAR 100 20 REPEAT-NONE FALSE (gimp-drawable_edit-gradient-fill bl-mask
FALSE 0 0 TRUE GRADIENT-LINEAR 20
(+ bl-x-off bl-width) 0 bl-x-off 0) FALSE 0 0
TRUE
(+ bl-x-off bl-width) 0
bl-x-off 0)
) )
) )
(if (= fadeout FALSE) (if (= fadeout FALSE)
(begin (begin
(gimp-context-set-foreground '(255 255 255)) (gimp-context-set-foreground '(255 255 255))
(gimp-edit-bucket-fill bl-mask BUCKET-FILL-FG LAYER-MODE-NORMAL (gimp-drawable-edit-fill bl-mask FILL-FOREGROUND)
100 255 0 0 0)
) )
) )
@ -140,28 +142,31 @@
(gimp-drawable-brightness-contrast bl-layer 0.787 0) (gimp-drawable-brightness-contrast bl-layer 0.787 0)
) )
;--- blend glow color inside the letters ;--- blend glow color inside the letters
(gimp-context-set-foreground glow-color) (gimp-context-set-foreground glow-color)
(gimp-edit-blend bl-layer BLEND-FG-TRANSPARENT LAYER-MODE-NORMAL (gimp-context-set-gradient-fg-transparent)
GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE (gimp-drawable-edit-gradient-fill bl-layer
FALSE 0 0 TRUE GRADIENT-LINEAR 0
(+ bl-x-off bl-width) 0 FALSE 0 0
(- (+ bl-x-off bl-width) after-glow) 0) TRUE
(+ bl-x-off bl-width) 0
(- (+ bl-x-off bl-width) after-glow) 0)
;--- add corona effect ;--- add corona effect
(gimp-image-select-item img CHANNEL-OP-REPLACE bl-layer) (gimp-image-select-item img CHANNEL-OP-REPLACE bl-layer)
(gimp-selection-sharpen img) (gimp-selection-sharpen img)
(gimp-selection-grow img corona-width) (gimp-selection-grow img corona-width)
(gimp-layer-set-lock-alpha bl-layer FALSE) (gimp-layer-set-lock-alpha bl-layer FALSE)
(gimp-selection-feather img corona-width) (gimp-selection-feather img corona-width)
(gimp-context-set-foreground glow-color) (gimp-context-set-foreground glow-color)
(gimp-edit-blend bl-layer BLEND-FG-TRANSPARENT LAYER-MODE-NORMAL (gimp-drawable-edit-gradient-fill bl-layer
GRADIENT-LINEAR 100 0 REPEAT-NONE FALSE GRADIENT-LINEAR 0
FALSE 0 0 TRUE FALSE 0 0
(- (+ bl-x-off bl-width) corona-width) 0 TRUE
(- (+ bl-x-off bl-width) after-glow) 0) (- (+ bl-x-off bl-width) corona-width) 0
) (- (+ bl-x-off bl-width) after-glow) 0)
) )
)
;--- merge with bg layer ;--- merge with bg layer
(set! bg-layer (car (gimp-layer-copy bg-source-layer FALSE))) (set! bg-layer (car (gimp-layer-copy bg-source-layer FALSE)))

View File

@ -31,7 +31,7 @@
(define (copy-layer-carve-it dest-image dest-drawable source-image source-drawable) (define (copy-layer-carve-it dest-image dest-drawable source-image source-drawable)
(gimp-selection-all dest-image) (gimp-selection-all dest-image)
(gimp-edit-clear dest-drawable) (gimp-drawable-edit-clear dest-drawable)
(gimp-selection-none dest-image) (gimp-selection-none dest-image)
(gimp-selection-all source-image) (gimp-selection-all source-image)
(gimp-edit-copy source-drawable) (gimp-edit-copy source-drawable)
@ -84,7 +84,7 @@
(gimp-image-insert-layer img layer1 0 0) (gimp-image-insert-layer img layer1 0 0)
(gimp-selection-all img) (gimp-selection-all img)
(gimp-edit-clear layer1) (gimp-drawable-edit-clear layer1)
(gimp-selection-none img) (gimp-selection-none img)
(copy-layer-carve-it img layer1 bg-image bg-layer) (copy-layer-carve-it img layer1 bg-image bg-layer)
@ -102,7 +102,7 @@
(gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat) (gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat)
(gimp-context-set-brush (carve-brush brush-size)) (gimp-context-set-brush (carve-brush brush-size))
(gimp-context-set-foreground '(255 255 255)) (gimp-context-set-foreground '(255 255 255))
(gimp-edit-stroke mask-fat) (gimp-drawable-edit-stroke-selection mask-fat)
(gimp-selection-none img) (gimp-selection-none img)
(set! mask-emboss (car (gimp-channel-copy mask-fat))) (set! mask-emboss (car (gimp-channel-copy mask-fat)))
@ -113,9 +113,9 @@
(gimp-context-set-background '(180 180 180)) (gimp-context-set-background '(180 180 180))
(gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat) (gimp-image-select-item img CHANNEL-OP-REPLACE mask-fat)
(gimp-selection-invert img) (gimp-selection-invert img)
(gimp-edit-fill mask-emboss FILL-BACKGROUND) (gimp-drawable-edit-fill mask-emboss FILL-BACKGROUND)
(gimp-image-select-item img CHANNEL-OP-REPLACE mask) (gimp-image-select-item img CHANNEL-OP-REPLACE mask)
(gimp-edit-fill mask-emboss FILL-BACKGROUND) (gimp-drawable-edit-fill mask-emboss FILL-BACKGROUND)
(gimp-selection-none img) (gimp-selection-none img)
(set! mask-highlight (car (gimp-channel-copy mask-emboss))) (set! mask-highlight (car (gimp-channel-copy mask-emboss)))
@ -147,7 +147,7 @@
(gimp-layer-add-mask cast-shadow-layer csl-mask) (gimp-layer-add-mask cast-shadow-layer csl-mask)
(gimp-image-select-item img CHANNEL-OP-REPLACE mask) (gimp-image-select-item img CHANNEL-OP-REPLACE mask)
(gimp-context-set-background '(255 255 255)) (gimp-context-set-background '(255 255 255))
(gimp-edit-fill csl-mask FILL-BACKGROUND) (gimp-drawable-edit-fill csl-mask FILL-BACKGROUND)
(set! inset-layer (car (gimp-layer-copy layer1 TRUE))) (set! inset-layer (car (gimp-layer-copy layer1 TRUE)))
(gimp-image-insert-layer img inset-layer 0 1) (gimp-image-insert-layer img inset-layer 0 1)
@ -156,7 +156,7 @@
(gimp-layer-add-mask inset-layer il-mask) (gimp-layer-add-mask inset-layer il-mask)
(gimp-image-select-item img CHANNEL-OP-REPLACE mask) (gimp-image-select-item img CHANNEL-OP-REPLACE mask)
(gimp-context-set-background '(255 255 255)) (gimp-context-set-background '(255 255 255))
(gimp-edit-fill il-mask FILL-BACKGROUND) (gimp-drawable-edit-fill il-mask FILL-BACKGROUND)
(gimp-selection-none img) (gimp-selection-none img)
(gimp-selection-none bg-image) (gimp-selection-none bg-image)
(gimp-levels inset-layer 0 0 255 inset-gamma 0 255) (gimp-levels inset-layer 0 0 255 inset-gamma 0 255)

View File

@ -72,7 +72,7 @@
(define (copy-layer-chrome-it dest-image dest-drawable source-image source-drawable) (define (copy-layer-chrome-it dest-image dest-drawable source-image source-drawable)
(gimp-selection-all dest-image) (gimp-selection-all dest-image)
(gimp-edit-clear dest-drawable) (gimp-drawable-edit-clear dest-drawable)
(gimp-selection-none dest-image) (gimp-selection-none dest-image)
(gimp-selection-all source-image) (gimp-selection-all source-image)
(gimp-edit-copy source-drawable) (gimp-edit-copy source-drawable)
@ -129,9 +129,9 @@
(gimp-context-set-background '(255 255 255)) (gimp-context-set-background '(255 255 255))
(gimp-selection-none img) (gimp-selection-none img)
(gimp-edit-fill layer2 FILL-BACKGROUND) (gimp-drawable-edit-fill layer2 FILL-BACKGROUND)
(gimp-edit-fill layer3 FILL-BACKGROUND) (gimp-drawable-edit-fill layer3 FILL-BACKGROUND)
(gimp-edit-clear shadow) (gimp-drawable-edit-clear shadow)
(gimp-item-set-visible bg-layer FALSE) (gimp-item-set-visible bg-layer FALSE)
(gimp-item-set-visible shadow FALSE) (gimp-item-set-visible shadow FALSE)
@ -140,9 +140,9 @@
(gimp-context-set-background '(0 0 0)) (gimp-context-set-background '(0 0 0))
(gimp-selection-translate img offx1 offy1) (gimp-selection-translate img offx1 offy1)
(gimp-selection-feather img feather) (gimp-selection-feather img feather)
(gimp-edit-fill layer2 FILL-BACKGROUND) (gimp-drawable-edit-fill layer2 FILL-BACKGROUND)
(gimp-selection-translate img (* 2 offx2) (* 2 offy2)) (gimp-selection-translate img (* 2 offx2) (* 2 offy2))
(gimp-edit-fill layer3 FILL-BACKGROUND) (gimp-drawable-edit-fill layer3 FILL-BACKGROUND)
(gimp-selection-none img) (gimp-selection-none img)
(set! layer2 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE))) (set! layer2 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
(gimp-drawable-invert layer2 FALSE) (gimp-drawable-invert layer2 FALSE)
@ -160,22 +160,22 @@
(gimp-layer-add-mask layer1 layer-mask) (gimp-layer-add-mask layer1 layer-mask)
(gimp-image-select-item img CHANNEL-OP-REPLACE mask) (gimp-image-select-item img CHANNEL-OP-REPLACE mask)
(gimp-context-set-background '(255 255 255)) (gimp-context-set-background '(255 255 255))
(gimp-edit-fill layer-mask FILL-BACKGROUND) (gimp-drawable-edit-fill layer-mask FILL-BACKGROUND)
(set! layer2 (car (gimp-layer-copy layer1 TRUE))) (set! layer2 (car (gimp-layer-copy layer1 TRUE)))
(gimp-image-insert-layer img layer2 0 0) (gimp-image-insert-layer img layer2 0 0)
(gimp-context-set-brush (brush brush-size)) (gimp-context-set-brush (brush brush-size))
(gimp-context-set-foreground '(255 255 255)) (gimp-context-set-foreground '(255 255 255))
(gimp-edit-stroke layer-mask) (gimp-drawable-edit-stroke-selection layer-mask)
(gimp-context-set-background '(0 0 0)) (gimp-context-set-background '(0 0 0))
(gimp-selection-feather img (* feather 1.5)) (gimp-selection-feather img (* feather 1.5))
(gimp-selection-translate img (* 2.5 offx1) (* 2.5 offy1)) (gimp-selection-translate img (* 2.5 offx1) (* 2.5 offy1))
(gimp-edit-fill shadow FILL-BACKGROUND) (gimp-drawable-edit-fill shadow FILL-BACKGROUND)
(gimp-selection-all img) (gimp-selection-all img)
(gimp-context-set-pattern "Marble #1") (gimp-context-set-pattern "Marble #1")
(gimp-edit-bucket-fill bg-layer BUCKET-FILL-PATTERN LAYER-MODE-NORMAL 100 0 FALSE 0 0) (gimp-drawable-edit-fill bg-layer FILL-PATTERN)
(gimp-selection-none img) (gimp-selection-none img)
(gimp-image-convert-rgb img) (gimp-image-convert-rgb img)

View File

@ -78,7 +78,7 @@
(gimp-image-insert-layer image effect-layer 0 -1) (gimp-image-insert-layer image effect-layer 0 -1)
(gimp-layer-set-offsets effect-layer select-offset-x select-offset-y) (gimp-layer-set-offsets effect-layer select-offset-x select-offset-y)
(gimp-selection-none image) (gimp-selection-none image)
(gimp-edit-clear effect-layer) (gimp-drawable-edit-clear effect-layer)
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection) (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
(gimp-edit-copy drawable) (gimp-edit-copy drawable)
@ -107,7 +107,7 @@
(= separate-layer TRUE)) (= separate-layer TRUE))
(begin (begin
(gimp-image-select-color image CHANNEL-OP-REPLACE active-layer '(0 0 0)) (gimp-image-select-color image CHANNEL-OP-REPLACE active-layer '(0 0 0))
(gimp-edit-clear active-layer))) (gimp-drawable-edit-clear active-layer)))
(if (= keep-selection FALSE) (if (= keep-selection FALSE)
(gimp-selection-none image)) (gimp-selection-none image))

View File

@ -16,13 +16,14 @@
) )
(gimp-context-push) (gimp-context-push)
(gimp-context-set-defaults)
(gimp-image-undo-disable img) (gimp-image-undo-disable img)
(gimp-image-insert-layer img layer-one 0 0) (gimp-image-insert-layer img layer-one 0 0)
(gimp-context-set-background '(255 255 255)) (gimp-context-set-background '(255 255 255))
(gimp-edit-fill layer-one FILL-BACKGROUND) (gimp-drawable-edit-fill layer-one FILL-BACKGROUND)
(plug-in-noisify RUN-NONINTERACTIVE img layer-one FALSE 0.7 0.7 0.7 0.7) (plug-in-noisify RUN-NONINTERACTIVE img layer-one FALSE 0.7 0.7 0.7 0.7)

View File

@ -39,26 +39,27 @@
(gimp-image-insert-layer theImage theStain 0 0) (gimp-image-insert-layer theImage theStain 0 0)
(gimp-selection-all theImage) (gimp-selection-all theImage)
(gimp-edit-clear theStain) (gimp-drawable-edit-clear theStain)
(let ((blobSize (/ (rand (- theSize 40)) (+ (rand 3) 1)))) (let ((blobSize (/ (rand (- theSize 40)) (+ (rand 3) 1))))
(gimp-image-select-ellipse theImage (gimp-image-select-ellipse theImage
CHANNEL-OP-REPLACE CHANNEL-OP-REPLACE
(/ (- theSize blobSize) 2) (/ (- theSize blobSize) 2)
(/ (- theSize blobSize) 2) (/ (- theSize blobSize) 2)
blobSize blobSize) blobSize blobSize)
) )
(script-fu-distress-selection theImage theStain (script-fu-distress-selection theImage theStain
(* (+ (rand 15) 1) (+ (rand 15) 1)) (- (* (+ (rand 15) 1) (+ (rand 15) 1)) 1)
(/ theSize 25) 4 2 TRUE TRUE) (/ theSize 25) 4 2 TRUE TRUE)
(gimp-context-set-gradient "Coffee") (gimp-context-set-gradient "Coffee")
(gimp-edit-blend theStain BLEND-CUSTOM LAYER-MODE-NORMAL (gimp-drawable-edit-gradient-fill theStain
GRADIENT-SHAPEBURST-DIMPLED 100 0 REPEAT-NONE FALSE GRADIENT-SHAPEBURST-DIMPLED 0
FALSE 0 0 TRUE FALSE 0 0
0 0 0 0) TRUE
0 0 0 0)
(gimp-layer-set-offsets theStain (gimp-layer-set-offsets theStain
(- (rand theWidth) (/ theSize 2)) (- (rand theWidth) (/ theSize 2))

View File

@ -57,13 +57,13 @@
(gimp-image-insert-layer theImage theLayer 0 0) (gimp-image-insert-layer theImage theLayer 0 0)
(if (= FALSE (car (gimp-selection-is-empty theImage))) (if (= FALSE (car (gimp-selection-is-empty theImage)))
(gimp-edit-fill theLayer FILL-BACKGROUND) (gimp-drawable-edit-fill theLayer FILL-BACKGROUND)
) )
(gimp-selection-invert theImage) (gimp-selection-invert theImage)
(if (= FALSE (car (gimp-selection-is-empty theImage))) (if (= FALSE (car (gimp-selection-is-empty theImage)))
(gimp-edit-clear theLayer) (gimp-drawable-edit-clear theLayer)
) )
(gimp-selection-invert theImage) (gimp-selection-invert theImage)

View File

@ -21,7 +21,7 @@
; 1.00 - initial release ; 1.00 - initial release
; 1.01 - fixed the problem with a remaining copy of the selection ; 1.01 - fixed the problem with a remaining copy of the selection
; 1.02 - some code cleanup, no real changes ; 1.02 - some code cleanup, no real changes
; 1.03 - can't call gimp-edit-fill until layer is added to image! ; 1.03 - can't call gimp-drawable-edit-fill until layer is added to image!
; 1.04 ; 1.04
; 1.05 - replaced deprecated function calls with new ones for 2.8 ; 1.05 - replaced deprecated function calls with new ones for 2.8
; ;
@ -136,7 +136,7 @@
(gimp-drawable-fill shadow-layer FILL-TRANSPARENT) (gimp-drawable-fill shadow-layer FILL-TRANSPARENT)
(gimp-context-set-background shadow-color) (gimp-context-set-background shadow-color)
(gimp-edit-fill shadow-layer FILL-BACKGROUND) (gimp-drawable-edit-fill shadow-layer FILL-BACKGROUND)
(gimp-selection-none image) (gimp-selection-none image)
(gimp-layer-set-lock-alpha shadow-layer FALSE) (gimp-layer-set-lock-alpha shadow-layer FALSE)
(if (>= shadow-blur 1.0) (plug-in-gauss-rle RUN-NONINTERACTIVE (if (>= shadow-blur 1.0) (plug-in-gauss-rle RUN-NONINTERACTIVE
@ -150,7 +150,7 @@
(if (= from-selection TRUE) (if (= from-selection TRUE)
(begin (begin
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection) (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
(gimp-edit-clear shadow-layer) (gimp-drawable-edit-clear shadow-layer)
(gimp-image-remove-channel image active-selection))) (gimp-image-remove-channel image active-selection)))
(if (and (if (and

View File

@ -7,6 +7,8 @@
) )
(gimp-context-push) (gimp-context-push)
(gimp-context-set-paint-mode LAYER-MODE-NORMAL)
(gimp-context-set-opacity 100.0)
(gimp-context-set-feather FALSE) (gimp-context-set-feather FALSE)
(gimp-image-undo-group-start img) (gimp-image-undo-group-start img)
@ -17,8 +19,8 @@
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE position-x (+ i position-y) width 1) (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)) (gimp-image-select-rectangle img CHANNEL-OP-REPLACE (+ i position-x) position-y 1 height))
(if (= type 0) (if (= type 0)
(gimp-edit-clear drawable) (gimp-drawable-edit-clear drawable)
(gimp-edit-fill drawable FILL-BACKGROUND)) (gimp-drawable-edit-fill drawable FILL-BACKGROUND))
(loop (+ i 2) max)))))) (loop (+ i 2) max))))))
(loop (if (= which 0) (loop (if (= which 0)
0 0

View File

@ -94,7 +94,7 @@
(gimp-context-set-foreground '(0 0 0)))) (gimp-context-set-foreground '(0 0 0))))
(gimp-image-insert-layer img drawable 0 0) (gimp-image-insert-layer img drawable 0 0)
(gimp-edit-clear drawable) (gimp-drawable-edit-clear drawable)
(if (= labels TRUE) (if (= labels TRUE)
(begin (begin
@ -103,7 +103,7 @@
GRAYA-IMAGE RGBA-IMAGE) GRAYA-IMAGE RGBA-IMAGE)
"Labels" 100 LAYER-MODE-NORMAL))) "Labels" 100 LAYER-MODE-NORMAL)))
(gimp-image-insert-layer img drawable 0 -1))) (gimp-image-insert-layer img drawable 0 -1)))
(gimp-edit-clear drawable) (gimp-drawable-edit-clear drawable)
(while (< count num-fonts) (while (< count num-fonts)
(set! font (car font-list)) (set! font (car font-list))

View File

@ -39,7 +39,7 @@
(gimp-selection-shrink inImage inSize) (gimp-selection-shrink inImage inSize)
(gimp-selection-invert inImage) (gimp-selection-invert inImage)
(gimp-context-set-background inColor) (gimp-context-set-background inColor)
(gimp-edit-fill inLayer FILL-BACKGROUND) (gimp-drawable-edit-fill inLayer FILL-BACKGROUND)
(gimp-selection-none inImage) (gimp-selection-none inImage)
) )
@ -74,7 +74,7 @@
(gimp-image-insert-layer theImage theLayer 0 0) (gimp-image-insert-layer theImage theLayer 0 0)
(gimp-edit-clear theLayer) (gimp-drawable-edit-clear theLayer)
(chris-color-edge theImage theLayer inColor inSize) (chris-color-edge theImage theLayer inColor inSize)
(gimp-layer-scale theLayer (gimp-layer-scale theLayer
@ -92,11 +92,11 @@
(gimp-image-select-item theImage CHANNEL-OP-REPLACE theLayer) (gimp-image-select-item theImage CHANNEL-OP-REPLACE theLayer)
(gimp-selection-invert theImage) (gimp-selection-invert theImage)
(gimp-edit-clear theLayer) (gimp-drawable-edit-clear theLayer)
(gimp-selection-invert theImage) (gimp-selection-invert theImage)
(gimp-edit-clear theLayer) (gimp-drawable-edit-clear theLayer)
(gimp-context-set-background inColor) (gimp-context-set-background inColor)
(gimp-edit-fill theLayer FILL-BACKGROUND) (gimp-drawable-edit-fill theLayer FILL-BACKGROUND)
(gimp-selection-none inImage) (gimp-selection-none inImage)
(chris-color-edge theImage theLayer inColor 1) (chris-color-edge theImage theLayer inColor 1)

View File

@ -47,10 +47,16 @@
; Render gradient ; Render gradient
(gimp-edit-blend drawable BLEND-CUSTOM LAYER-MODE-NORMAL (gimp-context-push)
GRADIENT-LINEAR 100 0 REPEAT-NONE gradient-reverse
FALSE 0 0 TRUE (gimp-context-set-gradient-reverse gradient-reverse)
0 0 (- width 1) 0) (gimp-drawable-edit-gradient-fill drawable
GRADIENT-LINEAR 0
FALSE 0 0
TRUE
0 0 (- width 1) 0)
(gimp-context-pop)
; Terminate ; Terminate

View File

@ -53,7 +53,7 @@
(set! grid-layer (car (gimp-layer-copy drw TRUE))) (set! grid-layer (car (gimp-layer-copy drw TRUE)))
(gimp-image-insert-layer img grid-layer 0 0) (gimp-image-insert-layer img grid-layer 0 0)
(gimp-edit-clear grid-layer) (gimp-drawable-edit-clear grid-layer)
(gimp-item-set-name grid-layer "Grid Layer") (gimp-item-set-name grid-layer "Grid Layer")
(while (not (null? (cdr x-divides))) (while (not (null? (cdr x-divides)))

View File

@ -79,7 +79,7 @@
(gimp-image-insert-layer image lava-layer 0 -1) (gimp-image-insert-layer image lava-layer 0 -1)
(gimp-layer-set-offsets lava-layer select-offset-x select-offset-y) (gimp-layer-set-offsets lava-layer select-offset-x select-offset-y)
(gimp-selection-none image) (gimp-selection-none image)
(gimp-edit-clear lava-layer) (gimp-drawable-edit-clear lava-layer)
(gimp-image-select-item image CHANNEL-OP-REPLACE drawable) (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
(gimp-image-set-active-layer image lava-layer) (gimp-image-set-active-layer image lava-layer)

View File

@ -87,7 +87,7 @@
) )
(set! index (+ index 1)) (set! index (+ index 1))
) )
(gimp-edit-bucket-fill drw BUCKET-FILL-FG LAYER-MODE-NORMAL 100 0 FALSE 0 0) (gimp-drawable-edit-fill drw FILL-FOREGROUND)
(if old-selection (if old-selection
(begin (begin

View File

@ -47,7 +47,7 @@
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 width height) (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 width height)
(gimp-context-set-background '(0 0 0)) (gimp-context-set-background '(0 0 0))
(gimp-edit-fill drawable FILL-BACKGROUND) (gimp-drawable-edit-fill drawable FILL-BACKGROUND)
(file-gbr-save 1 img drawable filename "" spacing name) (file-gbr-save 1 img drawable filename "" spacing name)
(gimp-image-delete img) (gimp-image-delete img)
@ -96,6 +96,8 @@
) )
(gimp-context-push) (gimp-context-push)
(gimp-context-set-paint-mode LAYER-MODE-NORMAL)
(gimp-context-set-opacity 100.0)
(gimp-image-undo-disable img) (gimp-image-undo-disable img)
(gimp-image-insert-layer img drawable 0 0) (gimp-image-insert-layer img drawable 0 0)
@ -115,7 +117,7 @@
) )
(gimp-context-set-background '(0 0 0)) (gimp-context-set-background '(0 0 0))
(gimp-edit-fill drawable FILL-BACKGROUND) (gimp-drawable-edit-fill drawable FILL-BACKGROUND)
(file-gbr-save 1 img drawable filename "" spacing name) (file-gbr-save 1 img drawable filename "" spacing name)
(gimp-image-delete img) (gimp-image-delete img)
@ -171,7 +173,7 @@
(gimp-context-set-background '(0 0 0)) (gimp-context-set-background '(0 0 0))
(gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 width height) (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 width height)
(gimp-edit-fill drawable FILL-BACKGROUND) (gimp-drawable-edit-fill drawable FILL-BACKGROUND)
(file-gbr-save 1 img drawable filename "" spacing name) (file-gbr-save 1 img drawable filename "" spacing name)
(gimp-image-delete img) (gimp-image-delete img)
@ -240,7 +242,7 @@
(gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 width height))) (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 width height)))
(gimp-context-set-background '(0 0 0)) (gimp-context-set-background '(0 0 0))
(gimp-edit-fill drawable FILL-BACKGROUND) (gimp-drawable-edit-fill drawable FILL-BACKGROUND)
(file-gbr-save 1 img drawable filename "" spacing name) (file-gbr-save 1 img drawable filename "" spacing name)
(gimp-image-delete img) (gimp-image-delete img)

View File

@ -64,7 +64,7 @@
(gimp-image-insert-layer theImage mLayer 0 0) (gimp-image-insert-layer theImage mLayer 0 0)
(gimp-selection-all theImage) (gimp-selection-all theImage)
(gimp-edit-clear mLayer) (gimp-drawable-edit-clear mLayer)
(gimp-selection-none theImage) (gimp-selection-none theImage)
(plug-in-noisify RUN-NONINTERACTIVE theImage mLayer TRUE 0 0 0 0.5) (plug-in-noisify RUN-NONINTERACTIVE theImage mLayer TRUE 0 0 0 0.5)
(plug-in-gauss-rle RUN-NONINTERACTIVE theImage mLayer 5 TRUE TRUE) (plug-in-gauss-rle RUN-NONINTERACTIVE theImage mLayer 5 TRUE TRUE)

View File

@ -107,7 +107,7 @@
(gimp-layer-set-offsets shadow-layer select-offset-x select-offset-y) (gimp-layer-set-offsets shadow-layer select-offset-x select-offset-y)
(gimp-drawable-fill shadow-layer FILL-TRANSPARENT) (gimp-drawable-fill shadow-layer FILL-TRANSPARENT)
(gimp-context-set-background shadow-color) (gimp-context-set-background shadow-color)
(gimp-edit-fill shadow-layer FILL-BACKGROUND) (gimp-drawable-edit-fill shadow-layer FILL-BACKGROUND)
(gimp-selection-none image) (gimp-selection-none image)
(if (= allow-resize TRUE) (if (= allow-resize TRUE)
@ -178,7 +178,7 @@
(if (= from-selection TRUE) (if (= from-selection TRUE)
(begin (begin
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection) (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
(gimp-edit-clear shadow-layer) (gimp-drawable-edit-clear shadow-layer)
(gimp-image-remove-channel image active-selection))) (gimp-image-remove-channel image active-selection)))
(if (and (if (and

View File

@ -82,7 +82,7 @@
(gimp-layer-set-offsets effect-layer select-offset-x select-offset-y) (gimp-layer-set-offsets effect-layer select-offset-x select-offset-y)
(gimp-image-insert-layer image effect-layer 0 -1) (gimp-image-insert-layer image effect-layer 0 -1)
(gimp-selection-none image) (gimp-selection-none image)
(gimp-edit-clear effect-layer) (gimp-drawable-edit-clear effect-layer)
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection) (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
(gimp-edit-copy drawable) (gimp-edit-copy drawable)

View File

@ -22,12 +22,14 @@
100 100
LAYER-MODE-NORMAL)))) LAYER-MODE-NORMAL))))
(gimp-context-push) (gimp-context-push)
(gimp-context-set-paint-mode LAYER-MODE-NORMAL)
(gimp-context-set-opacity 100.0)
(gimp-image-undo-disable work-image) (gimp-image-undo-disable work-image)
; Create a tile-able displacement map in the first layer ; Create a tile-able displacement map in the first layer
(gimp-context-set-background '(127 127 127)) (gimp-context-set-background '(127 127 127))
(gimp-image-insert-layer work-image map-layer 0 0) (gimp-image-insert-layer work-image map-layer 0 0)
(gimp-edit-fill map-layer FILL-BACKGROUND) (gimp-drawable-edit-fill map-layer FILL-BACKGROUND)
(plug-in-noisify RUN-NONINTERACTIVE work-image map-layer FALSE 1.0 1.0 1.0 0.0) (plug-in-noisify RUN-NONINTERACTIVE work-image map-layer FALSE 1.0 1.0 1.0 0.0)
(plug-in-tile RUN-NONINTERACTIVE work-image map-layer (* width 3) (* height 3) FALSE) (plug-in-tile RUN-NONINTERACTIVE work-image map-layer (* width 3) (* height 3) FALSE)
(plug-in-gauss-iir RUN-NONINTERACTIVE work-image map-layer 35 TRUE TRUE) (plug-in-gauss-iir RUN-NONINTERACTIVE work-image map-layer 35 TRUE TRUE)

View File

@ -81,7 +81,7 @@
radius radius) radius radius)
(gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT (- width diam) (- height diam) (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT (- width diam) (- height diam)
diam diam) diam diam)
(gimp-edit-clear pic-layer) (gimp-drawable-edit-clear pic-layer)
(gimp-selection-none image) (gimp-selection-none image)
; optionally add a shadow ; optionally add a shadow

View File

@ -96,6 +96,8 @@
) )
(gimp-context-push) (gimp-context-push)
(gimp-context-set-paint-mode LAYER-MODE-NORMAL)
(gimp-context-set-opacity 100.0)
(gimp-context-set-feather FALSE) (gimp-context-set-feather FALSE)
(gimp-image-undo-disable image) (gimp-image-undo-disable image)
@ -202,7 +204,7 @@
) )
(gimp-context-set-foreground '(0 0 0)) (gimp-context-set-foreground '(0 0 0))
(gimp-edit-fill film-mask FILL-BACKGROUND) (gimp-drawable-edit-fill film-mask FILL-BACKGROUND)
(gimp-selection-none image) (gimp-selection-none image)
(plug-in-gauss-rle RUN-NONINTERACTIVE image film-mask hole-radius TRUE TRUE) (plug-in-gauss-rle RUN-NONINTERACTIVE image film-mask hole-radius TRUE TRUE)
(gimp-threshold film-mask 127 255) (gimp-threshold film-mask 127 255)

View File

@ -205,7 +205,7 @@
(gimp-image-insert-layer img drawable 0 0) (gimp-image-insert-layer img drawable 0 0)
(gimp-context-set-foreground sphere-color) (gimp-context-set-foreground sphere-color)
(gimp-context-set-background bg-color) (gimp-context-set-background bg-color)
(gimp-edit-fill drawable FILL-BACKGROUND) (gimp-drawable-edit-fill drawable FILL-BACKGROUND)
(gimp-context-set-background '(20 20 20)) (gimp-context-set-background '(20 20 20))
(if (and (if (and
@ -224,27 +224,32 @@
(gimp-context-set-feather-radius 7.5 7.5) (gimp-context-set-feather-radius 7.5 7.5)
(gimp-image-select-ellipse img CHANNEL-OP-REPLACE shadow-x shadow-y shadow-w shadow-h) (gimp-image-select-ellipse img CHANNEL-OP-REPLACE shadow-x shadow-y shadow-w shadow-h)
(gimp-context-set-pattern pattern) (gimp-context-set-pattern pattern)
(gimp-edit-bucket-fill drawable BUCKET-FILL-PATTERN LAYER-MODE-MULTIPLY (gimp-drawable-edit-fill drawable FILL-PATTERN)))
100 0 FALSE 0 0)))
(gimp-context-set-feather FALSE) (gimp-context-set-feather FALSE)
(gimp-image-select-ellipse img CHANNEL-OP-REPLACE (- cx radius) (- cy radius) (gimp-image-select-ellipse img CHANNEL-OP-REPLACE (- cx radius) (- cy radius)
(* 2 radius) (* 2 radius)) (* 2 radius) (* 2 radius))
(gimp-edit-blend drawable BLEND-FG-BG-RGB LAYER-MODE-NORMAL (gimp-context-set-gradient-fg-bg-rgb)
GRADIENT-RADIAL 100 offset REPEAT-NONE FALSE (gimp-drawable-edit-gradient-fill drawable
FALSE 0 0 TRUE GRADIENT-RADIAL offset
light-x light-y light-end-x light-end-y) FALSE 0 0
TRUE
light-x light-y
light-end-x light-end-y)
(gimp-selection-none img) (gimp-selection-none img)
(gimp-context-set-gradient gradient)
(gimp-image-select-ellipse img CHANNEL-OP-REPLACE 10 10 50 50) (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 10 10 50 50)
(gimp-edit-blend drawable BLEND-CUSTOM LAYER-MODE-NORMAL (gimp-context-set-gradient gradient)
GRADIENT-LINEAR 100 offset REPEAT-NONE gradient-reverse (gimp-context-set-gradient-reverse gradient-reverse)
FALSE 0 0 TRUE (gimp-drawable-edit-gradient-fill drawable
10 10 30 60) GRADIENT-LINEAR offset
FALSE 0 0
TRUE
10 10
30 60)
(gimp-selection-none img) (gimp-selection-none img)

View File

@ -52,7 +52,7 @@
(gimp-image-insert-layer img drawable 0 0) (gimp-image-insert-layer img drawable 0 0)
(gimp-context-set-background '(0 0 0)) (gimp-context-set-background '(0 0 0))
(gimp-edit-fill drawable FILL-BACKGROUND) (gimp-drawable-edit-fill drawable FILL-BACKGROUND)
; Create main horizontal ribbon ; Create main horizontal ribbon
@ -66,10 +66,13 @@
(+ (* 2 ribbon-spacing) ribbon-width) (+ (* 2 ribbon-spacing) ribbon-width)
ribbon-width) ribbon-width)
(gimp-edit-blend drawable BLEND-FG-BG-RGB LAYER-MODE-NORMAL (gimp-context-set-gradient-fg-bg-rgb)
GRADIENT-BILINEAR 100 (- 100 shadow-depth) REPEAT-NONE FALSE (gimp-drawable-edit-gradient-fill drawable
FALSE 0 0 TRUE GRADIENT-BILINEAR (- 100 shadow-depth)
(/ (+ (* 2 ribbon-spacing) ribbon-width -1) 2) 0 0 0) FALSE 0 0
TRUE
(/ (+ (* 2 ribbon-spacing) ribbon-width -1) 2) 0
0 0)
; Create main vertical ribbon ; Create main vertical ribbon
@ -80,10 +83,12 @@
ribbon-width ribbon-width
(+ (* 2 ribbon-spacing) ribbon-width)) (+ (* 2 ribbon-spacing) ribbon-width))
(gimp-edit-blend drawable BLEND-FG-BG-RGB LAYER-MODE-NORMAL (gimp-drawable-edit-gradient-fill drawable
GRADIENT-BILINEAR 100 (- 100 shadow-depth) REPEAT-NONE FALSE GRADIENT-BILINEAR (- 100 shadow-depth)
FALSE 0 0 TRUE FALSE 0 0
0 (/ (+ (* 2 ribbon-spacing) ribbon-width -1) 2) 0 0) TRUE
0 (/ (+ (* 2 ribbon-spacing) ribbon-width -1) 2)
0 0)
; Create the secondary horizontal ribbon ; Create the secondary horizontal ribbon
@ -170,14 +175,14 @@
(gimp-image-insert-layer img drawable 0 0) (gimp-image-insert-layer img drawable 0 0)
(gimp-context-set-background '(0 0 0)) (gimp-context-set-background '(0 0 0))
(gimp-edit-fill drawable FILL-BACKGROUND) (gimp-drawable-edit-fill drawable FILL-BACKGROUND)
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE r1-x1 r1-y1 r1-width r1-height) (gimp-image-select-rectangle img CHANNEL-OP-REPLACE r1-x1 r1-y1 r1-width r1-height)
(gimp-image-select-rectangle img CHANNEL-OP-ADD r2-x1 r2-y1 r2-width r2-height) (gimp-image-select-rectangle img CHANNEL-OP-ADD r2-x1 r2-y1 r2-width r2-height)
(gimp-image-select-rectangle img CHANNEL-OP-ADD r3-x1 r3-y1 r3-width r3-height) (gimp-image-select-rectangle img CHANNEL-OP-ADD r3-x1 r3-y1 r3-width r3-height)
(gimp-context-set-background '(255 255 255)) (gimp-context-set-background '(255 255 255))
(gimp-edit-fill drawable FILL-BACKGROUND) (gimp-drawable-edit-fill drawable FILL-BACKGROUND)
(gimp-selection-none img) (gimp-selection-none img)
(gimp-image-undo-enable img) (gimp-image-undo-enable img)
@ -272,7 +277,7 @@
(dense (/ density 100.0))) (dense (/ density 100.0)))
(gimp-image-insert-layer img drawable 0 -1) (gimp-image-insert-layer img drawable 0 -1)
(gimp-context-set-background '(255 255 255)) (gimp-context-set-background '(255 255 255))
(gimp-edit-fill drawable FILL-BACKGROUND) (gimp-drawable-edit-fill drawable FILL-BACKGROUND)
(plug-in-noisify RUN-NONINTERACTIVE img drawable FALSE dense dense dense dense) (plug-in-noisify RUN-NONINTERACTIVE img drawable FALSE dense dense dense dense)
(plug-in-c-astretch RUN-NONINTERACTIVE img drawable) (plug-in-c-astretch RUN-NONINTERACTIVE img drawable)
(cond ((eq? orientation 'horizontal) (cond ((eq? orientation 'horizontal)
@ -366,6 +371,8 @@
) )
(gimp-context-push) (gimp-context-push)
(gimp-context-set-paint-mode LAYER-MODE-NORMAL)
(gimp-context-set-opacity 100.0)
(gimp-context-set-feather FALSE) (gimp-context-set-feather FALSE)
(gimp-selection-all w-img) (gimp-selection-all w-img)

View File

@ -69,13 +69,13 @@
(gimp-image-insert-layer image hl-layer 0 -1) (gimp-image-insert-layer image hl-layer 0 -1)
(gimp-selection-none image) (gimp-selection-none image)
(gimp-edit-clear hl-layer) (gimp-drawable-edit-clear hl-layer)
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection) (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
(gimp-context-set-background hl-color) (gimp-context-set-background hl-color)
(gimp-edit-fill hl-layer FILL-BACKGROUND) (gimp-drawable-edit-fill hl-layer FILL-BACKGROUND)
(gimp-selection-translate image hl-offset-x hl-offset-y) (gimp-selection-translate image hl-offset-x hl-offset-y)
(gimp-edit-fill hl-layer FILL-BACKGROUND) (gimp-drawable-edit-fill hl-layer FILL-BACKGROUND)
(gimp-selection-none image) (gimp-selection-none image)
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection) (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
@ -83,7 +83,7 @@
(gimp-layer-add-mask hl-layer mask) (gimp-layer-add-mask hl-layer mask)
(gimp-context-set-background hl-opacity) (gimp-context-set-background hl-opacity)
(gimp-edit-fill mask FILL-BACKGROUND) (gimp-drawable-edit-fill mask FILL-BACKGROUND)
(set! shadow-layer (car (gimp-layer-new image (set! shadow-layer (car (gimp-layer-new image
image-width image-width
@ -94,15 +94,15 @@
LAYER-MODE-NORMAL))) LAYER-MODE-NORMAL)))
(gimp-image-insert-layer image shadow-layer 0 -1) (gimp-image-insert-layer image shadow-layer 0 -1)
(gimp-selection-none image) (gimp-selection-none image)
(gimp-edit-clear shadow-layer) (gimp-drawable-edit-clear shadow-layer)
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection) (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
(gimp-selection-translate image ds-offset-x ds-offset-y) (gimp-selection-translate image ds-offset-x ds-offset-y)
(gimp-context-set-background ds-color) (gimp-context-set-background ds-color)
(gimp-edit-fill shadow-layer FILL-BACKGROUND) (gimp-drawable-edit-fill shadow-layer FILL-BACKGROUND)
(gimp-selection-none image) (gimp-selection-none image)
(plug-in-gauss-rle RUN-NONINTERACTIVE image shadow-layer ds-blur TRUE TRUE) (plug-in-gauss-rle RUN-NONINTERACTIVE image shadow-layer ds-blur TRUE TRUE)
(gimp-image-select-item image CHANNEL-OP-REPLACE active-selection) (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
(gimp-edit-clear shadow-layer) (gimp-drawable-edit-clear shadow-layer)
(gimp-image-lower-item image shadow-layer) (gimp-image-lower-item image shadow-layer)
(if (= keep-selection FALSE) (if (= keep-selection FALSE)