Porting to new API: add-[layer|channel] > insert-[layer|channel] and more, perspective-shadow.scm will need revisiting re. new item transformation API

This commit is contained in:
Alexandre Prokoudine
2010-10-10 02:14:53 +04:00
parent 3de4d7263a
commit bb9c1210b3
3 changed files with 13 additions and 13 deletions

View File

@ -126,7 +126,7 @@
"Drop Shadow" "Drop Shadow"
shadow-opacity shadow-opacity
NORMAL-MODE))) NORMAL-MODE)))
(gimp-image-add-layer image shadow-layer -1) (gimp-image-insert-layer image shadow-layer -1 -1)
(gimp-layer-set-offsets shadow-layer (gimp-layer-set-offsets shadow-layer
shadow-offset-x shadow-offset-x
shadow-offset-y)) shadow-offset-y))
@ -146,7 +146,7 @@
(if (= from-selection TRUE) (if (= from-selection TRUE)
(begin (begin
(gimp-selection-load active-selection) (gimp-item-to-selection active-selection 2)
(gimp-edit-clear shadow-layer) (gimp-edit-clear shadow-layer)
(gimp-image-remove-channel image active-selection))) (gimp-image-remove-channel image active-selection)))

View File

@ -102,7 +102,7 @@
NORMAL-MODE))) NORMAL-MODE)))
(gimp-image-add-layer image shadow-layer -1) (gimp-image-insert-layer image shadow-layer -1 -1)
(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 TRANSPARENT-FILL) (gimp-drawable-fill shadow-layer TRANSPARENT-FILL)
(gimp-context-set-background shadow-color) (gimp-context-set-background shadow-color)
@ -174,7 +174,7 @@
(if (= from-selection TRUE) (if (= from-selection TRUE)
(begin (begin
(gimp-selection-load active-selection) (gimp-item-to-selection active-selection 2)
(gimp-edit-clear shadow-layer) (gimp-edit-clear shadow-layer)
(gimp-image-remove-channel image active-selection))) (gimp-image-remove-channel image active-selection)))

View File

@ -64,19 +64,19 @@
(set! from-selection TRUE) (set! from-selection TRUE)
(set! active-selection (car (gimp-selection-save image))))) (set! active-selection (car (gimp-selection-save image)))))
(set! hl-layer (car (gimp-layer-new image image-width image-height type "Highlight" 100 NORMAL-MODE))) (set! hl-layer (car (gimp-layer-new image image-width image-height type _"Highlight" 100 NORMAL-MODE)))
(gimp-image-add-layer image hl-layer -1) (gimp-image-insert-layer image hl-layer -1 -1)
(gimp-selection-none image) (gimp-selection-none image)
(gimp-edit-clear hl-layer) (gimp-edit-clear hl-layer)
(gimp-selection-load active-selection) (gimp-item-to-selection active-selection 2)
(gimp-context-set-background hl-color) (gimp-context-set-background hl-color)
(gimp-edit-fill hl-layer BACKGROUND-FILL) (gimp-edit-fill hl-layer BACKGROUND-FILL)
(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 BACKGROUND-FILL) (gimp-edit-fill hl-layer BACKGROUND-FILL)
(gimp-selection-none image) (gimp-selection-none image)
(gimp-selection-load active-selection) (gimp-item-to-selection active-selection 2)
(set! mask (car (gimp-layer-create-mask hl-layer ADD-WHITE-MASK))) (set! mask (car (gimp-layer-create-mask hl-layer ADD-WHITE-MASK)))
(gimp-layer-add-mask hl-layer mask) (gimp-layer-add-mask hl-layer mask)
@ -88,21 +88,21 @@
image-width image-width
image-height image-height
type type
"Shadow" _"Shadow"
ds-opacity ds-opacity
NORMAL-MODE))) NORMAL-MODE)))
(gimp-image-add-layer image shadow-layer -1) (gimp-image-insert-layer image shadow-layer -1 -1)
(gimp-selection-none image) (gimp-selection-none image)
(gimp-edit-clear shadow-layer) (gimp-edit-clear shadow-layer)
(gimp-selection-load active-selection) (gimp-item-to-selection active-selection 2)
(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 BACKGROUND-FILL) (gimp-edit-fill shadow-layer BACKGROUND-FILL)
(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-selection-load active-selection) (gimp-item-to-selection active-selection 2)
(gimp-edit-clear shadow-layer) (gimp-edit-clear shadow-layer)
(gimp-image-lower-layer image shadow-layer) (gimp-image-lower-item image shadow-layer)
(if (= keep-selection FALSE) (if (= keep-selection FALSE)
(gimp-selection-none image)) (gimp-selection-none image))