[gimp] Porting to new API: add-[layer|channel] > insert-[layer|channel] and more, perspective-shadow.scm wi
- From: Alexandre Prokoudine <aprokoudine src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Porting to new API: add-[layer|channel] > insert-[layer|channel] and more, perspective-shadow.scm wi
- Date: Sat, 9 Oct 2010 22:15:21 +0000 (UTC)
commit bb9c1210b3d6506ec7746b29a2a42b7d6469c26c
Author: Alexandre Prokoudine <alexandre prokoudine gmail com>
Date: Sun Oct 10 02:14:53 2010 +0400
Porting to new API: add-[layer|channel] > insert-[layer|channel] and more, perspective-shadow.scm will need revisiting re. new item transformation API
plug-ins/script-fu/scripts/drop-shadow.scm | 4 ++--
plug-ins/script-fu/scripts/perspective-shadow.scm | 4 ++--
plug-ins/script-fu/scripts/xach-effect.scm | 18 +++++++++---------
3 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/plug-ins/script-fu/scripts/drop-shadow.scm b/plug-ins/script-fu/scripts/drop-shadow.scm
index e411ca8..2d23bd4 100644
--- a/plug-ins/script-fu/scripts/drop-shadow.scm
+++ b/plug-ins/script-fu/scripts/drop-shadow.scm
@@ -126,7 +126,7 @@
"Drop Shadow"
shadow-opacity
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
shadow-offset-x
shadow-offset-y))
@@ -146,7 +146,7 @@
(if (= from-selection TRUE)
(begin
- (gimp-selection-load active-selection)
+ (gimp-item-to-selection active-selection 2)
(gimp-edit-clear shadow-layer)
(gimp-image-remove-channel image active-selection)))
diff --git a/plug-ins/script-fu/scripts/perspective-shadow.scm b/plug-ins/script-fu/scripts/perspective-shadow.scm
index 9d65642..a6dd140 100644
--- a/plug-ins/script-fu/scripts/perspective-shadow.scm
+++ b/plug-ins/script-fu/scripts/perspective-shadow.scm
@@ -102,7 +102,7 @@
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-drawable-fill shadow-layer TRANSPARENT-FILL)
(gimp-context-set-background shadow-color)
@@ -174,7 +174,7 @@
(if (= from-selection TRUE)
(begin
- (gimp-selection-load active-selection)
+ (gimp-item-to-selection active-selection 2)
(gimp-edit-clear shadow-layer)
(gimp-image-remove-channel image active-selection)))
diff --git a/plug-ins/script-fu/scripts/xach-effect.scm b/plug-ins/script-fu/scripts/xach-effect.scm
index 800a928..f59d003 100644
--- a/plug-ins/script-fu/scripts/xach-effect.scm
+++ b/plug-ins/script-fu/scripts/xach-effect.scm
@@ -64,19 +64,19 @@
(set! from-selection TRUE)
(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)))
- (gimp-image-add-layer image hl-layer -1)
+ (set! hl-layer (car (gimp-layer-new image image-width image-height type _"Highlight" 100 NORMAL-MODE)))
+ (gimp-image-insert-layer image hl-layer -1 -1)
(gimp-selection-none image)
(gimp-edit-clear hl-layer)
- (gimp-selection-load active-selection)
+ (gimp-item-to-selection active-selection 2)
(gimp-context-set-background hl-color)
(gimp-edit-fill hl-layer BACKGROUND-FILL)
(gimp-selection-translate image hl-offset-x hl-offset-y)
(gimp-edit-fill hl-layer BACKGROUND-FILL)
(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)))
(gimp-layer-add-mask hl-layer mask)
@@ -88,21 +88,21 @@
image-width
image-height
type
- "Shadow"
+ _"Shadow"
ds-opacity
NORMAL-MODE)))
- (gimp-image-add-layer image shadow-layer -1)
+ (gimp-image-insert-layer image shadow-layer -1 -1)
(gimp-selection-none image)
(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-context-set-background ds-color)
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
(gimp-selection-none image)
(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-image-lower-layer image shadow-layer)
+ (gimp-image-lower-item image shadow-layer)
(if (= keep-selection FALSE)
(gimp-selection-none image))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]