; The GIMP -- an image manipulation program ; Copyright (C) 1995 Spencer Kimball and Peter Mattis ; ; Missing Text ; @author Cameron Gregory, http://www.flamingtext.com/ ; Tue Jun 11 03:34:13 EST 2002 ; Idea from Seth Burgess, who got the idea from http://slashdot.org ; Seth had 1.0 script which I tried to convert. I couldn't get the hang ; of channels, so I created this one from scratch. (define (script-fu-missing-text-logo text size font border bg-color fg-color xoffset yoffset s-offset-x s-offset-y s-blur s-color s-opacity transparent) (let* ((img (car (gimp-image-new 256 256 RGB))) (flatten TRUE) (text-layer (car (gimp-text-fontname img -1 0 0 text border TRUE size PIXELS font))) (width (car (gimp-drawable-width text-layer))) (height (car (gimp-drawable-height text-layer))) (old-fg (car (gimp-palette-get-foreground))) (old-bg (car (gimp-palette-get-background))) ) (gimp-image-undo-disable img) (gimp-image-resize img width height 0 0) (gimp-selection-layer-alpha text-layer) ; little hack to make jaggy around the cut out look nicer (gimp-selection-shrink img 1) (gimp-selection-translate img xoffset yoffset) (gimp-selection-invert img) (gimp-context-set-background fg-color) (gimp-edit-fill text-layer BACKGROUND-FILL) (gimp-selection-invert img) ; little hack to make jaggy around the cut out look nicer (gimp-selection-grow img 1) (gimp-edit-clear text-layer) (gimp-selection-invert img) (script-fu-drop-shadow img text-layer s-offset-x s-offset-y s-blur s-color s-opacity TRUE) (if (= transparent FALSE) (begin (set! width (car (gimp-image-width img))) (set! height (car (gimp-image-height img))) (set! bg-layer (car (gimp-layer-new img width height RGBA-IMAGE "Background" 100 NORMAL-MODE))) (gimp-context-set-background bg-color) (gimp-drawable-fill bg-layer BACKGROUND-FILL) (gimp-image-add-layer img bg-layer 2) ) ) (gimp-selection-none img) (gimp-context-set-background old-bg) (gimp-context-set-foreground old-fg) (gimp-image-undo-enable img) (gimp-display-new img) )) (script-fu-register "script-fu-missing-text-logo" "/Xtns/Script-Fu/Logos/Missing Text..." "Missing Text (original Missing text by Seth Burges)" "Cameron Gregory " "Cameron Gregory" "June 2002" "" SF-STRING _"Text" "FLAMING TEXT" SF-ADJUSTMENT _"Font Size (pixels)" '(80 2 1000 1 10 0 1) SF-FONT _"Font" (if (symbol-bound? 'extension-winsnap (the-environment)) "-*-Arial-bold-r-*-*-*-*-*-*-*-*-iso8859-1" "-abisource-arial-bold-r-*--*-*-*-*-p-*-iso8859-1") SF-ADJUSTMENT _"Text Border" '(10 0 100 1 10 0 1) SF-COLOR _"Background Color" '(255 255 255) SF-COLOR _"Foreground Color" '(0 160 0 ) SF-ADJUSTMENT _"Text X Offset" '(0 -100 100 1 10 0 1) SF-ADJUSTMENT _"Text Y Offset" '(12 -100 100 1 10 0 1) SF-ADJUSTMENT _"Shadow X Offset" '(4 -100 100 1 10 0 1) SF-ADJUSTMENT _"Shadow Y Offset" '(4 -100 100 1 10 0 1) SF-ADJUSTMENT _"Shadow Blur" '(8 1 100 1 10 1 0) SF-COLOR _"Shadow Color" '(0 0 0) SF-ADJUSTMENT _"Shadow Opacity" '(80 0 100 1 10 1 0) SF-TOGGLE "Transparent?" FALSE )