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