~ubuntu-branches/ubuntu/vivid/gimp/vivid

« back to all changes in this revision

Viewing changes to plug-ins/script-fu/scripts/slide.scm

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach
  • Date: 2012-05-08 18:50:03 UTC
  • mto: (1.1.26) (0.5.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 71.
  • Revision ID: package-import@ubuntu.com-20120508185003-tltkvbaysf8d2426
ImportĀ upstreamĀ versionĀ 2.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
; GIMP - The GNU Image Manipulation Program
2
2
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
3
3
;
4
 
; This program is free software; you can redistribute it and/or modify
 
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
 
; the Free Software Foundation; either version 2 of the License, or
 
6
; the Free Software Foundation; either version 3 of the License, or
7
7
; (at your option) any later version.
8
8
;
9
9
; This program is distributed in the hope that it will be useful,
12
12
; GNU General Public License for more details.
13
13
;
14
14
; You should have received a copy of the GNU General Public License
15
 
; along with this program; if not, write to the Free Software
16
 
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
15
; along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
16
;
18
17
;
19
18
; slide.scm   version 0.41   2004/03/28
97
96
        )
98
97
 
99
98
  (gimp-context-push)
 
99
  (gimp-context-set-feather FALSE)
100
100
 
101
101
  (gimp-image-undo-disable image)
102
102
 
120
120
 
121
121
; add the background layer
122
122
  (gimp-drawable-fill bg-layer BACKGROUND-FILL)
123
 
  (gimp-image-add-layer image bg-layer -1)
 
123
  (gimp-image-insert-layer image bg-layer 0 -1)
124
124
 
125
125
; add the film layer
126
126
  (gimp-context-set-background '(0 0 0))
127
127
  (gimp-drawable-fill film-layer BACKGROUND-FILL)
128
 
  (gimp-image-add-layer image film-layer -1)
 
128
  (gimp-image-insert-layer image film-layer 0 -1)
129
129
 
130
130
; add the text
131
131
  (gimp-context-set-foreground font-color)
186
186
 
187
187
    (gimp-selection-none image)
188
188
    (while (< hole 8)
189
 
           (gimp-rect-select image
190
 
                             (* hole-space hole)
191
 
                             top-y
192
 
                             hole-width
193
 
                             hole-height
194
 
                             CHANNEL-OP-ADD
195
 
                             FALSE
196
 
                             0)
197
 
           (gimp-rect-select image
198
 
                             (* hole-space hole)
199
 
                             bottom-y
200
 
                             hole-width
201
 
                             hole-height
202
 
                             CHANNEL-OP-ADD
203
 
                             FALSE
204
 
                             0)
 
189
           (gimp-image-select-rectangle image
 
190
                                        CHANNEL-OP-ADD
 
191
                                        (* hole-space hole)
 
192
                                        top-y
 
193
                                        hole-width
 
194
                                        hole-height)
 
195
           (gimp-image-select-rectangle image
 
196
                                        CHANNEL-OP-ADD
 
197
                                        (* hole-space hole)
 
198
                                        bottom-y
 
199
                                        hole-width
 
200
                                        hole-height)
205
201
           (set! hole (+ hole 1))
206
202
    )
207
203
 
215
211
  )
216
212
 
217
213
; reorder the layers
218
 
  (gimp-image-raise-layer image pic-layer)
219
 
  (gimp-image-raise-layer image pic-layer)
 
214
  (gimp-image-raise-item image pic-layer)
 
215
  (gimp-image-raise-item image pic-layer)
220
216
 
221
217
; eventually rotate the whole thing back
222
218
  (if (< ratio 1)