applied patch from Ulf-D. Ehlert. Makes the vacated region, which is

2008-05-06  Sven Neumann  <sven@gimp.org>

	* plug-ins/script-fu/scripts/3d-outline.scm: applied patch from
	 Ulf-D. Ehlert. Makes the vacated region, which is created when
	 specifying a non-zero shadow offset, to be filled with the
	 background color (white) instead of transparency (bug #530216).

svn path=/trunk/; revision=25575
This commit is contained in:
Sven Neumann 2008-05-06 11:52:56 +00:00 committed by Sven Neumann
parent 8d00a7d3eb
commit fe60949678
2 changed files with 34 additions and 23 deletions

View File

@ -1,3 +1,10 @@
2008-05-06 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/scripts/3d-outline.scm: applied patch from
Ulf-D. Ehlert. Makes the vacated region, which is created when
specifying a non-zero shadow offset, to be filled with the
background color (white) instead of transparency (bug #530216).
2008-05-06 Sven Neumann <sven@gimp.org> 2008-05-06 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpcolorprofilestore.c * libgimpwidgets/gimpcolorprofilestore.c

View File

@ -35,10 +35,10 @@
(height (car (gimp-drawable-height logo-layer))) (height (car (gimp-drawable-height logo-layer)))
(bg-layer (car (gimp-layer-new img width height (bg-layer (car (gimp-layer-new img width height
RGB-IMAGE "Background" 100 NORMAL-MODE))) RGB-IMAGE "Background" 100 NORMAL-MODE)))
(pattern (car (gimp-layer-new img width height (pattern-layer (car (gimp-layer-new img width height
RGBA-IMAGE "Pattern" 100 NORMAL-MODE))) RGBA-IMAGE "Pattern" 100 NORMAL-MODE)))
(layer2 0) (alpha-layer 0)
(layer3 0) (shadow-layer 0)
(pattern-mask 0) (pattern-mask 0)
(floating-sel 0) (floating-sel 0)
) )
@ -47,46 +47,50 @@
(gimp-selection-none img) (gimp-selection-none img)
(script-fu-util-image-resize-from-layer img logo-layer) (script-fu-util-image-resize-from-layer img logo-layer)
(script-fu-util-image-add-layers img pattern bg-layer) (script-fu-util-image-add-layers img pattern-layer bg-layer)
(gimp-context-set-background '(255 255 255)) (gimp-context-set-background '(255 255 255))
(gimp-edit-fill bg-layer BACKGROUND-FILL) (gimp-edit-fill bg-layer BACKGROUND-FILL)
(gimp-edit-clear pattern) (gimp-edit-clear pattern-layer)
(gimp-layer-set-lock-alpha logo-layer TRUE) (gimp-layer-set-lock-alpha logo-layer TRUE)
(gimp-context-set-foreground '(0 0 0)) (gimp-context-set-foreground '(0 0 0))
(gimp-edit-fill logo-layer FOREGROUND-FILL) (gimp-edit-fill logo-layer FOREGROUND-FILL)
(gimp-layer-set-lock-alpha logo-layer FALSE) (gimp-layer-set-lock-alpha logo-layer FALSE)
(plug-in-gauss-iir RUN-NONINTERACTIVE img logo-layer outline-blur-radius TRUE TRUE) (plug-in-gauss-iir RUN-NONINTERACTIVE img logo-layer outline-blur-radius TRUE TRUE)
(gimp-drawable-set-visible pattern FALSE) (gimp-drawable-set-visible pattern-layer FALSE)
(set! layer2 (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE))) (set! alpha-layer (car (gimp-image-merge-visible-layers img CLIP-TO-IMAGE)))
(plug-in-edge RUN-NONINTERACTIVE img layer2 2 1 0) (plug-in-edge RUN-NONINTERACTIVE img alpha-layer 2 1 0)
(set! layer3 (car (gimp-layer-copy layer2 TRUE))) (gimp-drawable-set-name alpha-layer "Bump map")
(script-fu-util-image-add-layers img layer3) (set! shadow-layer (car (gimp-layer-copy alpha-layer TRUE)))
(plug-in-gauss-iir RUN-NONINTERACTIVE img layer2 bump-map-blur-radius TRUE TRUE) (gimp-drawable-set-name shadow-layer "Edges")
(script-fu-util-image-add-layers img shadow-layer)
(plug-in-gauss-iir RUN-NONINTERACTIVE img alpha-layer bump-map-blur-radius TRUE TRUE)
(gimp-selection-all img) (gimp-selection-all img)
(gimp-context-set-pattern text-pattern) (gimp-context-set-pattern text-pattern)
(gimp-edit-bucket-fill pattern (gimp-edit-bucket-fill pattern-layer
PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0) PATTERN-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
(plug-in-bump-map noninteractive img pattern layer2 (plug-in-bump-map noninteractive img pattern-layer alpha-layer
110.0 45.0 4 0 0 0 0 TRUE FALSE 0) 110.0 45.0 4 0 0 0 0 TRUE FALSE 0)
(set! pattern-mask (car (gimp-layer-create-mask pattern ADD-ALPHA-MASK))) (set! pattern-mask (car (gimp-layer-create-mask pattern-layer ADD-ALPHA-MASK)))
(gimp-layer-add-mask pattern pattern-mask) (gimp-layer-add-mask pattern-layer pattern-mask)
(gimp-selection-all img) (gimp-selection-all img)
(gimp-edit-copy layer3) (gimp-edit-copy shadow-layer)
(set! floating-sel (car (gimp-edit-paste pattern-mask FALSE))) (set! floating-sel (car (gimp-edit-paste pattern-mask FALSE)))
(gimp-floating-sel-anchor floating-sel) (gimp-floating-sel-anchor floating-sel)
(gimp-layer-remove-mask pattern MASK-APPLY) (gimp-layer-remove-mask pattern-layer MASK-APPLY)
(gimp-invert layer3) (gimp-invert shadow-layer)
(plug-in-gauss-iir RUN-NONINTERACTIVE img layer3 shadow-blur-radius TRUE TRUE) (gimp-drawable-set-name shadow-layer "Drop shadow")
(plug-in-gauss-iir RUN-NONINTERACTIVE img shadow-layer shadow-blur-radius TRUE TRUE)
(gimp-drawable-offset layer3 0 1 s-offset-x s-offset-y) (gimp-drawable-offset shadow-layer
FALSE OFFSET-BACKGROUND s-offset-x s-offset-y)
(gimp-drawable-set-visible layer2 FALSE) (gimp-drawable-set-visible alpha-layer FALSE)
(gimp-drawable-set-visible pattern TRUE) (gimp-drawable-set-visible pattern-layer TRUE)
;;(set! final (car (gimp-image-flatten img))) ;;(set! final (car (gimp-image-flatten img)))
(gimp-context-pop) (gimp-context-pop)