home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 February / PCWorld_2001-02_cd.bin / Software / Topware / gimp / gimp-setup-20001226.exe / Main / alien-glow-bar.scm < prev    next >
Encoding:
Text File  |  2000-12-27  |  3.1 KB  |  82 lines

  1. ; The GIMP -- an image manipulation program
  2. ; Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3. ; Alien Glow themed hrule for web pages
  4. ; Copyright (c) 1997 Adrian Likins
  5. ; aklikins@eos.ncsu.edu
  6. ;
  7. ; This program is free software; you can redistribute it and/or modify
  8. ; it under the terms of the GNU General Public License as published by
  9. ; the Free Software Foundation; either version 2 of the License, or
  10. ; (at your option) any later version.
  11. ; This program is distributed in the hope that it will be useful,
  12. ; but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. ; GNU General Public License for more details.
  15. ; You should have received a copy of the GNU General Public License
  16. ; along with this program; if not, write to the Free Software
  17. ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. (define (script-fu-alien-glow-horizontal-ruler  length height glow-color bg-color flatten)
  20.   (let* ((img (car (gimp-image-new height length RGB)))
  21.      (border (/ height 4))
  22.      (ruler-layer (car (gimp-layer-new img (+ length height) (+ height height) RGBA_IMAGE "Ruler" 100 NORMAL)))
  23.      (glow-layer (car (gimp-layer-new img (+ length height) (+ height height) RGBA_IMAGE "ALien Glow" 100 NORMAL)))
  24.      (bg-layer (car (gimp-layer-new img (+ length height) (+ height height) RGB_IMAGE "Back" 100 NORMAL)))
  25.      (old-fg (car (gimp-palette-get-foreground)))
  26.      (old-bg (car (gimp-palette-get-background))))
  27.     (gimp-image-undo-disable img)
  28.     (gimp-image-resize img (+ length height) (+ height height) 0 0)
  29.     (gimp-image-add-layer img bg-layer 1)
  30.     (gimp-image-add-layer img glow-layer -1)
  31.     (gimp-image-add-layer img ruler-layer -1)
  32.      
  33.    ; (gimp-layer-set-preserve-trans ruler-layer TRUE)
  34.     (gimp-palette-set-background bg-color)
  35.     (gimp-edit-fill bg-layer BG-IMAGE-FILL)
  36.     (gimp-edit-clear glow-layer)
  37.     (gimp-edit-clear ruler-layer)
  38.     
  39.     (gimp-rect-select img (/ height 2) (/ height 2) length height REPLACE FALSE 0)
  40.     (gimp-palette-set-foreground '(79 79 79))
  41.     (gimp-palette-set-background '(0 0 0))
  42.     (gimp-blend ruler-layer FG-BG-RGB NORMAL SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE 0 0 0 0 height height)
  43.  
  44.     (gimp-palette-set-foreground glow-color)
  45.     (gimp-selection-grow img border)
  46.     (gimp-edit-fill glow-layer FG-IMAGE-FILL)
  47.     (gimp-selection-none img)
  48.     (plug-in-gauss-rle 1 img glow-layer 25 TRUE TRUE)
  49.  
  50.     (gimp-palette-set-background old-bg)
  51.     (gimp-palette-set-foreground old-fg)
  52.     (gimp-image-undo-enable img)
  53.  
  54.     (if (= flatten TRUE)
  55.     (gimp-image-flatten img))
  56.  
  57.     (gimp-display-new img)))
  58.  
  59.  
  60.  
  61.  
  62. (script-fu-register "script-fu-alien-glow-horizontal-ruler"
  63.             _"<Toolbox>/Xtns/Script-Fu/Web Page Themes/Alien Glow/Hrule..."
  64.             "Create an Hrule with the Alien Glow look"
  65.             "Adrian Likins"
  66.             "Adrian Likins"
  67.             "1997"
  68.             ""
  69.             SF-ADJUSTMENT _"Bar Length" '(480 5 1500 1 10 0 1)
  70.             SF-ADJUSTMENT _"Bar Height" '(16 1 100 1 10 0 1)
  71.             SF-COLOR  _"Glow Color" '(63 252 0)
  72.             SF-COLOR  _"Background Color" '(0 0 0)
  73.             SF-TOGGLE _"Flatten Image" TRUE)
  74.  
  75.  
  76.  
  77.  
  78.