home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 July / CHIP-1999-07.iso / software / gimp / GIMP-SET.EXE / file0378_39f136_39f462.bin < prev    next >
Encoding:
Text File  |  1999-02-28  |  2.1 KB  |  51 lines

  1. ;  ALIEN-GLOW
  2. ;  Create a text effect that simulates an eerie alien glow around text
  3.  
  4. (define (script-fu-alien-glow-logo text size font glow-color)
  5.   (let* ((img (car (gimp-image-new 256 256 RGB)))
  6.      (border (/ size 4))
  7.      (grow (/ size 30))
  8.      (feather (/ size 4))
  9.      (text-layer (car (gimp-text-fontname img -1 0 0 text border TRUE size PIXELS font)))
  10.      (width (car (gimp-drawable-width text-layer)))
  11.      (height (car (gimp-drawable-height text-layer)))
  12.      (bg-layer (car (gimp-layer-new img width height RGB_IMAGE "Background" 100 NORMAL)))
  13.      (glow-layer (car (gimp-layer-new img width height RGBA_IMAGE "Alien Glow" 100 NORMAL)))
  14.      (old-fg (car (gimp-palette-get-foreground)))
  15.      (old-bg (car (gimp-palette-get-background))))
  16.     (gimp-image-disable-undo img)
  17.     (gimp-image-resize img width height 0 0)
  18.     (gimp-image-add-layer img bg-layer 1)
  19.     (gimp-image-add-layer img glow-layer 1)
  20.     (gimp-layer-set-preserve-trans text-layer TRUE)
  21.     (gimp-palette-set-background '(0 0 0))
  22.     (gimp-edit-fill bg-layer)
  23.     (gimp-edit-clear glow-layer)
  24.     (gimp-selection-layer-alpha text-layer)
  25.     (gimp-selection-grow img grow)
  26.     (gimp-selection-feather img feather)
  27.     (gimp-palette-set-background glow-color)
  28.     (gimp-edit-fill glow-layer)
  29.     (gimp-selection-none img)
  30.     (gimp-palette-set-background '(0 0 0))
  31.     (gimp-palette-set-foreground '(79 79 79))
  32.     (gimp-blend text-layer FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE 0 0 0 0 1 1)
  33.     (gimp-layer-set-name text-layer text)
  34.     (gimp-palette-set-background old-bg)
  35.     (gimp-palette-set-foreground old-fg)
  36.     (gimp-image-enable-undo img)
  37.     (gimp-display-new img)))
  38.  
  39.  
  40. (script-fu-register "script-fu-alien-glow-logo"
  41.             "<Toolbox>/Xtns/Script-Fu/Logos/Alien Glow"
  42.             "Create an X-Files-esque logo with the specified glow color"
  43.             "Spencer Kimball"
  44.             "Spencer Kimball"
  45.             "1997"
  46.             ""
  47.             SF-STRING "Text String" "ALIEN"
  48.             SF-ADJUSTMENT "Font Size (pixels)" '(150 2 1000 1 10 0 1)
  49.             SF-FONT "Font" "-*-futura_poster-*-r-*-*-24-*-*-*-p-*-*-*"
  50.             SF-COLOR "Glow Color" '(63 252 0))
  51.