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
; This program is free software; you can redistribute it and/or modify
5
5
; it under the terms of the GNU General Public License as published by
6
6
; the Free Software Foundation; either version 2 of the License, or
7
7
; (at your option) any later version.
9
9
; This program is distributed in the hope that it will be useful,
10
10
; but WITHOUT ANY WARRANTY; without even the implied warranty of
11
11
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
12
; GNU General Public License for more details.
14
14
; You should have received a copy of the GNU General Public License
15
15
; along with this program; if not, write to the Free Software
16
16
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
43
45
(gimp-edit-fill bg-layer BACKGROUND-FILL)
44
46
(gimp-selection-none img)
46
(gimp-layer-set-preserve-trans blur-layer TRUE)
48
(gimp-layer-set-lock-alpha blur-layer TRUE)
47
49
(gimp-context-set-background '(255 255 255))
48
50
(gimp-selection-all img)
49
51
(gimp-edit-fill blur-layer BACKGROUND-FILL)
50
52
(gimp-edit-clear blur-layer)
51
53
(gimp-selection-none img)
52
(gimp-layer-set-preserve-trans blur-layer FALSE)
54
(gimp-layer-set-lock-alpha blur-layer FALSE)
53
55
(gimp-selection-layer-alpha logo-layer)
54
56
(gimp-edit-fill blur-layer BACKGROUND-FILL)
55
57
(plug-in-gauss-rle 1 img blur-layer bevel-width 1 1)
56
58
(gimp-selection-none img)
57
59
(gimp-context-set-background '(127 127 127))
58
60
(gimp-context-set-foreground '(255 255 255))
59
(gimp-layer-set-preserve-trans logo-layer TRUE)
61
(gimp-layer-set-lock-alpha logo-layer TRUE)
60
62
(gimp-selection-all img)
62
64
(gimp-edit-blend logo-layer FG-BG-RGB-MODE NORMAL-MODE
63
GRADIENT-RADIAL 95 0 REPEAT-NONE FALSE
65
indentX indentY indentX (- height indentY))
65
GRADIENT-RADIAL 95 0 REPEAT-NONE FALSE
67
indentX indentY indentX (- height indentY))
67
69
(gimp-selection-none img)
68
(gimp-layer-set-preserve-trans logo-layer FALSE)
70
(gimp-layer-set-lock-alpha logo-layer FALSE)
69
71
(plug-in-bump-map 1 img logo-layer blur-layer 115 bevel-height 5 0 0 0 15 TRUE FALSE 0)
70
72
(gimp-layer-set-offsets blur-layer 5 5)
71
73
(gimp-invert blur-layer)
72
74
(gimp-layer-set-opacity blur-layer 50.0)
73
75
(gimp-image-set-active-layer img logo-layer)
77
81
(define (script-fu-gradient-bevel-logo-alpha img
84
(gimp-image-undo-group-start img)
85
(apply-gradient-bevel-logo-effect img logo-layer b-size
86
bevel-height bevel-width bg-color)
87
(gimp-image-undo-group-end img)
88
(gimp-displays-flush)))
87
(gimp-image-undo-group-start img)
88
(apply-gradient-bevel-logo-effect img logo-layer b-size
89
bevel-height bevel-width bg-color)
90
(gimp-image-undo-group-end img)
90
94
(script-fu-register "script-fu-gradient-bevel-logo-alpha"
92
"Makes Shiny Bevelly text"
93
"Brian McFee <keebler@wco.com>"
98
SF-DRAWABLE "Drawable" 0
99
SF-ADJUSTMENT _"Border size (pixels)" '(22 1 300 1 10 0 1)
100
SF-ADJUSTMENT _"Bevel height (Sharpness)" '(40 1 250 1 10 0 1)
101
SF-ADJUSTMENT _"Bevel width" '(2.5 1 200 1 10 1 1)
102
SF-COLOR _"Background color" '(255 255 255))
96
_"Add a shiny look and bevel effect to the selected region (or alpha)"
97
"Brian McFee <keebler@wco.com>"
102
SF-DRAWABLE "Drawable" 0
103
SF-ADJUSTMENT _"Border size (pixels)" '(22 1 300 1 10 0 1)
104
SF-ADJUSTMENT _"Bevel height (sharpness)" '(40 1 250 1 10 0 1)
105
SF-ADJUSTMENT _"Bevel width" '(2.5 1 200 1 10 1 1)
106
SF-COLOR _"Background color" "white"
104
109
(script-fu-menu-register "script-fu-gradient-bevel-logo-alpha"
105
_"<Image>/Script-Fu/Alpha to Logo")
110
"<Image>/Filters/Alpha to Logo")
108
113
(define (script-fu-gradient-bevel-logo text
114
(let* ((img (car (gimp-image-new 256 256 RGB)))
116
(text-layer (car (gimp-text-fontname img -1 0 0 text
117
border TRUE size PIXELS font))))
120
(img (car (gimp-image-new 256 256 RGB)))
122
(text-layer (car (gimp-text-fontname img -1 0 0 text
123
border TRUE size PIXELS font)))
118
125
(gimp-image-undo-disable img)
119
(gimp-drawable-set-name text-layer text)
120
126
(apply-gradient-bevel-logo-effect img text-layer border
121
bevel-height bevel-width bg-color)
127
bevel-height bevel-width bg-color)
122
128
(gimp-image-undo-enable img)
123
(gimp-display-new img)))
129
(gimp-display-new img)
125
133
(script-fu-register "script-fu-gradient-bevel-logo"
126
_"Gradient Beve_l..."
127
"Makes Shiny Bevelly text"
128
"Brian McFee <keebler@wco.com>"
132
SF-STRING _"Text" "Moo"
133
SF-ADJUSTMENT _"Font size (pixels)" '(90 2 1000 1 10 0 1)
134
SF-FONT _"Font" "Sans Bold"
135
SF-ADJUSTMENT _"Bevel height (sharpness)" '(40 1 250 1 10 0 1)
136
SF-ADJUSTMENT _"Bevel width" '(2.5 1 200 1 10 1 1)
137
SF-COLOR _"Background color" '(255 255 255))
134
_"Gradient Beve_l..."
135
_"Create a logo with a shiny look and beveled edges"
136
"Brian McFee <keebler@wco.com>"
140
SF-STRING _"Text" "Moo"
141
SF-ADJUSTMENT _"Font size (pixels)" '(90 2 1000 1 10 0 1)
142
SF-FONT _"Font" "Sans Bold"
143
SF-ADJUSTMENT _"Bevel height (sharpness)" '(40 1 250 1 10 0 1)
144
SF-ADJUSTMENT _"Bevel width" '(2.5 1 200 1 10 1 1)
145
SF-COLOR _"Background color" "white"
139
148
(script-fu-menu-register "script-fu-gradient-bevel-logo"
140
_"<Toolbox>/Xtns/Script-Fu/Logos")
149
"<Toolbox>/Xtns/Logos")