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

« back to all changes in this revision

Viewing changes to plug-ins/script-fu/scripts/clothify.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:
5
5
; Tim Newsome <drz@froody.bloke.com> 4/11/97
6
6
 
7
7
(define (script-fu-clothify timg tdrawable bx by azimuth elevation depth)
8
 
        (let*
9
 
            ((width (car (gimp-drawable-width tdrawable)))
10
 
             (height (car (gimp-drawable-height tdrawable)))
11
 
             (img (car (gimp-image-new width height RGB)))
12
 
                                        ;               (layer-two (car (gimp-layer-new img width height RGB-IMAGE "Y Dots" 100 MULTIPLY-MODE)))
13
 
             (layer-one (car (gimp-layer-new img width height RGB-IMAGE "X Dots" 100 NORMAL-MODE)))
14
 
         (layer-two)
15
 
         (bump-layer))
16
 
 
17
 
          (gimp-context-push)
18
 
 
19
 
          (gimp-image-undo-disable img)
20
 
 
21
 
          (gimp-image-add-layer img layer-one 0)
22
 
 
23
 
          (gimp-context-set-background '(255 255 255))
24
 
          (gimp-edit-fill layer-one BACKGROUND-FILL)
25
 
 
26
 
          (plug-in-noisify 1 img layer-one FALSE 0.7 0.7 0.7 0.7)
27
 
 
28
 
          (set! layer-two (car (gimp-layer-copy layer-one 0)))
29
 
          (gimp-layer-set-mode layer-two MULTIPLY-MODE)
30
 
          (gimp-image-add-layer img layer-two 0)
31
 
 
32
 
          (plug-in-gauss-rle 1 img layer-one bx TRUE FALSE)
33
 
          (plug-in-gauss-rle 1 img layer-two by FALSE TRUE)
34
 
          (gimp-image-flatten img)
35
 
          (set! bump-layer (car (gimp-image-get-active-layer img)))
36
 
 
37
 
          (plug-in-c-astretch 1 img bump-layer)
38
 
          (plug-in-noisify 1 img bump-layer FALSE 0.2 0.2 0.2 0.2)
39
 
 
40
 
          (plug-in-bump-map 1 img tdrawable bump-layer azimuth elevation depth 0 0 0 0 FALSE FALSE 0)
41
 
          (gimp-image-delete img)
42
 
          (gimp-displays-flush)
43
 
 
44
 
          (gimp-context-pop)))
 
8
  (let* (
 
9
        (width (car (gimp-drawable-width tdrawable)))
 
10
        (height (car (gimp-drawable-height tdrawable)))
 
11
        (img (car (gimp-image-new width height RGB)))
 
12
;       (layer-two (car (gimp-layer-new img width height RGB-IMAGE "Y Dots" 100 MULTIPLY-MODE)))
 
13
        (layer-one (car (gimp-layer-new img width height RGB-IMAGE "X Dots" 100 NORMAL-MODE)))
 
14
        (layer-two)
 
15
        (bump-layer)
 
16
        )
 
17
 
 
18
    (gimp-context-push)
 
19
 
 
20
    (gimp-image-undo-disable img)
 
21
 
 
22
    (gimp-image-add-layer img layer-one 0)
 
23
 
 
24
    (gimp-context-set-background '(255 255 255))
 
25
    (gimp-edit-fill layer-one BACKGROUND-FILL)
 
26
 
 
27
    (plug-in-noisify 1 img layer-one FALSE 0.7 0.7 0.7 0.7)
 
28
 
 
29
    (set! layer-two (car (gimp-layer-copy layer-one 0)))
 
30
    (gimp-layer-set-mode layer-two MULTIPLY-MODE)
 
31
    (gimp-image-add-layer img layer-two 0)
 
32
 
 
33
    (plug-in-gauss-rle 1 img layer-one bx TRUE FALSE)
 
34
    (plug-in-gauss-rle 1 img layer-two by FALSE TRUE)
 
35
    (gimp-image-flatten img)
 
36
    (set! bump-layer (car (gimp-image-get-active-layer img)))
 
37
 
 
38
    (plug-in-c-astretch 1 img bump-layer)
 
39
    (plug-in-noisify 1 img bump-layer FALSE 0.2 0.2 0.2 0.2)
 
40
 
 
41
    (plug-in-bump-map 1 img tdrawable bump-layer azimuth elevation depth 0 0 0 0 FALSE FALSE 0)
 
42
    (gimp-image-delete img)
 
43
    (gimp-displays-flush)
 
44
 
 
45
    (gimp-context-pop)
 
46
  )
 
47
)
45
48
 
46
49
 
47
50
(script-fu-register "script-fu-clothify"
48
 
                    _"_Clothify..."
49
 
                    "Gives the current layer a cloth-like texture"
50
 
                    "Tim Newsome <drz@froody.bloke.com>"
51
 
                    "Tim Newsome"
52
 
                    "4/11/97"
53
 
                    "RGB* GRAY*"
54
 
                    SF-IMAGE       "Input image"    0
55
 
                    SF-DRAWABLE    "Input drawable" 0
56
 
                    SF-ADJUSTMENT _"Blur X"         '(9 3 100 1 10 0 1)
57
 
                    SF-ADJUSTMENT _"Blur Y"         '(9 3 100 1 10 0 1)
58
 
                    SF-ADJUSTMENT _"Azimuth"        '(135 0 360 1 10 1 0)
59
 
                    SF-ADJUSTMENT _"Elevation"      '(45 0 90 1 10 1 0)
60
 
                    SF-ADJUSTMENT _"Depth"          '(3 1 50 1 10 0 1))
 
51
  _"_Clothify..."
 
52
  _"Add a cloth-like texture to the selected region (or alpha)"
 
53
  "Tim Newsome <drz@froody.bloke.com>"
 
54
  "Tim Newsome"
 
55
  "4/11/97"
 
56
  "RGB* GRAY*"
 
57
  SF-IMAGE       "Input image"    0
 
58
  SF-DRAWABLE    "Input drawable" 0
 
59
  SF-ADJUSTMENT _"Blur X"         '(9 3 100 1 10 0 1)
 
60
  SF-ADJUSTMENT _"Blur Y"         '(9 3 100 1 10 0 1)
 
61
  SF-ADJUSTMENT _"Azimuth"        '(135 0 360 1 10 1 0)
 
62
  SF-ADJUSTMENT _"Elevation"      '(45 0 90 1 10 1 0)
 
63
  SF-ADJUSTMENT _"Depth"          '(3 1 50 1 10 0 1)
 
64
)
61
65
 
62
66
(script-fu-menu-register "script-fu-clothify"
63
 
                         _"<Image>/Script-Fu/Alchemy")
 
67
                         "<Image>/Filters/Artistic")