Converted the first bunch of Script-Fu to the new context API:

2004-09-22  Sven Neumann  <sven@gimp.org>

	Converted the first bunch of Script-Fu to the new context API:

	* plug-ins/script-fu/scripts/[3a-c]*.scm: push and pop a context.
	Removed code that used to restore the context values changed by
	the scripts.
This commit is contained in:
Sven Neumann
2004-09-22 17:27:20 +00:00
committed by Sven Neumann
parent 2dffdbeb60
commit 0ef809d6d4
36 changed files with 303 additions and 279 deletions

View File

@ -21,10 +21,12 @@
(define (script-fu-beveled-pattern-bullet diameter pattern transparent)
(let* ((old-bg-color (car (gimp-palette-get-background)))
(img (car (gimp-image-new diameter diameter RGB)))
(let* ((img (car (gimp-image-new diameter diameter RGB)))
(background (car (gimp-layer-new img diameter diameter RGBA-IMAGE "Bullet" 100 NORMAL-MODE)))
(bumpmap (car (gimp-layer-new img diameter diameter RGBA-IMAGE "Bumpmap" 100 NORMAL-MODE))))
(gimp-context-push)
(gimp-image-undo-disable img)
(gimp-image-add-layer img background -1)
(gimp-image-add-layer img bumpmap -1)
@ -68,9 +70,10 @@
(if (= transparent FALSE)
(gimp-image-flatten img))
(gimp-palette-set-background old-bg-color)
(gimp-image-undo-enable img)
(gimp-display-new img)))
(gimp-display-new img)
(gimp-context-pop)))
(script-fu-register "script-fu-beveled-pattern-bullet"