~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/script-fu/scripts/alien-glow-bar.scm

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
; The GIMP -- an image manipulation program
 
1
; GIMP - The GNU Image Manipulation Program
2
2
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
3
 
 
3
;
4
4
; Alien Glow themed hrule for web pages
5
5
; Copyright (c) 1997 Adrian Likins
6
6
; aklikins@eos.ncsu.edu
7
7
;
8
 
 
8
;
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.
13
 
 
13
;
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.
18
 
 
18
;
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.
22
22
 
23
23
(define (script-fu-alien-glow-horizontal-ruler length
24
 
                                               height
25
 
                                               glow-color
26
 
                                               bg-color
27
 
                                               flatten)
28
 
  (let* ((img (car (gimp-image-new height length RGB)))
29
 
         (border (/ height 4))
30
 
         (ruler-layer (car (gimp-layer-new img
31
 
                                           (+ length height) (+ height height)
32
 
                                           RGBA-IMAGE "Ruler"
33
 
                                           100 NORMAL-MODE)))
34
 
         (glow-layer (car (gimp-layer-new img
35
 
                                          (+ length height) (+ height height)
36
 
                                          RGBA-IMAGE "ALien Glow"
37
 
                                          100 NORMAL-MODE)))
38
 
         (bg-layer (car (gimp-layer-new img
39
 
                                        (+ length height) (+ height height)
40
 
                                        RGB-IMAGE "Backround"
41
 
                                        100 NORMAL-MODE))))
 
24
                                               height
 
25
                                               glow-color
 
26
                                               bg-color
 
27
                                               flatten)
 
28
  (let* (
 
29
        (img (car (gimp-image-new height length RGB)))
 
30
        (border (/ height 4))
 
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)))
 
40
        )
42
41
 
43
42
    (gimp-context-push)
44
43
 
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)
50
 
     
51
 
   ; (gimp-layer-set-preserve-trans ruler-layer TRUE)
 
49
 
 
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)
56
 
    
 
55
 
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))
62
61
 
63
62
    (gimp-edit-blend ruler-layer FG-BG-RGB-MODE NORMAL-MODE
64
 
                     GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
65
 
                     FALSE 0 0 TRUE
66
 
                     0 0 height height)
 
63
                     GRADIENT-SHAPEBURST-ANGULAR 100 0 REPEAT-NONE FALSE
 
64
                     FALSE 0 0 TRUE
 
65
                     0 0 height height)
67
66
 
68
67
    (gimp-context-set-foreground glow-color)
69
68
    (gimp-selection-grow img border)
74
73
    (gimp-image-undo-enable img)
75
74
 
76
75
    (if (= flatten TRUE)
77
 
        (gimp-image-flatten img))
 
76
        (gimp-image-flatten img))
78
77
 
79
78
    (gimp-display-new img)
80
 
    
81
 
    (gimp-context-pop)))
 
79
 
 
80
    (gimp-context-pop)
 
81
  )
 
82
)
82
83
 
83
84
 
84
85
(script-fu-register "script-fu-alien-glow-horizontal-ruler"
85
 
                    _"_Hrule..."
86
 
                    "Create an Hrule with the Alien Glow look"
87
 
                    "Adrian Likins"
88
 
                    "Adrian Likins"
89
 
                    "1997"
90
 
                    ""
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)
 
86
    _"_Hrule..."
 
87
    _"Create an Hrule graphic with an eerie glow for web pages"
 
88
    "Adrian Likins"
 
89
    "Adrian Likins"
 
90
    "1997"
 
91
    ""
 
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
)
96
98
 
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")