~ubuntu-branches/ubuntu/saucy/gimp/saucy-security

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Micah Gersten
  • Date: 2012-05-20 19:21:01 UTC
  • mfrom: (1.1.26) (0.4.16 sid)
  • Revision ID: package-import@ubuntu.com-20120520192101-bs7zetx8ffoq2nfv
Tags: 2.8.0-2ubuntu1
* Merge from Debian unstable (LP: #908472). Remaining Changes:
  - debian/patches/02_help-message.patch,
    debian/patches/03_gimp.desktop.in.in.patch:
    + Update some strings for Ubuntu
  - debian/control:
    + Update description
  - debian/rules:
    + Set gettext domain and update translation templates
* Drop the following patches that were applied upstream:
  - debian/patches/ghost-cursor.patch: fix Wacom tablet cursor events
  - debian/patches/embed-page-setup-dialog.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
; Copyright (c) 1997 Adrian Likins
6
6
; aklikins@eos.ncsu.edu
7
7
;
8
 
; This program is free software; you can redistribute it and/or modify
 
8
; This program is free software: you can redistribute it and/or modify
9
9
; it under the terms of the GNU General Public License as published by
10
 
; the Free Software Foundation; either version 2 of the License, or
 
10
; the Free Software Foundation; either version 3 of the License, or
11
11
; (at your option) any later version.
12
12
;
13
13
; This program is distributed in the hope that it will be useful,
16
16
; GNU General Public License for more details.
17
17
;
18
18
; You should have received a copy of the GNU General Public License
19
 
; along with this program; if not, write to the Free Software
20
 
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
19
; along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
20
 
22
21
(define (script-fu-alien-glow-bullet radius
23
22
                                     glow-color
25
24
                                     flatten)
26
25
 
27
26
  (define (center-ellipse img cx cy rx ry op aa feather frad)
28
 
    (gimp-ellipse-select img (- cx rx) (- cy ry) (+ rx rx) (+ ry ry)
29
 
                         op aa feather frad)
 
27
    (gimp-context-push)
 
28
    (gimp-context-set-antialias aa)
 
29
    (gimp-context-set-feather feather)
 
30
    (gimp-context-set-feather-radius frad frad)
 
31
    (gimp-image-select-ellipse img op (- cx rx) (- cy ry) (+ rx rx) (+ ry ry))
 
32
    (gimp-context-pop)
30
33
  )
31
34
 
32
35
 
38
41
        (blend-start (+ half-radius (/ half-radius 2)))
39
42
        (bullet-layer (car (gimp-layer-new img
40
43
                                           diameter diameter RGBA-IMAGE
41
 
                                           "Ruler" 100 NORMAL-MODE)))
 
44
                                           _"Bullet" 100 NORMAL-MODE)))
42
45
        (glow-layer (car (gimp-layer-new img diameter diameter RGBA-IMAGE
43
 
                                         "ALien Glow" 100 NORMAL-MODE)))
 
46
                                         _"Alien Glow" 100 NORMAL-MODE)))
44
47
        (bg-layer (car (gimp-layer-new img diameter diameter RGB-IMAGE
45
 
                                       "Background" 100 NORMAL-MODE)))
 
48
                                       _"Background" 100 NORMAL-MODE)))
46
49
        )
47
50
 
48
51
    (gimp-context-push)
49
52
 
50
53
    (gimp-image-undo-disable img)
51
54
    (gimp-image-resize img diameter diameter 0 0)
52
 
    (gimp-image-add-layer img bg-layer 1)
53
 
    (gimp-image-add-layer img glow-layer -1)
54
 
    (gimp-image-add-layer img bullet-layer -1)
 
55
    (gimp-image-insert-layer img bg-layer 0 1)
 
56
    (gimp-image-insert-layer img glow-layer 0 -1)
 
57
    (gimp-image-insert-layer img bullet-layer 0 -1)
55
58
 
56
59
    ; (gimp-layer-set-lock-alpha ruler-layer TRUE)
57
60
    (gimp-context-set-background bg-color)