1997-11-24 14:05:25 -08:00
|
|
|
; DROP-SHADOW-LOGO
|
|
|
|
|
; draw the specified text over a background with a drop shadow
|
|
|
|
|
|
2000-06-06 04:52:06 -07:00
|
|
|
(define (apply-basic1-logo-effect img
|
2006-10-15 18:08:54 -07:00
|
|
|
logo-layer
|
|
|
|
|
bg-color
|
|
|
|
|
text-color)
|
|
|
|
|
(let* (
|
|
|
|
|
(width (car (gimp-drawable-width logo-layer)))
|
|
|
|
|
(height (car (gimp-drawable-height logo-layer)))
|
|
|
|
|
(bg-layer (car (gimp-layer-new img width height RGBA-IMAGE "Background" 100 NORMAL-MODE)))
|
|
|
|
|
(shadow-layer (car (gimp-layer-new img width height RGBA-IMAGE "Shadow" 100 MULTIPLY-MODE)))
|
|
|
|
|
)
|
2004-09-22 10:27:20 -07:00
|
|
|
|
|
|
|
|
(gimp-context-push)
|
2006-10-20 10:55:14 -07:00
|
|
|
|
2003-02-27 09:04:04 -08:00
|
|
|
(gimp-selection-none img)
|
|
|
|
|
(script-fu-util-image-resize-from-layer img logo-layer)
|
2008-04-12 03:45:42 -07:00
|
|
|
(script-fu-util-image-add-layers img shadow-layer bg-layer)
|
2004-09-22 11:43:09 -07:00
|
|
|
(gimp-context-set-foreground text-color)
|
2005-07-10 14:17:22 -07:00
|
|
|
(gimp-layer-set-lock-alpha logo-layer TRUE)
|
2003-10-16 05:47:33 -07:00
|
|
|
(gimp-edit-fill logo-layer FOREGROUND-FILL)
|
2004-09-22 11:43:09 -07:00
|
|
|
(gimp-context-set-background bg-color)
|
2003-10-16 05:47:33 -07:00
|
|
|
(gimp-edit-fill bg-layer BACKGROUND-FILL)
|
1998-11-14 12:46:25 -08:00
|
|
|
(gimp-edit-clear shadow-layer)
|
2000-06-06 04:52:06 -07:00
|
|
|
(gimp-selection-layer-alpha logo-layer)
|
2004-09-22 11:43:09 -07:00
|
|
|
(gimp-context-set-background '(0 0 0))
|
1997-11-24 14:05:25 -08:00
|
|
|
(gimp-selection-feather img 7.5)
|
2003-10-16 05:47:33 -07:00
|
|
|
(gimp-edit-fill shadow-layer BACKGROUND-FILL)
|
1997-11-24 14:05:25 -08:00
|
|
|
(gimp-selection-none img)
|
2004-09-22 11:43:09 -07:00
|
|
|
(gimp-context-set-foreground '(255 255 255))
|
2003-07-22 07:24:11 -07:00
|
|
|
|
2004-01-05 06:35:19 -08:00
|
|
|
(gimp-edit-blend logo-layer FG-BG-RGB-MODE MULTIPLY-MODE
|
2006-10-15 18:08:54 -07:00
|
|
|
GRADIENT-RADIAL 100 20 REPEAT-NONE FALSE
|
|
|
|
|
FALSE 0 0 TRUE
|
|
|
|
|
0 0 width height)
|
2003-07-22 07:24:11 -07:00
|
|
|
|
1997-11-24 14:05:25 -08:00
|
|
|
(gimp-layer-translate shadow-layer 3 3)
|
2006-10-20 10:55:14 -07:00
|
|
|
|
2006-10-15 18:08:54 -07:00
|
|
|
(gimp-context-pop)
|
|
|
|
|
)
|
|
|
|
|
)
|
2000-06-06 04:52:06 -07:00
|
|
|
|
2006-10-20 10:55:14 -07:00
|
|
|
|
2000-06-06 04:52:06 -07:00
|
|
|
(define (script-fu-basic1-logo-alpha img
|
2006-10-15 18:08:54 -07:00
|
|
|
logo-layer
|
|
|
|
|
bg-color
|
|
|
|
|
text-color)
|
2000-06-06 04:52:06 -07:00
|
|
|
(begin
|
2003-12-05 06:18:47 -08:00
|
|
|
(gimp-image-undo-group-start img)
|
2000-06-06 04:52:06 -07:00
|
|
|
(apply-basic1-logo-effect img logo-layer bg-color text-color)
|
2003-12-05 06:18:47 -08:00
|
|
|
(gimp-image-undo-group-end img)
|
2006-10-15 18:08:54 -07:00
|
|
|
(gimp-displays-flush)
|
|
|
|
|
)
|
|
|
|
|
)
|
2000-06-06 04:52:06 -07:00
|
|
|
|
|
|
|
|
(script-fu-register "script-fu-basic1-logo-alpha"
|
2006-10-15 18:08:54 -07:00
|
|
|
_"_Basic I..."
|
|
|
|
|
_"Add a gradient effect, a drop shadow, and a background to the selected region (or alpha)"
|
|
|
|
|
"Spencer Kimball"
|
|
|
|
|
"Spencer Kimball"
|
|
|
|
|
"1996"
|
|
|
|
|
"RGBA"
|
|
|
|
|
SF-IMAGE "Image" 0
|
|
|
|
|
SF-DRAWABLE "Drawable" 0
|
2006-10-20 10:55:14 -07:00
|
|
|
SF-COLOR _"Background color" "white"
|
2006-10-15 18:08:54 -07:00
|
|
|
SF-COLOR _"Text color" '(6 6 206)
|
|
|
|
|
)
|
2000-06-06 04:52:06 -07:00
|
|
|
|
2004-11-18 14:44:28 -08:00
|
|
|
(script-fu-menu-register "script-fu-basic1-logo-alpha"
|
2006-10-15 18:08:54 -07:00
|
|
|
"<Image>/Filters/Alpha to Logo")
|
2004-11-18 14:44:28 -08:00
|
|
|
|
2000-06-06 04:52:06 -07:00
|
|
|
(define (script-fu-basic1-logo text
|
2006-10-15 18:08:54 -07:00
|
|
|
size
|
|
|
|
|
font
|
|
|
|
|
bg-color
|
|
|
|
|
text-color)
|
|
|
|
|
(let* (
|
|
|
|
|
(img (car (gimp-image-new 256 256 RGB)))
|
|
|
|
|
(text-layer (car (gimp-text-fontname img -1 0 0 text 10 TRUE size PIXELS font)))
|
|
|
|
|
)
|
2003-07-22 07:24:11 -07:00
|
|
|
|
2000-06-06 04:52:06 -07:00
|
|
|
(gimp-image-undo-disable img)
|
|
|
|
|
(apply-basic1-logo-effect img text-layer bg-color text-color)
|
1999-10-16 17:07:55 -07:00
|
|
|
(gimp-image-undo-enable img)
|
2006-10-15 18:08:54 -07:00
|
|
|
(gimp-display-new img)
|
|
|
|
|
)
|
|
|
|
|
)
|
1997-11-24 14:05:25 -08:00
|
|
|
|
|
|
|
|
(script-fu-register "script-fu-basic1-logo"
|
2006-10-15 18:08:54 -07:00
|
|
|
_"_Basic I..."
|
|
|
|
|
_"Create a plain text logo with a gradient effect, a drop shadow, and a background"
|
|
|
|
|
"Spencer Kimball"
|
|
|
|
|
"Spencer Kimball"
|
|
|
|
|
"1996"
|
|
|
|
|
""
|
2006-10-20 10:55:14 -07:00
|
|
|
SF-STRING _"Text" "GIMP"
|
2006-10-15 18:08:54 -07:00
|
|
|
SF-ADJUSTMENT _"Font size (pixels)" '(100 2 1000 1 10 0 1)
|
|
|
|
|
SF-FONT _"Font" "Dragonwick"
|
2006-10-20 10:55:14 -07:00
|
|
|
SF-COLOR _"Background color" "white"
|
2006-10-15 18:08:54 -07:00
|
|
|
SF-COLOR _"Text color" '(6 6 206)
|
|
|
|
|
)
|
2004-11-18 14:44:28 -08:00
|
|
|
|
|
|
|
|
(script-fu-menu-register "script-fu-basic1-logo"
|
2008-09-19 05:01:12 -07:00
|
|
|
"<Image>/File/Create/Logos")
|