[gimp] Second stage in removing use of deprecated functions in Script-Fu scripts
- From: Kevin Cozens <kcozens src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Second stage in removing use of deprecated functions in Script-Fu scripts
- Date: Mon, 7 Nov 2011 17:37:40 +0000 (UTC)
commit 176773dcfe07e15c38d8a7802353d4603d75c9c6
Author: Kevin Cozens <kcozens svn gnome org>
Date: Sun Nov 6 15:55:45 2011 -0500
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.
plug-ins/script-fu/scripts/3dTruchet.scm | 8 +-
plug-ins/script-fu/scripts/addborder.scm | 46 +++----
plug-ins/script-fu/scripts/alien-glow-arrow.scm | 4 +-
plug-ins/script-fu/scripts/alien-glow-bar.scm | 5 +-
plug-ins/script-fu/scripts/alien-glow-bullet.scm | 8 +-
plug-ins/script-fu/scripts/alien-glow-button.scm | 9 +-
plug-ins/script-fu/scripts/alien-glow-logo.scm | 4 +-
plug-ins/script-fu/scripts/alien-neon-logo.scm | 4 +-
plug-ins/script-fu/scripts/basic1-logo.scm | 2 +-
plug-ins/script-fu/scripts/basic2-logo.scm | 2 +-
plug-ins/script-fu/scripts/beveled-button.scm | 10 +-
.../script-fu/scripts/beveled-pattern-arrow.scm | 12 +-
.../script-fu/scripts/beveled-pattern-bullet.scm | 8 +-
.../script-fu/scripts/beveled-pattern-button.scm | 5 +-
.../script-fu/scripts/beveled-pattern-hrule.scm | 5 +-
plug-ins/script-fu/scripts/blended-logo.scm | 11 +-
plug-ins/script-fu/scripts/bovinated-logo.scm | 2 +-
plug-ins/script-fu/scripts/burn-in-anim.scm | 11 +-
plug-ins/script-fu/scripts/chalk.scm | 3 +-
plug-ins/script-fu/scripts/chip-away.scm | 6 +-
plug-ins/script-fu/scripts/chrome-logo.scm | 6 +-
plug-ins/script-fu/scripts/coffee.scm | 7 +-
plug-ins/script-fu/scripts/coolmetal-logo.scm | 28 ++--
plug-ins/script-fu/scripts/drop-shadow.scm | 7 +-
plug-ins/script-fu/scripts/erase-rows.scm | 8 +-
plug-ins/script-fu/scripts/frosty-logo.scm | 127 ++++++++--------
plug-ins/script-fu/scripts/glossy.scm | 8 +-
plug-ins/script-fu/scripts/glowing-logo.scm | 6 +-
plug-ins/script-fu/scripts/gradient-bevel-logo.scm | 2 +-
plug-ins/script-fu/scripts/i26-gunya2.scm | 2 +-
plug-ins/script-fu/scripts/lava.scm | 4 +-
plug-ins/script-fu/scripts/line-nova.scm | 20 ++--
plug-ins/script-fu/scripts/mkbrush.scm | 35 +++--
plug-ins/script-fu/scripts/neon-logo.scm | 160 ++++++++++----------
plug-ins/script-fu/scripts/news-text.scm | 2 +-
plug-ins/script-fu/scripts/perspective-shadow.scm | 20 ++-
plug-ins/script-fu/scripts/predator.scm | 6 +-
plug-ins/script-fu/scripts/pupi-button.scm | 11 +-
plug-ins/script-fu/scripts/round-corners.scm | 25 ++--
plug-ins/script-fu/scripts/select-to-brush.scm | 4 +-
plug-ins/script-fu/scripts/selection-round.scm | 119 +++++++--------
plug-ins/script-fu/scripts/sota-chrome-logo.scm | 9 +-
plug-ins/script-fu/scripts/speed-text.scm | 4 +-
plug-ins/script-fu/scripts/starscape-logo.scm | 6 +-
plug-ins/script-fu/scripts/swirly-pattern.scm | 11 +-
plug-ins/script-fu/scripts/t-o-p-logo.scm | 12 +-
plug-ins/script-fu/scripts/test-sphere.scm | 15 +-
plug-ins/script-fu/scripts/text-circle.scm | 30 ++--
plug-ins/script-fu/scripts/textured-logo.scm | 10 +-
plug-ins/script-fu/scripts/title-header.scm | 11 +-
plug-ins/script-fu/scripts/truchet.scm | 22 ++-
plug-ins/script-fu/scripts/weave.scm | 39 +++---
plug-ins/script-fu/scripts/xach-effect.scm | 2 +-
53 files changed, 498 insertions(+), 445 deletions(-)
---
diff --git a/plug-ins/script-fu/scripts/3dTruchet.scm b/plug-ins/script-fu/scripts/3dTruchet.scm
index 429035d..afbf64b 100644
--- a/plug-ins/script-fu/scripts/3dTruchet.scm
+++ b/plug-ins/script-fu/scripts/3dTruchet.scm
@@ -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
diff --git a/plug-ins/script-fu/scripts/addborder.scm b/plug-ins/script-fu/scripts/addborder.scm
index 379d64c..4a2b8fe 100644
--- a/plug-ins/script-fu/scripts/addborder.scm
+++ b/plug-ins/script-fu/scripts/addborder.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/alien-glow-arrow.scm b/plug-ins/script-fu/scripts/alien-glow-arrow.scm
index 54e8188..21a2abb 100644
--- a/plug-ins/script-fu/scripts/alien-glow-arrow.scm
+++ b/plug-ins/script-fu/scripts/alien-glow-arrow.scm
@@ -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))
diff --git a/plug-ins/script-fu/scripts/alien-glow-bar.scm b/plug-ins/script-fu/scripts/alien-glow-bar.scm
index dd656a1..19339f3 100644
--- a/plug-ins/script-fu/scripts/alien-glow-bar.scm
+++ b/plug-ins/script-fu/scripts/alien-glow-bar.scm
@@ -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))
diff --git a/plug-ins/script-fu/scripts/alien-glow-bullet.scm b/plug-ins/script-fu/scripts/alien-glow-bullet.scm
index 38e1dee..e430c37 100644
--- a/plug-ins/script-fu/scripts/alien-glow-bullet.scm
+++ b/plug-ins/script-fu/scripts/alien-glow-bullet.scm
@@ -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)
)
diff --git a/plug-ins/script-fu/scripts/alien-glow-button.scm b/plug-ins/script-fu/scripts/alien-glow-button.scm
index 7a0a32d..1787181 100644
--- a/plug-ins/script-fu/scripts/alien-glow-button.scm
+++ b/plug-ins/script-fu/scripts/alien-glow-button.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/alien-glow-logo.scm b/plug-ins/script-fu/scripts/alien-glow-logo.scm
index 57b2671..4c3268d 100644
--- a/plug-ins/script-fu/scripts/alien-glow-logo.scm
+++ b/plug-ins/script-fu/scripts/alien-glow-logo.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/alien-neon-logo.scm b/plug-ins/script-fu/scripts/alien-neon-logo.scm
index 817eb25..4efc698 100644
--- a/plug-ins/script-fu/scripts/alien-neon-logo.scm
+++ b/plug-ins/script-fu/scripts/alien-neon-logo.scm
@@ -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)))
diff --git a/plug-ins/script-fu/scripts/basic1-logo.scm b/plug-ins/script-fu/scripts/basic1-logo.scm
index b31dd6d..7b78023 100644
--- a/plug-ins/script-fu/scripts/basic1-logo.scm
+++ b/plug-ins/script-fu/scripts/basic1-logo.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/basic2-logo.scm b/plug-ins/script-fu/scripts/basic2-logo.scm
index b3fa801..f4dc962 100644
--- a/plug-ins/script-fu/scripts/basic2-logo.scm
+++ b/plug-ins/script-fu/scripts/basic2-logo.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/beveled-button.scm b/plug-ins/script-fu/scripts/beveled-button.scm
index 5633aeb..e1ddbdd 100644
--- a/plug-ins/script-fu/scripts/beveled-button.scm
+++ b/plug-ins/script-fu/scripts/beveled-button.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/beveled-pattern-arrow.scm b/plug-ins/script-fu/scripts/beveled-pattern-arrow.scm
index 3fdca9c..2225155 100644
--- a/plug-ins/script-fu/scripts/beveled-pattern-arrow.scm
+++ b/plug-ins/script-fu/scripts/beveled-pattern-arrow.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/beveled-pattern-bullet.scm b/plug-ins/script-fu/scripts/beveled-pattern-bullet.scm
index a2d9b02..6560cc5 100644
--- a/plug-ins/script-fu/scripts/beveled-pattern-bullet.scm
+++ b/plug-ins/script-fu/scripts/beveled-pattern-bullet.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/beveled-pattern-button.scm b/plug-ins/script-fu/scripts/beveled-pattern-button.scm
index 9871014..aba9648 100644
--- a/plug-ins/script-fu/scripts/beveled-pattern-button.scm
+++ b/plug-ins/script-fu/scripts/beveled-pattern-button.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/beveled-pattern-hrule.scm b/plug-ins/script-fu/scripts/beveled-pattern-hrule.scm
index 2c58671..0ec7f5c 100644
--- a/plug-ins/script-fu/scripts/beveled-pattern-hrule.scm
+++ b/plug-ins/script-fu/scripts/beveled-pattern-hrule.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/blended-logo.scm b/plug-ins/script-fu/scripts/blended-logo.scm
index 3f7d7a2..5d3403f 100644
--- a/plug-ins/script-fu/scripts/blended-logo.scm
+++ b/plug-ins/script-fu/scripts/blended-logo.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/bovinated-logo.scm b/plug-ins/script-fu/scripts/bovinated-logo.scm
index 6568146..3a614f1 100644
--- a/plug-ins/script-fu/scripts/bovinated-logo.scm
+++ b/plug-ins/script-fu/scripts/bovinated-logo.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/burn-in-anim.scm b/plug-ins/script-fu/scripts/burn-in-anim.scm
index 29e9b26..60a09d1 100644
--- a/plug-ins/script-fu/scripts/burn-in-anim.scm
+++ b/plug-ins/script-fu/scripts/burn-in-anim.scm
@@ -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)
)
)
diff --git a/plug-ins/script-fu/scripts/chalk.scm b/plug-ins/script-fu/scripts/chalk.scm
index 6bd86f9..4f613a7 100644
--- a/plug-ins/script-fu/scripts/chalk.scm
+++ b/plug-ins/script-fu/scripts/chalk.scm
@@ -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)
)
diff --git a/plug-ins/script-fu/scripts/chip-away.scm b/plug-ins/script-fu/scripts/chip-away.scm
index d81569e..ee7d130 100644
--- a/plug-ins/script-fu/scripts/chip-away.scm
+++ b/plug-ins/script-fu/scripts/chip-away.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/chrome-logo.scm b/plug-ins/script-fu/scripts/chrome-logo.scm
index 6ce0065..0824154 100644
--- a/plug-ins/script-fu/scripts/chrome-logo.scm
+++ b/plug-ins/script-fu/scripts/chrome-logo.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/coffee.scm b/plug-ins/script-fu/scripts/coffee.scm
index 64dde55..7011cff 100644
--- a/plug-ins/script-fu/scripts/coffee.scm
+++ b/plug-ins/script-fu/scripts/coffee.scm
@@ -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
diff --git a/plug-ins/script-fu/scripts/coolmetal-logo.scm b/plug-ins/script-fu/scripts/coolmetal-logo.scm
index 19a90a3..fe7c805 100644
--- a/plug-ins/script-fu/scripts/coolmetal-logo.scm
+++ b/plug-ins/script-fu/scripts/coolmetal-logo.scm
@@ -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)))
diff --git a/plug-ins/script-fu/scripts/drop-shadow.scm b/plug-ins/script-fu/scripts/drop-shadow.scm
index d925555..0f1aca0 100644
--- a/plug-ins/script-fu/scripts/drop-shadow.scm
+++ b/plug-ins/script-fu/scripts/drop-shadow.scm
@@ -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)
diff --git a/plug-ins/script-fu/scripts/erase-rows.scm b/plug-ins/script-fu/scripts/erase-rows.scm
index b29ef38..4c5213a 100644
--- a/plug-ins/script-fu/scripts/erase-rows.scm
+++ b/plug-ins/script-fu/scripts/erase-rows.scm
@@ -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)
)
)
diff --git a/plug-ins/script-fu/scripts/frosty-logo.scm b/plug-ins/script-fu/scripts/frosty-logo.scm
index 6ab0072..693c277 100644
--- a/plug-ins/script-fu/scripts/frosty-logo.scm
+++ b/plug-ins/script-fu/scripts/frosty-logo.scm
@@ -17,20 +17,20 @@
(width (+ (car (gimp-drawable-width logo-layer)) border))
(height (+ (car (gimp-drawable-height logo-layer)) border))
(logo-layer-mask (car (gimp-layer-create-mask logo-layer
- ADD-BLACK-MASK)))
+ ADD-BLACK-MASK)))
(sparkle-layer (car (gimp-layer-new img width height RGBA-IMAGE
"Sparkle" 100 NORMAL-MODE)))
(matte-layer (car (gimp-layer-new img width height RGBA-IMAGE
"Matte" 100 NORMAL-MODE)))
(shadow-layer (car (gimp-layer-new img
- (+ border width)
- (+ border height)
- RGBA-IMAGE
+ (+ border width)
+ (+ border height)
+ RGBA-IMAGE
"Shadow" 90 MULTIPLY-MODE)))
(bg-layer (car (gimp-layer-new img width height RGB-IMAGE
"Background" 100 NORMAL-MODE)))
(selection 0)
- (stack (car(gimp-image-get-item-position img logo-layer)))
+ (stack (car (gimp-image-get-item-position img logo-layer)))
)
(gimp-context-push)
@@ -47,7 +47,7 @@
(gimp-edit-clear sparkle-layer)
(gimp-edit-clear matte-layer)
(gimp-edit-clear shadow-layer)
- (gimp-selection-layer-alpha logo-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(set! selection (car (gimp-selection-save img)))
(gimp-selection-feather img border)
(gimp-context-set-background '(0 0 0))
@@ -60,7 +60,7 @@
6 15 1.0 0.0 0.0 0.0 FALSE FALSE FALSE 0)
(gimp-levels sparkle-layer 1 0 255 0.2 0 255)
(gimp-levels sparkle-layer 2 0 255 0.7 0 255)
- (gimp-selection-layer-alpha sparkle-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE sparkle-layer)
(gimp-context-set-foreground '(0 0 0))
(gimp-context-set-brush "Circle Fuzzy (11)")
(gimp-edit-stroke matte-layer)
@@ -71,14 +71,14 @@
(gimp-edit-fill bg-layer BACKGROUND-FILL)
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill logo-layer BACKGROUND-FILL)
- (gimp-selection-load selection)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill logo-layer-mask BACKGROUND-FILL)
(gimp-selection-feather img border)
(gimp-selection-translate img (/ border 2) (/ border 2))
(gimp-edit-fill logo-layer BACKGROUND-FILL)
(gimp-layer-remove-mask logo-layer 0)
- (gimp-selection-load selection)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
(gimp-context-set-brush "Circle Fuzzy (07)")
(gimp-context-set-paint-mode BEHIND-MODE)
(gimp-context-set-foreground '(186 241 255))
@@ -101,31 +101,33 @@
size
bg-color)
- (gimp-image-undo-group-start img)
+ (gimp-image-undo-group-start img)
- ;Checking if the effect size is to big or not
- (gimp-selection-layer-alpha logo-layer)
- (gimp-selection-feather img (/ size 5))
- (gimp-selection-sharpen img)
+ ;Checking if the effect size is to big or not
+ (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
+ (gimp-selection-feather img (/ size 5))
+ (gimp-selection-sharpen img)
- (if (= 1 (car(gimp-selection-is-empty img)))
- (begin
- (gimp-image-undo-group-end img)
- (gimp-selection-none img)
- (gimp-message "Your layer's opaque parts are either too small for
+ (if (= 1 (car(gimp-selection-is-empty img)))
+ (begin
+ (gimp-image-undo-group-end img)
+ (gimp-selection-none img)
+ (gimp-message "Your layer's opaque parts are either too small for
this effect size, or they are not inside the canvas.")
- ))
-
- (if (= 0 (car(gimp-selection-is-empty img)))
- (begin
- (gimp-selection-none img)
- (gimp-layer-resize-to-image-size logo-layer)
- (apply-frosty-logo-effect img logo-layer size bg-color 0)
-
- (gimp-selection-none img)
- (gimp-image-undo-group-end img)
- (gimp-displays-flush)
- ))
+ )
+ )
+
+ (if (= 0 (car(gimp-selection-is-empty img)))
+ (begin
+ (gimp-selection-none img)
+ (gimp-layer-resize-to-image-size logo-layer)
+ (apply-frosty-logo-effect img logo-layer size bg-color 0)
+
+ (gimp-selection-none img)
+ (gimp-image-undo-group-end img)
+ (gimp-displays-flush)
+ )
+ )
)
(script-fu-register "script-fu-frosty-logo-alpha"
@@ -154,35 +156,40 @@ this effect size, or they are not inside the canvas.")
(border (/ size 5))
(text-layer (car (gimp-text-fontname img -1 0 0 text (* border 2) TRUE size PIXELS font)))
(error-string "The text you entered contains only spaces.")
- )
- (if (= text-layer -1) ; checking that the text layer was created
- ; succesfully - it has more then just
- ; empty charcters
- (begin
- (gimp-image-delete img)
- (gimp-message error-string)
- )
- (begin ; Checking if the effect size is too big or not
- (gimp-image-undo-disable img)
- (gimp-selection-layer-alpha text-layer)
- (gimp-selection-feather img border)
- (gimp-selection-sharpen img)
-
- (if (= 0 (car(gimp-selection-is-empty img))) ; Checking whether
- ; the effect size
- ; is too big
- (begin
- (apply-frosty-logo-effect img text-layer size bg-color 1)
- (gimp-selection-all img)
- (gimp-image-undo-enable img)
- (gimp-display-new img)
- ))
- (if (= 1 (car(gimp-selection-is-empty img)))
- (begin
- (gimp-image-delete img)
- (gimp-message error-string)
- ))))
- )
+ )
+
+ (if (= text-layer -1) ; checking that the text layer was created
+ ; succesfully - it has more then just
+ ; empty charcters
+ (begin
+ (gimp-image-delete img)
+ (gimp-message error-string)
+ )
+ (begin ; Checking if the effect size is too big or not
+ (gimp-image-undo-disable img)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
+ (gimp-selection-feather img border)
+ (gimp-selection-sharpen img)
+
+ (if (= 0 (car(gimp-selection-is-empty img))) ; Checking whether
+ ; the effect size
+ ; is too big
+ (begin
+ (apply-frosty-logo-effect img text-layer size bg-color 1)
+ (gimp-selection-all img)
+ (gimp-image-undo-enable img)
+ (gimp-display-new img)
+ )
+ )
+ (if (= 1 (car(gimp-selection-is-empty img)))
+ (begin
+ (gimp-image-delete img)
+ (gimp-message error-string)
+ )
+ )
+ )
+ )
+ )
)
(script-fu-register "script-fu-frosty-logo"
diff --git a/plug-ins/script-fu/scripts/glossy.scm b/plug-ins/script-fu/scripts/glossy.scm
index 1d9c1bc..e5e5d1a 100644
--- a/plug-ins/script-fu/scripts/glossy.scm
+++ b/plug-ins/script-fu/scripts/glossy.scm
@@ -61,7 +61,7 @@
(gimp-edit-bucket-fill bg-layer BG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
(gimp-selection-none img)
- (gimp-selection-layer-alpha logo-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
; if we are going to use transparent gradients for text, we will (maybe) need to uncomment this
; this clears black letters first so you don't end up with black where the transparent should be
@@ -89,7 +89,7 @@
(gimp-selection-none img)
- (gimp-selection-layer-alpha grow-me)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE grow-me)
(gimp-selection-grow img grow-size)
; if we are going to use transparent gradients for outline, we will (maybe) need to uncomment this
@@ -129,7 +129,7 @@
(if (= use-pattern-overlay TRUE)
(begin
- (gimp-selection-layer-alpha grow-me)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE grow-me)
(gimp-context-set-pattern pattern-overlay)
(gimp-edit-bucket-fill grow-me PATTERN-BUCKET-FILL
OVERLAY-MODE 100 0 FALSE 0 0)
@@ -139,7 +139,7 @@
(if (= shadow-toggle TRUE)
(begin
- (gimp-selection-layer-alpha logo-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(set! dont-drop-me (car (script-fu-drop-shadow img logo-layer
s-offset-x s-offset-y
15 '(0 0 0) 80 TRUE)))
diff --git a/plug-ins/script-fu/scripts/glowing-logo.scm b/plug-ins/script-fu/scripts/glowing-logo.scm
index 39ebc92..9fb5150 100644
--- a/plug-ins/script-fu/scripts/glowing-logo.scm
+++ b/plug-ins/script-fu/scripts/glowing-logo.scm
@@ -32,20 +32,20 @@
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill logo-layer BACKGROUND-FILL)
- (gimp-selection-layer-alpha logo-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-selection-feather img feather1)
(gimp-context-set-background '(221 0 0))
(gimp-edit-fill glow-layer BACKGROUND-FILL)
(gimp-edit-fill glow-layer BACKGROUND-FILL)
(gimp-edit-fill glow-layer BACKGROUND-FILL)
- (gimp-selection-layer-alpha logo-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-selection-feather img feather2)
(gimp-context-set-background '(232 217 18))
(gimp-edit-fill glow-layer BACKGROUND-FILL)
(gimp-edit-fill glow-layer BACKGROUND-FILL)
- (gimp-selection-layer-alpha logo-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-selection-feather img feather3)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill glow-layer BACKGROUND-FILL)
diff --git a/plug-ins/script-fu/scripts/gradient-bevel-logo.scm b/plug-ins/script-fu/scripts/gradient-bevel-logo.scm
index 0be3060..d71b42f 100644
--- a/plug-ins/script-fu/scripts/gradient-bevel-logo.scm
+++ b/plug-ins/script-fu/scripts/gradient-bevel-logo.scm
@@ -50,7 +50,7 @@
(gimp-edit-clear blur-layer)
(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 bevel-width 1 1)
(gimp-selection-none img)
diff --git a/plug-ins/script-fu/scripts/i26-gunya2.scm b/plug-ins/script-fu/scripts/i26-gunya2.scm
index 33a3764..05fc635 100644
--- a/plug-ins/script-fu/scripts/i26-gunya2.scm
+++ b/plug-ins/script-fu/scripts/i26-gunya2.scm
@@ -43,7 +43,7 @@
(gimp-edit-clear dist-text-layer)
(gimp-edit-clear dist-frame-layer)
;; get the text shape
- (gimp-selection-layer-alpha text-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
;; fill it with the specified color
(gimp-context-set-foreground text-color)
(gimp-edit-fill dist-text-layer FOREGROUND-FILL)
diff --git a/plug-ins/script-fu/scripts/lava.scm b/plug-ins/script-fu/scripts/lava.scm
index 858a02a..4a6dec6 100644
--- a/plug-ins/script-fu/scripts/lava.scm
+++ b/plug-ins/script-fu/scripts/lava.scm
@@ -53,7 +53,7 @@
)
(if (= (car (gimp-selection-is-empty image)) TRUE)
- (gimp-selection-layer-alpha drawable)
+ (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
)
(set! active-selection (car (gimp-selection-save image)))
@@ -80,7 +80,7 @@
(gimp-selection-none image)
(gimp-edit-clear lava-layer)
- (gimp-selection-load active-selection)
+ (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
(gimp-image-set-active-layer image lava-layer)
)
)
diff --git a/plug-ins/script-fu/scripts/line-nova.scm b/plug-ins/script-fu/scripts/line-nova.scm
index dea585d..00ff5ca 100644
--- a/plug-ins/script-fu/scripts/line-nova.scm
+++ b/plug-ins/script-fu/scripts/line-nova.scm
@@ -24,6 +24,9 @@
(index 0)
(dir-deg/line (/ 360 num-of-lines))
)
+ (gimp-context-push)
+ (gimp-context-set-antialias TRUE)
+ (gimp-context-set-feather FALSE)
(define (draw-vector beg-x beg-y direction)
@@ -61,21 +64,17 @@
(+ beg-y (* off (sin dir0)))
)
(set-marginal-point beg-x beg-y direction)
- (gimp-free-select img 6 *points* CHANNEL-OP-ADD
- TRUE ; antialias
- FALSE ; feather
- 0 ; feather radius
- )
+ (gimp-image-select-polygon img CHANNEL-OP-ADD 6 *points*)
)
)
(gimp-image-undo-group-start img)
(set! old-selection
- (if (eq? (car (gimp-selection-is-empty img)) TRUE)
- #f
- (car (gimp-selection-save img))
- )
+ (if (eq? (car (gimp-selection-is-empty img)) TRUE)
+ #f
+ (car (gimp-selection-save img))
+ )
)
(gimp-selection-none img)
@@ -91,7 +90,7 @@
(if old-selection
(begin
- (gimp-selection-load old-selection)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE old-selection)
;; (gimp-image-set-active-layer img drw)
;; delete extra channel by Sven Neumann <neumanns uni-duesseldorf de>
(gimp-image-remove-channel img old-selection)
@@ -100,6 +99,7 @@
(gimp-image-undo-group-end img)
(gimp-displays-flush)
+ (gimp-context-pop)
)
)
diff --git a/plug-ins/script-fu/scripts/mkbrush.scm b/plug-ins/script-fu/scripts/mkbrush.scm
index 37a4a96..7dcd51f 100644
--- a/plug-ins/script-fu/scripts/mkbrush.scm
+++ b/plug-ins/script-fu/scripts/mkbrush.scm
@@ -36,6 +36,7 @@
)
(gimp-context-push)
+ (gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
(gimp-image-insert-layer img drawable 0 0)
@@ -43,7 +44,7 @@
(gimp-context-set-background '(255 255 255))
(gimp-drawable-fill drawable BACKGROUND-FILL)
- (gimp-rect-select img 0 0 width height CHANNEL-OP-REPLACE FALSE 0)
+ (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 width height)
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill drawable BACKGROUND-FILL)
@@ -102,12 +103,16 @@
(gimp-context-set-background '(255 255 255))
(gimp-drawable-fill drawable BACKGROUND-FILL)
- (cond ((< 0 feathering)
- (gimp-rect-select img
- (/ feathering 2) (/ feathering 2)
- width height CHANNEL-OP-REPLACE TRUE feathering))
- ((>= 0 feathering)
- (gimp-rect-select img 0 0 width height CHANNEL-OP-REPLACE FALSE 0)))
+ (cond
+ ((< 0 feathering)
+ (gimp-context-set-feather TRUE)
+ (gimp-context-set-feather-radius feathering feathering)
+ (gimp-image-select-rectangle img CHANNEL-OP-REPLACE
+ (/ feathering 2) (/ feathering 2) width height))
+ ((>= 0 feathering)
+ (gimp-context-set-feather FALSE)
+ (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 width height))
+ )
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill drawable BACKGROUND-FILL)
@@ -155,6 +160,8 @@
)
(gimp-context-push)
+ (gimp-context-set-antialias TRUE)
+ (gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
(gimp-image-insert-layer img drawable 0 0)
@@ -162,7 +169,7 @@
(gimp-context-set-background '(255 255 255))
(gimp-drawable-fill drawable BACKGROUND-FILL)
(gimp-context-set-background '(0 0 0))
- (gimp-ellipse-select img 0 0 width height CHANNEL-OP-REPLACE TRUE FALSE 0)
+ (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 width height)
(gimp-edit-fill drawable BACKGROUND-FILL)
@@ -214,6 +221,7 @@
)
(gimp-context-push)
+ (gimp-context-set-antialias TRUE)
(gimp-image-undo-disable img)
(gimp-image-insert-layer img drawable 0 0)
@@ -222,13 +230,14 @@
(gimp-drawable-fill drawable BACKGROUND-FILL)
(cond ((> feathering 0) ; keep from taking out gimp with stupid entry.
- (gimp-ellipse-select img
+ (gimp-context-set-feather TRUE)
+ (gimp-context-set-feather-radius feathering feathering)
+ (gimp-image-select-ellipse img CHANNEL-OP-REPLACE
(/ feathering 2) (/ feathering 2)
- width height CHANNEL-OP-REPLACE
- TRUE TRUE feathering))
+ width height))
((<= feathering 0)
- (gimp-ellipse-select img 0 0 width height
- CHANNEL-OP-REPLACE TRUE FALSE 0)))
+ (gimp-context-set-feather FALSE)
+ (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 width height)))
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill drawable BACKGROUND-FILL)
diff --git a/plug-ins/script-fu/scripts/neon-logo.scm b/plug-ins/script-fu/scripts/neon-logo.scm
index e3e04eb..ae7a09f 100644
--- a/plug-ins/script-fu/scripts/neon-logo.scm
+++ b/plug-ins/script-fu/scripts/neon-logo.scm
@@ -25,68 +25,68 @@
shadow)
(define (set-pt a index x y)
- (begin
- (aset a (* index 2) x)
- (aset a (+ (* index 2) 1) y)))
+ (begin
+ (aset a (* index 2) x)
+ (aset a (+ (* index 2) 1) y)))
(define (neon-spline1)
- (let* ((a (cons-array 6 'byte)))
- (set-pt a 0 0 0)
- (set-pt a 1 127 145)
- (set-pt a 2 255 255)
- a))
+ (let* ((a (cons-array 6 'byte)))
+ (set-pt a 0 0 0)
+ (set-pt a 1 127 145)
+ (set-pt a 2 255 255)
+ a))
(define (neon-spline2)
- (let* ((a (cons-array 6 'byte)))
- (set-pt a 0 0 0)
- (set-pt a 1 110 150)
- (set-pt a 2 255 255)
- a))
+ (let* ((a (cons-array 6 'byte)))
+ (set-pt a 0 0 0)
+ (set-pt a 1 110 150)
+ (set-pt a 2 255 255)
+ a))
(define (neon-spline3)
- (let* ((a (cons-array 6 'byte)))
- (set-pt a 0 0 0)
- (set-pt a 1 100 185)
- (set-pt a 2 255 255)
- a))
+ (let* ((a (cons-array 6 'byte)))
+ (set-pt a 0 0 0)
+ (set-pt a 1 100 185)
+ (set-pt a 2 255 255)
+ a))
(define (neon-spline4)
- (let* ((a (cons-array 8 'byte)))
- (set-pt a 0 0 0)
- (set-pt a 1 64 64)
- (set-pt a 2 127 192)
- (set-pt a 3 255 255)
- a))
+ (let* ((a (cons-array 8 'byte)))
+ (set-pt a 0 0 0)
+ (set-pt a 1 64 64)
+ (set-pt a 2 127 192)
+ (set-pt a 3 255 255)
+ a))
(define (find-hue-offset color)
- (let* (
- (R (car color))
- (G (cadr color))
- (B (caddr color))
- (max-val (max R G B))
- (min-val (min R G B))
- (delta (- max-val min-val))
- (hue 0)
- )
- (if (= delta 0)
- 0
- (begin
- (cond
- ((= max-val R)
- (set! hue (/ (- G B) (* 1.0 delta))))
- ((= max-val G)
- (set! hue (+ 2 (/ (- B R) (* 1.0 delta)))))
- ((= max-val B)
- (set! hue (+ 4 (/ (- R G) (* 1.0 delta)))))
- )
- (set! hue (* hue 60))
- (if (< hue 0) (set! hue (+ hue 360)))
- (if (> hue 360) (set! hue (- hue 360)))
- (if (> hue 180) (set! hue (- hue 360)))
- hue
- )
- )
- )
+ (let* (
+ (R (car color))
+ (G (cadr color))
+ (B (caddr color))
+ (max-val (max R G B))
+ (min-val (min R G B))
+ (delta (- max-val min-val))
+ (hue 0)
+ )
+ (if (= delta 0)
+ 0
+ (begin
+ (cond
+ ((= max-val R)
+ (set! hue (/ (- G B) (* 1.0 delta))))
+ ((= max-val G)
+ (set! hue (+ 2 (/ (- B R) (* 1.0 delta)))))
+ ((= max-val B)
+ (set! hue (+ 4 (/ (- R G) (* 1.0 delta)))))
+ )
+ (set! hue (* hue 60))
+ (if (< hue 0) (set! hue (+ hue 360)))
+ (if (> hue 360) (set! hue (- hue 360)))
+ (if (> hue 180) (set! hue (- hue 360)))
+ hue
+ )
+ )
+ )
)
(let* (
@@ -104,42 +104,42 @@
(width (car (gimp-drawable-width tube-layer)))
(height (car (gimp-drawable-height tube-layer)))
(glow-layer (car (gimp-layer-new img width height RGBA-IMAGE
- "Neon Glow" 100 NORMAL-MODE)))
+ "Neon Glow" 100 NORMAL-MODE)))
(bg-layer (car (gimp-layer-new img width height RGB-IMAGE
- "Background" 100 NORMAL-MODE)))
+ "Background" 100 NORMAL-MODE)))
(shadow-layer (if (= shadow TRUE)
(car (gimp-layer-new img width height RGBA-IMAGE
- "Shadow" 100 NORMAL-MODE))
+ "Shadow" 100 NORMAL-MODE))
0))
(selection 0)
- (max_shrink 0)
+ (max_shrink 0)
)
(gimp-context-push)
; ensure that we don't shrink selection so much
; that we create an empty selection.
- (gimp-selection-layer-alpha tube-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE tube-layer)
(while (= (car (gimp-selection-is-empty img)) FALSE)
- (begin
- (gimp-selection-shrink img 1)
- (set! max_shrink (+ max_shrink 1))
- ; escape early if we know that we can perform
- ; as much shrink steps as we want
- (if (> max_shrink shrink)
- (gimp-selection-none img))
- )
+ (begin
+ (gimp-selection-shrink img 1)
+ (set! max_shrink (+ max_shrink 1))
+ ; escape early if we know that we can perform
+ ; as much shrink steps as we want
+ (if (> max_shrink shrink)
+ (gimp-selection-none img))
+ )
)
(if (= (car (gimp-selection-is-empty img)) TRUE)
- (if (> max_shrink 0)
- (set! max_shrink (- max_shrink 1))))
+ (if (> max_shrink 0)
+ (set! max_shrink (- max_shrink 1))))
; clamp upper bounds to valid shrink step range
(if (> shrink max_shrink)
- (set! shrink max_shrink))
+ (set! shrink max_shrink))
(if (> inc-shrink (/ max_shrink 3))
- (set! inc-shrink (/ max_shrink 3)))
+ (set! inc-shrink (/ max_shrink 3)))
(if (> shadow-shrink max_shrink)
- (set! shadow-shrink max_shrink))
+ (set! shadow-shrink max_shrink))
(script-fu-util-image-resize-from-layer img tube-layer)
(script-fu-util-image-add-layers img glow-layer bg-layer)
@@ -149,7 +149,7 @@
(gimp-edit-clear shadow-layer)))
(gimp-context-set-background '(0 0 0))
- (gimp-selection-layer-alpha tube-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE tube-layer)
(set! selection (car (gimp-selection-save img)))
(gimp-selection-none img)
@@ -159,7 +159,7 @@
(gimp-context-set-background bg-color)
(gimp-edit-fill bg-layer BACKGROUND-FILL)
- (gimp-selection-load selection)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill tube-layer BACKGROUND-FILL)
(gimp-selection-shrink img shrink)
@@ -169,27 +169,27 @@
(gimp-selection-none img)
(if (not (= feather1 0))
- (plug-in-gauss-rle RUN-NONINTERACTIVE img tube-layer feather1 TRUE TRUE))
- (gimp-selection-load selection)
+ (plug-in-gauss-rle RUN-NONINTERACTIVE img tube-layer feather1 TRUE TRUE))
+ (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
(if (not (= feather2 0))
- (plug-in-gauss-rle RUN-NONINTERACTIVE img tube-layer feather2 TRUE TRUE))
+ (plug-in-gauss-rle RUN-NONINTERACTIVE img tube-layer feather2 TRUE TRUE))
(gimp-selection-feather img inc-shrink)
(gimp-selection-shrink img inc-shrink)
(gimp-curves-spline tube-layer 4 6 (neon-spline1))
- (gimp-selection-load selection)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
(gimp-selection-feather img inc-shrink)
(gimp-selection-shrink img (* inc-shrink 2))
(gimp-curves-spline tube-layer 4 6 (neon-spline2))
- (gimp-selection-load selection)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
(gimp-selection-feather img inc-shrink)
(gimp-selection-shrink img (* inc-shrink 3))
(gimp-curves-spline tube-layer 4 6 (neon-spline3))
(gimp-layer-set-lock-alpha tube-layer 1)
- (gimp-selection-layer-alpha tube-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE tube-layer)
(gimp-selection-invert img)
(gimp-context-set-background glow-color)
(gimp-edit-fill tube-layer BACKGROUND-FILL)
@@ -198,7 +198,7 @@
(gimp-layer-set-lock-alpha tube-layer 0)
(gimp-curves-spline tube-layer 4 8 (neon-spline4))
- (gimp-selection-load selection)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
(gimp-selection-grow img grow)
(gimp-selection-invert img)
(gimp-edit-clear tube-layer)
@@ -209,7 +209,7 @@
(if (not (= shadow 0))
(begin
- (gimp-selection-load selection)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
(gimp-selection-grow img grow)
(gimp-selection-shrink img shadow-shrink)
(gimp-selection-feather img shadow-feather)
diff --git a/plug-ins/script-fu/scripts/news-text.scm b/plug-ins/script-fu/scripts/news-text.scm
index 21b455a..03c67bc 100644
--- a/plug-ins/script-fu/scripts/news-text.scm
+++ b/plug-ins/script-fu/scripts/news-text.scm
@@ -50,7 +50,7 @@
(set! text-mask (car (gimp-layer-create-mask text-layer ADD-ALPHA-MASK)))
(gimp-layer-add-mask text-layer text-mask)
- (gimp-selection-layer-alpha text-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
(gimp-context-set-background (list grey grey grey))
(gimp-edit-fill text-mask BACKGROUND-FILL)
(gimp-selection-none img)
diff --git a/plug-ins/script-fu/scripts/perspective-shadow.scm b/plug-ins/script-fu/scripts/perspective-shadow.scm
index 0d9c78b..78ac742 100644
--- a/plug-ins/script-fu/scripts/perspective-shadow.scm
+++ b/plug-ins/script-fu/scripts/perspective-shadow.scm
@@ -58,7 +58,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)
@@ -148,14 +148,16 @@
image-offset-x
image-offset-y)))
- (gimp-drawable-transform-perspective shadow-layer
+ (gimp-context-set-transform-direction TRANSFORM-FORWARD)
+ (gimp-context-set-interpolation interpolation)
+ (gimp-context-set-transform-recursion 3)
+ (gimp-context-set-transform-resize TRANSFORM-RESIZE-ADJUST)
+
+ (gimp-item-transform-perspective shadow-layer
x0 y0
x1 y1
x2 y2
- x3 y3
- TRANSFORM-FORWARD
- interpolation
- TRUE 3 TRANSFORM-RESIZE-ADJUST)
+ x3 y3)
(if (>= shadow-blur 1.0)
(begin
@@ -179,9 +181,9 @@
(gimp-image-remove-channel image active-selection)))
(if (and
- (= (car (gimp-layer-is-floating-sel drawable)) 0)
- (= from-selection FALSE))
- (gimp-image-raise-item image drawable))
+ (= (car (gimp-layer-is-floating-sel drawable)) 0)
+ (= from-selection FALSE))
+ (gimp-image-raise-item image drawable))
(gimp-image-set-active-layer image drawable)
(gimp-image-undo-group-end image)
diff --git a/plug-ins/script-fu/scripts/predator.scm b/plug-ins/script-fu/scripts/predator.scm
index 3bc0b7e..adb8fe1 100644
--- a/plug-ins/script-fu/scripts/predator.scm
+++ b/plug-ins/script-fu/scripts/predator.scm
@@ -50,7 +50,7 @@
(if (= (car (gimp-selection-is-empty image)) TRUE)
(begin
- (gimp-selection-layer-alpha drawable)
+ (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
(set! active-selection (car (gimp-selection-save image)))
(set! from-selection FALSE)
)
@@ -82,7 +82,7 @@
(gimp-selection-none image)
(gimp-edit-clear effect-layer)
- (gimp-selection-load active-selection)
+ (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
(gimp-edit-copy drawable)
(let ((floating-sel (car (gimp-edit-paste effect-layer FALSE))))
(gimp-floating-sel-anchor floating-sel)
@@ -101,7 +101,7 @@
(plug-in-edge RUN-NONINTERACTIVE image active-layer edge-amount 1 0)
; clean up the selection copy
- (gimp-selection-load active-selection)
+ (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
(if (= keep-selection FALSE)
(gimp-selection-none image)
diff --git a/plug-ins/script-fu/scripts/pupi-button.scm b/plug-ins/script-fu/scripts/pupi-button.scm
index 5b81117..4300473 100644
--- a/plug-ins/script-fu/scripts/pupi-button.scm
+++ b/plug-ins/script-fu/scripts/pupi-button.scm
@@ -82,11 +82,11 @@
height
ratio)
(let* ((diameter (* ratio height)))
- (gimp-ellipse-select img x y diameter height CHANNEL-OP-ADD FALSE 0 0)
- (gimp-ellipse-select img (+ x (- width diameter)) y
- diameter height CHANNEL-OP-ADD FALSE 0 0)
- (gimp-rect-select img (+ x (/ diameter 2)) y
- (- width diameter) height CHANNEL-OP-ADD FALSE 0)))
+ (gimp-image-select-ellipse img CHANNEL-OP-ADD x y diameter height)
+ (gimp-image-select-ellipse img CHANNEL-OP-ADD (+ x (- width diameter)) y
+ diameter height)
+ (gimp-image-select-rectangle img CHANNEL-OP-ADD (+ x (/ diameter 2)) y
+ (- width diameter) height)))
(let* (
(text-extents (gimp-text-get-extents-fontname text
@@ -115,6 +115,7 @@
(gimp-context-push)
+ (gimp-context-set-antialias FALSE)
(gimp-image-undo-disable img)
; Create bumpmap layer
diff --git a/plug-ins/script-fu/scripts/round-corners.scm b/plug-ins/script-fu/scripts/round-corners.scm
index cecbb5d..83aa58f 100644
--- a/plug-ins/script-fu/scripts/round-corners.scm
+++ b/plug-ins/script-fu/scripts/round-corners.scm
@@ -58,6 +58,10 @@
img)))
(pic-layer (car (gimp-image-get-active-drawable image))))
+ (gimp-context-push)
+ (gimp-context-set-antialias TRUE)
+ (gimp-context-set-feather FALSE)
+
(if (= work-on-copy TRUE)
(gimp-image-undo-disable image)
(gimp-image-undo-group-start image)
@@ -68,16 +72,16 @@
; round the edges
(gimp-selection-none image)
- (gimp-rect-select image 0 0 radius radius CHANNEL-OP-ADD 0 0)
- (gimp-ellipse-select image 0 0 diam diam CHANNEL-OP-SUBTRACT TRUE 0 0)
- (gimp-rect-select image (- width radius) 0 radius radius CHANNEL-OP-ADD 0 0)
- (gimp-ellipse-select image (- width diam) 0 diam diam CHANNEL-OP-SUBTRACT TRUE 0 0)
- (gimp-rect-select image 0 (- height radius) radius radius CHANNEL-OP-ADD 0 0)
- (gimp-ellipse-select image 0 (- height diam) diam diam CHANNEL-OP-SUBTRACT TRUE 0 0)
- (gimp-rect-select image (- width radius) (- height radius)
- radius radius CHANNEL-OP-ADD 0 0)
- (gimp-ellipse-select image (- width diam) (- height diam)
- diam diam CHANNEL-OP-SUBTRACT TRUE 0 0)
+ (gimp-image-select-rectangle image CHANNEL-OP-ADD 0 0 radius radius)
+ (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT 0 0 diam diam)
+ (gimp-image-select-rectangle image CHANNEL-OP-ADD (- width radius) 0 radius radius)
+ (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT (- width diam) 0 diam diam)
+ (gimp-image-select-rectangle image CHANNEL-OP-ADD 0 (- height radius) radius radius)
+ (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT 0 (- height diam) diam diam)
+ (gimp-image-select-rectangle image CHANNEL-OP-ADD (- width radius) (- height radius)
+ radius radius)
+ (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT (- width diam) (- height diam)
+ diam diam)
(gimp-edit-clear pic-layer)
(gimp-selection-none image)
@@ -118,6 +122,7 @@
(if (= work-on-copy TRUE)
(gimp-display-new image))
+ (gimp-context-pop)
(gimp-displays-flush))
)
diff --git a/plug-ins/script-fu/scripts/select-to-brush.scm b/plug-ins/script-fu/scripts/select-to-brush.scm
index d3e32a7..6960e82 100644
--- a/plug-ins/script-fu/scripts/select-to-brush.scm
+++ b/plug-ins/script-fu/scripts/select-to-brush.scm
@@ -52,7 +52,7 @@
(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
@@ -111,7 +111,7 @@
(if (= from-selection TRUE)
(begin
- (gimp-selection-load active-selection)
+ (gimp-image-select-item image CHANNEL-OP-REPLACE active-selection)
(gimp-image-remove-channel image active-selection)
)
)
diff --git a/plug-ins/script-fu/scripts/selection-round.scm b/plug-ins/script-fu/scripts/selection-round.scm
index 6c120c7..18c5c90 100644
--- a/plug-ins/script-fu/scripts/selection-round.scm
+++ b/plug-ins/script-fu/scripts/selection-round.scm
@@ -52,11 +52,14 @@
(ellipse-radius 0)
)
+ (gimp-context-push)
+ (gimp-context-set-antialias FALSE)
+ (gimp-context-set-feather FALSE)
+
;; select to the full bounds of the selection,
;; fills in irregular shapes or holes.
- (gimp-rect-select image
- select-x1 select-y1 select-width select-height
- CHANNEL-OP-ADD FALSE 0)
+ (gimp-image-select-rectangle image CHANNEL-OP-ADD
+ select-x1 select-y1 select-width select-height)
(if (> select-width select-height)
(set! cut-radius (trunc (+ 1 (* radius (/ select-height 2)))))
@@ -64,84 +67,66 @@
)
(set! ellipse-radius (* cut-radius 2))
+ (gimp-context-set-antialias TRUE)
;; cut away rounded (concave) corners
; top right
- (gimp-ellipse-select image
- (- select-x1 cut-radius)
- (- select-y1 cut-radius)
- (* cut-radius 2)
- (* cut-radius 2)
- CHANNEL-OP-SUBTRACT
- TRUE
- FALSE 0)
+ (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT
+ (- select-x1 cut-radius)
+ (- select-y1 cut-radius)
+ (* cut-radius 2)
+ (* cut-radius 2))
; lower left
- (gimp-ellipse-select image
- (- select-x1 cut-radius)
- (- select-y2 cut-radius)
- (* cut-radius 2)
- (* cut-radius 2)
- CHANNEL-OP-SUBTRACT
- TRUE
- FALSE 0)
+ (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT
+ (- select-x1 cut-radius)
+ (- select-y2 cut-radius)
+ (* cut-radius 2)
+ (* cut-radius 2))
; top right
- (gimp-ellipse-select image
- (- select-x2 cut-radius)
- (- select-y1 cut-radius)
- (* cut-radius 2)
- (* cut-radius 2)
- CHANNEL-OP-SUBTRACT
- TRUE
- FALSE 0)
+ (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT
+ (- select-x2 cut-radius)
+ (- select-y1 cut-radius)
+ (* cut-radius 2)
+ (* cut-radius 2))
; bottom left
- (gimp-ellipse-select image
- (- select-x2 cut-radius)
- (- select-y2 cut-radius)
- (* cut-radius 2)
- (* cut-radius 2)
- CHANNEL-OP-SUBTRACT
- TRUE
- FALSE 0)
+ (gimp-image-select-ellipse image CHANNEL-OP-SUBTRACT
+ (- select-x2 cut-radius)
+ (- select-y2 cut-radius)
+ (* cut-radius 2)
+ (* cut-radius 2))
;; add in rounded (convex) corners
(if (= concave FALSE)
(begin
- (gimp-ellipse-select image
- select-x1
- select-y1
- ellipse-radius
- ellipse-radius
- CHANNEL-OP-ADD
- TRUE
- FALSE 0)
- (gimp-ellipse-select image
- select-x1
- (- select-y2 ellipse-radius)
- ellipse-radius
- ellipse-radius
- CHANNEL-OP-ADD
- TRUE
- FALSE 0)
- (gimp-ellipse-select image
- (- select-x2 ellipse-radius)
- select-y1
- ellipse-radius
- ellipse-radius
- CHANNEL-OP-ADD
- TRUE
- FALSE 0)
- (gimp-ellipse-select image
- (- select-x2 ellipse-radius)
- (- select-y2 ellipse-radius)
- ellipse-radius
- ellipse-radius
- CHANNEL-OP-ADD
- TRUE
- FALSE 0)
+ (gimp-image-select-ellipse image
+ CHANNEL-OP-ADD
+ select-x1
+ select-y1
+ ellipse-radius
+ ellipse-radius)
+ (gimp-image-select-ellipse image
+ CHANNEL-OP-ADD
+ select-x1
+ (- select-y2 ellipse-radius)
+ ellipse-radius
+ ellipse-radius)
+ (gimp-image-select-ellipse image
+ CHANNEL-OP-ADD
+ (- select-x2 ellipse-radius)
+ select-y1
+ ellipse-radius
+ ellipse-radius)
+ (gimp-image-select-ellipse image
+ CHANNEL-OP-ADD
+ (- select-x2 ellipse-radius)
+ (- select-y2 ellipse-radius)
+ ellipse-radius
+ ellipse-radius)
)
)
(gimp-image-undo-group-end image)
(gimp-displays-flush)
+ (gimp-context-pop)
)
)
diff --git a/plug-ins/script-fu/scripts/sota-chrome-logo.scm b/plug-ins/script-fu/scripts/sota-chrome-logo.scm
index f3031b1..1464172 100644
--- a/plug-ins/script-fu/scripts/sota-chrome-logo.scm
+++ b/plug-ins/script-fu/scripts/sota-chrome-logo.scm
@@ -106,6 +106,7 @@
)
(gimp-context-push)
+ (gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
(gimp-image-resize img width height 0 0)
@@ -120,11 +121,11 @@
(gimp-item-set-visible text-layer FALSE)
(gimp-item-set-visible shadow FALSE)
- (gimp-rect-select img (/ b-size 2) (/ b-size 2) (- width b-size) (- height b-size) CHANNEL-OP-REPLACE 0 0)
- (gimp-rect-select img b-size b-size (- width (* b-size 2)) (- height (* b-size 2)) CHANNEL-OP-SUBTRACT 0 0)
+ (gimp-image-select-rectangle img CHANNEL-OP-REPLACE (/ b-size 2) (/ b-size 2) (- width b-size) (- height b-size))
+ (gimp-image-select-rectangle img CHANNEL-OP-SUBTRACT b-size b-size (- width (* b-size 2)) (- height (* b-size 2)))
(gimp-edit-fill text-layer BACKGROUND-FILL)
- (gimp-selection-layer-alpha text-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
(gimp-context-set-background '(0 0 0))
(gimp-selection-translate img offx1 offy1)
(gimp-selection-feather img feather)
@@ -150,7 +151,7 @@
(set! layer-mask (car (gimp-layer-create-mask layer1 ADD-BLACK-MASK)))
(gimp-layer-add-mask layer1 layer-mask)
- (gimp-selection-layer-alpha text-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill layer-mask BACKGROUND-FILL)
diff --git a/plug-ins/script-fu/scripts/speed-text.scm b/plug-ins/script-fu/scripts/speed-text.scm
index 5843125..4f099a1 100644
--- a/plug-ins/script-fu/scripts/speed-text.scm
+++ b/plug-ins/script-fu/scripts/speed-text.scm
@@ -47,7 +47,7 @@
(gimp-floating-sel-anchor (car (gimp-text-fontname img text-layer 10 10 string 0 TRUE font-size PIXELS font)))
; save the selection for later
- (gimp-selection-layer-alpha text-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
(set! saved-sel (car (gimp-selection-save img)))
; add layer mask
@@ -62,7 +62,7 @@
; feather the mask
(gimp-layer-set-edit-mask text-layer TRUE)
- (gimp-selection-load saved-sel)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE saved-sel)
(gimp-selection-feather img 10)
(gimp-context-set-background (list grey grey grey))
(gimp-edit-fill text-mask BACKGROUND-FILL)
diff --git a/plug-ins/script-fu/scripts/starscape-logo.scm b/plug-ins/script-fu/scripts/starscape-logo.scm
index 0ca69f1..0301174 100644
--- a/plug-ins/script-fu/scripts/starscape-logo.scm
+++ b/plug-ins/script-fu/scripts/starscape-logo.scm
@@ -76,7 +76,7 @@
(gimp-selection-none img)
(script-fu-util-image-resize-from-layer img logo-layer)
(script-fu-util-image-add-layers img shadow-layer glow-layer bg-layer)
- (gimp-image-add-channel img bump-channel 0)
+ (gimp-image-insert-channel img bump-channel 0 0)
(gimp-layer-set-lock-alpha logo-layer TRUE)
(gimp-context-set-background '(0 0 0))
@@ -84,14 +84,14 @@
(gimp-edit-clear shadow-layer)
(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-background glow-color)
(gimp-selection-feather img feather)
(gimp-edit-fill glow-layer BACKGROUND-FILL)
- (gimp-selection-layer-alpha logo-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(gimp-selection-feather img shadow-feather)
(gimp-context-set-background '(0 0 0))
(gimp-selection-translate img offx offy)
diff --git a/plug-ins/script-fu/scripts/swirly-pattern.scm b/plug-ins/script-fu/scripts/swirly-pattern.scm
index 4cf640c..2ee0550 100644
--- a/plug-ins/script-fu/scripts/swirly-pattern.scm
+++ b/plug-ins/script-fu/scripts/swirly-pattern.scm
@@ -34,6 +34,7 @@
100 NORMAL-MODE))))
(gimp-context-push)
+ (gimp-context-set-feather FALSE)
(gimp-image-undo-disable img)
(gimp-image-insert-layer img drawable 0 0)
@@ -47,23 +48,23 @@
; Whirl upper left
- (gimp-rect-select img 0 0 hsize hsize CHANNEL-OP-REPLACE 0 0)
+ (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 0 hsize hsize)
(whirl-it img drawable angle times)
(gimp-invert drawable)
; Whirl upper right
- (gimp-rect-select img hsize 0 hsize hsize CHANNEL-OP-REPLACE 0 0)
+ (gimp-image-select-rectangle img CHANNEL-OP-REPLACE hsize 0 hsize hsize)
(whirl-it img drawable (- angle) times)
; Whirl lower left
- (gimp-rect-select img 0 hsize hsize hsize CHANNEL-OP-REPLACE 0 0)
+ (gimp-image-select-rectangle img CHANNEL-OP-REPLACE 0 hsize hsize hsize)
(whirl-it img drawable (- angle) times)
; Whirl lower right
- (gimp-rect-select img hsize hsize hsize hsize CHANNEL-OP-REPLACE 0 0)
+ (gimp-image-select-rectangle img CHANNEL-OP-REPLACE hsize hsize hsize hsize)
(whirl-it img drawable angle times)
(gimp-invert drawable)
@@ -74,7 +75,7 @@
(gimp-display-new img)
(gimp-context-pop)
- )
+ )
)
(script-fu-register "script-fu-swirly-pattern"
diff --git a/plug-ins/script-fu/scripts/t-o-p-logo.scm b/plug-ins/script-fu/scripts/t-o-p-logo.scm
index a659295..cdb8b4f 100644
--- a/plug-ins/script-fu/scripts/t-o-p-logo.scm
+++ b/plug-ins/script-fu/scripts/t-o-p-logo.scm
@@ -31,7 +31,7 @@
(gimp-edit-clear sparkle-layer)
(gimp-context-set-background base-color)
(gimp-edit-fill sparkle-layer BACKGROUND-FILL)
- (gimp-selection-layer-alpha logo-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE logo-layer)
(set! selection (car (gimp-selection-save img)))
(gimp-selection-grow img edge-size)
(plug-in-noisify RUN-NONINTERACTIVE img sparkle-layer FALSE
@@ -40,22 +40,22 @@
(plug-in-noisify RUN-NONINTERACTIVE img sparkle-layer FALSE hit-rate hit-rate hit-rate 0.0)
(gimp-selection-none img)
(plug-in-sparkle RUN-NONINTERACTIVE img sparkle-layer 0.03 0.49 width 6 15 1.0 0.0 0.0 0.0 FALSE FALSE FALSE 0)
- (gimp-selection-load selection)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
(gimp-selection-shrink img edge-size)
(gimp-levels sparkle-layer 0 0 255 1.2 0 255)
- (gimp-selection-load selection)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
(gimp-selection-border img edge-size)
(gimp-levels sparkle-layer 0 0 255 0.5 0 255)
- (gimp-selection-load selection)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
(gimp-selection-grow img (/ edge-size 2.0))
(gimp-selection-invert img)
(gimp-edit-clear sparkle-layer)
(if (= edge-only TRUE)
(begin
- (gimp-selection-load selection)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
(gimp-selection-shrink img (/ edge-size 2.0))
(gimp-edit-clear sparkle-layer)
- (gimp-selection-load selection)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE selection)
(gimp-selection-grow img (/ edge-size 2.0))
(gimp-selection-invert img)))
(gimp-context-set-foreground '(0 0 0))
diff --git a/plug-ins/script-fu/scripts/test-sphere.scm b/plug-ins/script-fu/scripts/test-sphere.scm
index 933b038..f9d4664 100644
--- a/plug-ins/script-fu/scripts/test-sphere.scm
+++ b/plug-ins/script-fu/scripts/test-sphere.scm
@@ -199,6 +199,7 @@
)
(gimp-context-push)
+ (gimp-context-set-antialias TRUE)
(gimp-image-undo-disable img)
(gimp-image-insert-layer img drawable 0 0)
@@ -219,14 +220,16 @@
(begin (set! shadow-x (+ cx shadow-w))
(set! shadow-w (- shadow-w))))
- (gimp-ellipse-select img shadow-x shadow-y shadow-w shadow-h
- CHANNEL-OP-REPLACE TRUE TRUE 7.5)
+ (gimp-context-set-feather TRUE)
+ (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-context-set-pattern pattern)
(gimp-edit-bucket-fill drawable PATTERN-BUCKET-FILL MULTIPLY-MODE
- 100 0 FALSE 0 0)))
+ 100 0 FALSE 0 0)))
- (gimp-ellipse-select img (- cx radius) (- cy radius)
- (* 2 radius) (* 2 radius) CHANNEL-OP-REPLACE TRUE FALSE 0)
+ (gimp-context-set-feather FALSE)
+ (gimp-image-select-ellipse img CHANNEL-OP-REPLACE (- cx radius) (- cy radius)
+ (* 2 radius) (* 2 radius))
(gimp-edit-blend drawable FG-BG-RGB-MODE NORMAL-MODE
GRADIENT-RADIAL 100 offset REPEAT-NONE FALSE
@@ -236,7 +239,7 @@
(gimp-selection-none img)
(gimp-context-set-gradient gradient)
- (gimp-ellipse-select img 10 10 50 50 CHANNEL-OP-REPLACE TRUE FALSE 0)
+ (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 10 10 50 50)
(gimp-edit-blend drawable CUSTOM-MODE NORMAL-MODE
GRADIENT-LINEAR 100 offset REPEAT-NONE gradient-reverse
diff --git a/plug-ins/script-fu/scripts/text-circle.scm b/plug-ins/script-fu/scripts/text-circle.scm
index 0750dde..54358f5 100644
--- a/plug-ins/script-fu/scripts/text-circle.scm
+++ b/plug-ins/script-fu/scripts/text-circle.scm
@@ -30,7 +30,7 @@
(script-fu-text-circle-debug? #f)
(img (car (gimp-image-new drawable-size drawable-size RGB)))
(BG-layer (car (gimp-layer-new img drawable-size drawable-size
- RGBA-IMAGE "background" 100 NORMAL-MODE)))
+ RGBA-IMAGE "background" 100 NORMAL-MODE)))
(merged-layer #f)
(char-num (string-length text))
(radian-step 0)
@@ -38,7 +38,7 @@
(center-x (/ drawable-size 2))
(center-y center-x)
(font-infos (gimp-text-get-extents-fontname "lAgy" font-size
- PIXELS font-name))
+ PIXELS font-name))
(desc (nth 3 font-infos))
(start-angle-rad (* (/ (modulo start-angle 360) 360) 2 *pi*))
(angle-list #f)
@@ -54,6 +54,8 @@
(radian-step 0)
)
+ (gimp-context-push)
+ (gimp-context-set-antialias antialias)
(gimp-image-undo-disable img)
(gimp-image-insert-layer img BG-layer 0 0)
(gimp-edit-fill BG-layer BACKGROUND-FILL)
@@ -92,10 +94,10 @@
(set! temp-str "x")
)
(set! temp-layer (car (gimp-text-fontname img -1 0 0
- temp-str
- 1 antialias
- font-size PIXELS
- font-name)))
+ temp-str
+ 1 antialias
+ font-size PIXELS
+ font-name)))
(set! temp-list (cons (car (gimp-drawable-width temp-layer)) temp-list))
(gimp-image-remove-layer img temp-layer)
(set! ndx (+ ndx ndx-step))
@@ -125,10 +127,10 @@
;; Running gimp-text with " " causes an error!
(let* (
(new-layer (car (gimp-text-fontname img -1 0 0
- letter
- 1 antialias
- font-size PIXELS
- font-name)))
+ letter
+ 1 antialias
+ font-size PIXELS
+ font-name)))
(width (car (gimp-drawable-width new-layer)))
(height (car (gimp-drawable-height new-layer)))
(rotate-radius (- (/ height 2) desc))
@@ -143,10 +145,9 @@
(set! rot-op (if (< 0 fill-angle-rad) + -))
(set! rot-op (if (> 0 fill-angle-rad) + -))
)
- (gimp-drawable-transform-rotate-default new-layer
- (rot-op angle rad-90)
- TRUE 0 0
- TRUE FALSE)
+ (gimp-item-transform-rotate new-layer
+ (rot-op angle rad-90)
+ TRUE 0 0)
(gimp-layer-translate new-layer
(+ center-x
(* radius (cos angle))
@@ -196,6 +197,7 @@
(gimp-image-undo-enable img)
(gimp-image-clean-all img)
(gimp-display-new img)
+ (gimp-context-pop)
(gimp-displays-flush)
)
)
diff --git a/plug-ins/script-fu/scripts/textured-logo.scm b/plug-ins/script-fu/scripts/textured-logo.scm
index 0dde4f1..f19a3a5 100644
--- a/plug-ins/script-fu/scripts/textured-logo.scm
+++ b/plug-ins/script-fu/scripts/textured-logo.scm
@@ -37,6 +37,7 @@
)
(gimp-context-push)
+ (gimp-context-set-feather TRUE)
(script-fu-util-image-resize-from-layer img logo-layer)
(script-fu-util-image-add-layers img text-shadow-layer drop-shadow-layer blend-layer shadow-layer)
@@ -50,11 +51,12 @@
(gimp-edit-clear drop-shadow-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-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)
@@ -86,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)
diff --git a/plug-ins/script-fu/scripts/title-header.scm b/plug-ins/script-fu/scripts/title-header.scm
index ca7ab56..fcfeaa8 100644
--- a/plug-ins/script-fu/scripts/title-header.scm
+++ b/plug-ins/script-fu/scripts/title-header.scm
@@ -79,6 +79,8 @@
)
(gimp-context-push)
+ (gimp-context-set-antialias TRUE)
+ (gimp-context-set-feather FALSE)
; Create image
@@ -101,7 +103,7 @@
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill bumpmap-layer BACKGROUND-FILL)
- (gimp-selection-layer-alpha text-layer)
+ (gimp-image-select-item img CHANNEL-OP-REPLACE text-layer)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill bumpmap-layer BACKGROUND-FILL)
(gimp-selection-none img)
@@ -129,7 +131,7 @@
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill bg-layer BACKGROUND-FILL)
- (gimp-ellipse-select img 0 0 text-height text-height CHANNEL-OP-REPLACE TRUE FALSE 0)
+ (gimp-image-select-ellipse img CHANNEL-OP-REPLACE 0 0 text-height text-height)
(gimp-context-set-background (car (gimp-image-pick-color img text-layer
text-layers-offset 0
TRUE FALSE 0)))
@@ -137,8 +139,9 @@
; Fade-out gradient at the right
- (gimp-rect-select img (- img-width fade-width) 0 fade-width text-height
- CHANNEL-OP-REPLACE FALSE 0)
+ (gimp-image-select-rectangle img CHANNEL-OP-REPLACE
+ (- img-width fade-width) 0
+ fade-width text-height)
(gimp-context-set-foreground (car (gimp-context-get-background)))
(gimp-context-set-background '(0 0 0))
diff --git a/plug-ins/script-fu/scripts/truchet.scm b/plug-ins/script-fu/scripts/truchet.scm
index 4157945..cc81657 100644
--- a/plug-ins/script-fu/scripts/truchet.scm
+++ b/plug-ins/script-fu/scripts/truchet.scm
@@ -27,8 +27,12 @@
; NOTE: This script works best with even values for 'thickness'.
(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)
)
(define (use-tiles img drawable height width img2 drawable2 xoffset yoffset)
@@ -47,6 +51,8 @@
(inner-radius (- (/ size 2) half-thickness))
)
+ (gimp-context-push)
+
(gimp-selection-all img)
(gimp-context-set-background backcolor)
(gimp-edit-fill drawable1 BACKGROUND-FILL)
@@ -55,7 +61,7 @@
(tempSize (* size 3))
(temp-img (car (gimp-image-new tempSize tempSize RGB)))
(temp-draw (car (gimp-layer-new temp-img tempSize tempSize RGB-IMAGE "Jabar" 100 NORMAL-MODE)))
- )
+ )
(gimp-image-undo-disable temp-img)
(gimp-image-insert-layer temp-img temp-draw 0 0)
(gimp-context-set-background backcolor)
@@ -65,8 +71,8 @@
(center-ellipse temp-img size size outer-radius outer-radius CHANNEL-OP-REPLACE TRUE FALSE 0)
(center-ellipse temp-img size size inner-radius inner-radius CHANNEL-OP-SUBTRACT TRUE FALSE 0)
- (center-ellipse temp-img (* size 2) (* size 2) outer-radius outer-radius CHANNEL-OP-ADD TRUE FALSE 0)
- (center-ellipse temp-img (* size 2) (* size 2) inner-radius inner-radius CHANNEL-OP-SUBTRACT TRUE FALSE 0)
+ (center-ellipse temp-img (* size 2) (* size 2) outer-radius outer-radius CHANNEL-OP-ADD TRUE FALSE 0)
+ (center-ellipse temp-img (* size 2) (* size 2) inner-radius inner-radius CHANNEL-OP-SUBTRACT TRUE FALSE 0)
(gimp-context-set-background forecolor)
(gimp-edit-fill temp-draw BACKGROUND-FILL)
@@ -85,12 +91,14 @@
(let ((floating-sel (car (gimp-edit-paste drawable1 FALSE))))
(gimp-floating-sel-anchor floating-sel))
- (let ((drawble (car (gimp-drawable-transform-flip-simple drawable1
- ORIENTATION-VERTICAL TRUE 0 TRUE)))))
+ (gimp-context-set-transform-resize TRANSFORM-RESIZE-CLIP)
+ (let ((drawble (car (gimp-item-transform-flip-simple drawable1
+ ORIENTATION-VERTICAL TRUE 0)))))
;(gimp-display-new temp-img)
(gimp-image-delete temp-img)
+ (gimp-context-pop)
)
)
)
diff --git a/plug-ins/script-fu/scripts/weave.scm b/plug-ins/script-fu/scripts/weave.scm
index 1fc3364..28fdb1c 100644
--- a/plug-ins/script-fu/scripts/weave.scm
+++ b/plug-ins/script-fu/scripts/weave.scm
@@ -29,7 +29,7 @@
height
dest-x
dest-y)
- (gimp-rect-select img x1 y1 width height CHANNEL-OP-REPLACE FALSE 0)
+ (gimp-image-select-rectangle img CHANNEL-OP-REPLACE x1 y1 width height)
(gimp-edit-copy drawable)
(let ((floating-sel (car (gimp-edit-paste drawable FALSE))))
(gimp-layer-set-offsets floating-sel dest-x dest-y)
@@ -47,6 +47,7 @@
(img (car (gimp-image-new tile-size tile-size RGB)))
(drawable (car (gimp-layer-new img tile-size tile-size RGB-IMAGE
"Weave tile" 100 NORMAL-MODE))))
+
(gimp-image-undo-disable img)
(gimp-image-insert-layer img drawable 0 0)
@@ -58,14 +59,12 @@
(gimp-context-set-foreground '(255 255 255))
(gimp-context-set-background (list darkness darkness darkness))
- (gimp-rect-select img
- 0
- ribbon-spacing
- (+ (* 2 ribbon-spacing) ribbon-width)
- ribbon-width
- CHANNEL-OP-REPLACE
- FALSE
- 0)
+ (gimp-image-select-rectangle img
+ CHANNEL-OP-REPLACE
+ 0
+ ribbon-spacing
+ (+ (* 2 ribbon-spacing) ribbon-width)
+ ribbon-width)
(gimp-edit-blend drawable FG-BG-RGB-MODE NORMAL-MODE
GRADIENT-BILINEAR 100 (- 100 shadow-depth) REPEAT-NONE FALSE
@@ -74,14 +73,12 @@
; Create main vertical ribbon
- (gimp-rect-select img
- (+ (* 2 ribbon-spacing) ribbon-width)
- 0
- ribbon-width
- (+ (* 2 ribbon-spacing) ribbon-width)
- CHANNEL-OP-REPLACE
- FALSE
- 0)
+ (gimp-image-select-rectangle img
+ CHANNEL-OP-REPLACE
+ (+ (* 2 ribbon-spacing) ribbon-width)
+ 0
+ ribbon-width
+ (+ (* 2 ribbon-spacing) ribbon-width))
(gimp-edit-blend drawable FG-BG-RGB-MODE NORMAL-MODE
GRADIENT-BILINEAR 100 (- 100 shadow-depth) REPEAT-NONE FALSE
@@ -131,7 +128,6 @@
; Done
(gimp-image-undo-enable img)
-
(list img drawable)))
; Creates a complete weaving mask
@@ -176,9 +172,9 @@
(gimp-context-set-background '(0 0 0))
(gimp-edit-fill drawable BACKGROUND-FILL)
- (gimp-rect-select img r1-x1 r1-y1 r1-width r1-height CHANNEL-OP-REPLACE FALSE 0)
- (gimp-rect-select img r2-x1 r2-y1 r2-width r2-height CHANNEL-OP-ADD FALSE 0)
- (gimp-rect-select img r3-x1 r3-y1 r3-width r3-height CHANNEL-OP-ADD FALSE 0)
+ (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 r3-x1 r3-y1 r3-width r3-height)
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill drawable BACKGROUND-FILL)
@@ -370,6 +366,7 @@
)
(gimp-context-push)
+ (gimp-context-set-feather FALSE)
(gimp-selection-all w-img)
(gimp-edit-copy w-layer)
diff --git a/plug-ins/script-fu/scripts/xach-effect.scm b/plug-ins/script-fu/scripts/xach-effect.scm
index b7ad387..daa33ac 100644
--- a/plug-ins/script-fu/scripts/xach-effect.scm
+++ b/plug-ins/script-fu/scripts/xach-effect.scm
@@ -57,7 +57,7 @@
(if (= (car (gimp-selection-is-empty image)) TRUE)
(begin
- (gimp-selection-layer-alpha drawable)
+ (gimp-image-select-item image CHANNEL-OP-REPLACE drawable)
(set! active-selection (car (gimp-selection-save image)))
(set! from-selection FALSE))
(begin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]