2006-12-10 05:33:38 +08:00
|
|
|
; GIMP - The GNU Image Manipulation Program
|
1997-11-25 06:05:25 +08:00
|
|
|
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
;
|
|
|
|
; Weave script --- make an image look as if it were woven
|
|
|
|
; Copyright (C) 1997 Federico Mena Quintero
|
|
|
|
; federico@nuclecu.unam.mx
|
|
|
|
;
|
2009-01-18 06:28:01 +08:00
|
|
|
; This program is free software: you can redistribute it and/or modify
|
1997-11-25 06:05:25 +08:00
|
|
|
; it under the terms of the GNU General Public License as published by
|
2009-01-18 06:28:01 +08:00
|
|
|
; the Free Software Foundation; either version 3 of the License, or
|
1997-11-25 06:05:25 +08:00
|
|
|
; (at your option) any later version.
|
|
|
|
;
|
|
|
|
; This program is distributed in the hope that it will be useful,
|
|
|
|
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
; GNU General Public License for more details.
|
|
|
|
;
|
|
|
|
; You should have received a copy of the GNU General Public License
|
2009-01-18 06:28:01 +08:00
|
|
|
; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
; Copies the specified rectangle from/to the specified drawable
|
|
|
|
|
2003-07-22 22:24:11 +08:00
|
|
|
(define (copy-rectangle img
|
2006-10-16 09:08:54 +08:00
|
|
|
drawable
|
|
|
|
x1
|
|
|
|
y1
|
|
|
|
width
|
|
|
|
height
|
|
|
|
dest-x
|
|
|
|
dest-y)
|
2004-02-03 19:46:27 +08:00
|
|
|
(gimp-rect-select img x1 y1 width height CHANNEL-OP-REPLACE FALSE 0)
|
1998-11-15 04:46:25 +08:00
|
|
|
(gimp-edit-copy drawable)
|
|
|
|
(let ((floating-sel (car (gimp-edit-paste drawable FALSE))))
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-layer-set-offsets floating-sel dest-x dest-y)
|
|
|
|
(gimp-floating-sel-anchor floating-sel))
|
|
|
|
(gimp-selection-none img))
|
|
|
|
|
|
|
|
; Creates a single weaving tile
|
|
|
|
|
2003-07-22 22:24:11 +08:00
|
|
|
(define (create-weave-tile ribbon-width
|
2006-10-16 09:08:54 +08:00
|
|
|
ribbon-spacing
|
|
|
|
shadow-darkness
|
|
|
|
shadow-depth)
|
1997-11-25 06:05:25 +08:00
|
|
|
(let* ((tile-size (+ (* 2 ribbon-width) (* 2 ribbon-spacing)))
|
2006-10-16 09:08:54 +08:00
|
|
|
(darkness (* 255 (/ (- 100 shadow-darkness) 100)))
|
|
|
|
(img (car (gimp-image-new tile-size tile-size RGB)))
|
|
|
|
(drawable (car (gimp-layer-new img tile-size tile-size RGB-IMAGE
|
|
|
|
"Weave tile" 100 NORMAL-MODE))))
|
1999-10-17 08:07:55 +08:00
|
|
|
(gimp-image-undo-disable img)
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-image-add-layer img drawable 0)
|
|
|
|
|
2004-09-23 02:43:09 +08:00
|
|
|
(gimp-context-set-background '(0 0 0))
|
2003-10-16 20:47:33 +08:00
|
|
|
(gimp-edit-fill drawable BACKGROUND-FILL)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
; Create main horizontal ribbon
|
|
|
|
|
2004-09-23 02:43:09 +08:00
|
|
|
(gimp-context-set-foreground '(255 255 255))
|
|
|
|
(gimp-context-set-background (list darkness darkness darkness))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
(gimp-rect-select img
|
2006-10-16 09:08:54 +08:00
|
|
|
0
|
|
|
|
ribbon-spacing
|
|
|
|
(+ (* 2 ribbon-spacing) ribbon-width)
|
|
|
|
ribbon-width
|
|
|
|
CHANNEL-OP-REPLACE
|
|
|
|
FALSE
|
|
|
|
0)
|
2003-07-22 22:24:11 +08:00
|
|
|
|
2004-01-05 22:35:19 +08:00
|
|
|
(gimp-edit-blend drawable FG-BG-RGB-MODE NORMAL-MODE
|
2006-10-16 09:08:54 +08:00
|
|
|
GRADIENT-BILINEAR 100 (- 100 shadow-depth) REPEAT-NONE FALSE
|
|
|
|
FALSE 0 0 TRUE
|
|
|
|
(/ (+ (* 2 ribbon-spacing) ribbon-width -1) 2) 0 0 0)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
; Create main vertical ribbon
|
|
|
|
|
|
|
|
(gimp-rect-select img
|
2006-10-16 09:08:54 +08:00
|
|
|
(+ (* 2 ribbon-spacing) ribbon-width)
|
|
|
|
0
|
|
|
|
ribbon-width
|
|
|
|
(+ (* 2 ribbon-spacing) ribbon-width)
|
|
|
|
CHANNEL-OP-REPLACE
|
|
|
|
FALSE
|
|
|
|
0)
|
2003-07-22 22:24:11 +08:00
|
|
|
|
2004-01-05 22:35:19 +08:00
|
|
|
(gimp-edit-blend drawable FG-BG-RGB-MODE NORMAL-MODE
|
2006-10-16 09:08:54 +08:00
|
|
|
GRADIENT-BILINEAR 100 (- 100 shadow-depth) REPEAT-NONE FALSE
|
|
|
|
FALSE 0 0 TRUE
|
|
|
|
0 (/ (+ (* 2 ribbon-spacing) ribbon-width -1) 2) 0 0)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
; Create the secondary horizontal ribbon
|
|
|
|
|
|
|
|
(copy-rectangle img
|
2006-10-16 09:08:54 +08:00
|
|
|
drawable
|
|
|
|
0
|
|
|
|
ribbon-spacing
|
|
|
|
(+ ribbon-width ribbon-spacing)
|
|
|
|
ribbon-width
|
|
|
|
(+ ribbon-width ribbon-spacing)
|
|
|
|
(+ (* 2 ribbon-spacing) ribbon-width))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
(copy-rectangle img
|
2006-10-16 09:08:54 +08:00
|
|
|
drawable
|
|
|
|
(+ ribbon-width ribbon-spacing)
|
|
|
|
ribbon-spacing
|
|
|
|
ribbon-spacing
|
|
|
|
ribbon-width
|
|
|
|
0
|
|
|
|
(+ (* 2 ribbon-spacing) ribbon-width))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
; Create the secondary vertical ribbon
|
|
|
|
|
|
|
|
(copy-rectangle img
|
2006-10-16 09:08:54 +08:00
|
|
|
drawable
|
|
|
|
(+ (* 2 ribbon-spacing) ribbon-width)
|
|
|
|
0
|
|
|
|
ribbon-width
|
|
|
|
(+ ribbon-width ribbon-spacing)
|
|
|
|
ribbon-spacing
|
|
|
|
(+ ribbon-width ribbon-spacing))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
(copy-rectangle img
|
2006-10-16 09:08:54 +08:00
|
|
|
drawable
|
|
|
|
(+ (* 2 ribbon-spacing) ribbon-width)
|
|
|
|
(+ ribbon-width ribbon-spacing)
|
|
|
|
ribbon-width
|
|
|
|
ribbon-spacing
|
|
|
|
ribbon-spacing
|
|
|
|
0)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
; Done
|
|
|
|
|
1999-10-17 08:07:55 +08:00
|
|
|
(gimp-image-undo-enable img)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
(list img drawable)))
|
|
|
|
|
|
|
|
; Creates a complete weaving mask
|
|
|
|
|
2003-07-22 22:24:11 +08:00
|
|
|
(define (create-weave width
|
2006-10-16 09:08:54 +08:00
|
|
|
height
|
|
|
|
ribbon-width
|
|
|
|
ribbon-spacing
|
|
|
|
shadow-darkness
|
|
|
|
shadow-depth)
|
2003-07-22 22:24:11 +08:00
|
|
|
(let* ((tile (create-weave-tile ribbon-width ribbon-spacing shadow-darkness
|
2006-10-16 09:08:54 +08:00
|
|
|
shadow-depth))
|
|
|
|
(tile-img (car tile))
|
|
|
|
(tile-layer (cadr tile))
|
2007-10-02 03:44:23 +08:00
|
|
|
(weaving (plug-in-tile RUN-NONINTERACTIVE tile-img tile-layer width height TRUE)))
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-image-delete tile-img)
|
|
|
|
weaving))
|
|
|
|
|
|
|
|
; Creates a single tile for masking
|
|
|
|
|
2003-07-22 22:24:11 +08:00
|
|
|
(define (create-mask-tile ribbon-width
|
2006-10-16 09:08:54 +08:00
|
|
|
ribbon-spacing
|
|
|
|
r1-x1
|
|
|
|
r1-y1
|
|
|
|
r1-width
|
|
|
|
r1-height
|
|
|
|
r2-x1
|
|
|
|
r2-y1
|
|
|
|
r2-width
|
|
|
|
r2-height
|
|
|
|
r3-x1
|
|
|
|
r3-y1
|
|
|
|
r3-width
|
|
|
|
r3-height)
|
1997-11-25 06:05:25 +08:00
|
|
|
(let* ((tile-size (+ (* 2 ribbon-width) (* 2 ribbon-spacing)))
|
2006-10-16 09:08:54 +08:00
|
|
|
(img (car (gimp-image-new tile-size tile-size RGB)))
|
|
|
|
(drawable (car (gimp-layer-new img tile-size tile-size RGB-IMAGE
|
|
|
|
"Mask" 100 NORMAL-MODE))))
|
1999-10-17 08:07:55 +08:00
|
|
|
(gimp-image-undo-disable img)
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-image-add-layer img drawable 0)
|
|
|
|
|
2004-09-23 02:43:09 +08:00
|
|
|
(gimp-context-set-background '(0 0 0))
|
2003-10-16 20:47:33 +08:00
|
|
|
(gimp-edit-fill drawable BACKGROUND-FILL)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2004-02-03 19:46:27 +08:00
|
|
|
(gimp-rect-select img r1-x1 r1-y1 r1-width r1-height CHANNEL-OP-REPLACE FALSE 0)
|
|
|
|
(gimp-rect-select img r2-x1 r2-y1 r2-width r2-height CHANNEL-OP-ADD FALSE 0)
|
|
|
|
(gimp-rect-select img r3-x1 r3-y1 r3-width r3-height CHANNEL-OP-ADD FALSE 0)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2004-09-23 02:43:09 +08:00
|
|
|
(gimp-context-set-background '(255 255 255))
|
2003-10-16 20:47:33 +08:00
|
|
|
(gimp-edit-fill drawable BACKGROUND-FILL)
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-selection-none img)
|
|
|
|
|
1999-10-17 08:07:55 +08:00
|
|
|
(gimp-image-undo-enable img)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
(list img drawable)))
|
|
|
|
|
|
|
|
; Creates a complete mask image
|
|
|
|
|
2003-07-22 22:24:11 +08:00
|
|
|
(define (create-mask final-width
|
2006-10-16 09:08:54 +08:00
|
|
|
final-height
|
|
|
|
ribbon-width
|
|
|
|
ribbon-spacing
|
|
|
|
r1-x1
|
|
|
|
r1-y1
|
|
|
|
r1-width
|
|
|
|
r1-height
|
|
|
|
r2-x1
|
|
|
|
r2-y1
|
|
|
|
r2-width
|
|
|
|
r2-height
|
|
|
|
r3-x1
|
|
|
|
r3-y1
|
|
|
|
r3-width
|
|
|
|
r3-height)
|
1997-11-25 06:05:25 +08:00
|
|
|
(let* ((tile (create-mask-tile ribbon-width ribbon-spacing
|
2006-10-16 09:08:54 +08:00
|
|
|
r1-x1 r1-y1 r1-width r1-height
|
|
|
|
r2-x1 r2-y1 r2-width r2-height
|
|
|
|
r3-x1 r3-y1 r3-width r3-height))
|
|
|
|
(tile-img (car tile))
|
|
|
|
(tile-layer (cadr tile))
|
2007-10-02 03:44:23 +08:00
|
|
|
(mask (plug-in-tile RUN-NONINTERACTIVE tile-img tile-layer final-width final-height
|
2006-10-16 09:08:54 +08:00
|
|
|
TRUE)))
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-image-delete tile-img)
|
|
|
|
mask))
|
|
|
|
|
|
|
|
; Creates the mask for horizontal ribbons
|
|
|
|
|
2003-07-22 22:24:11 +08:00
|
|
|
(define (create-horizontal-mask ribbon-width
|
2006-10-16 09:08:54 +08:00
|
|
|
ribbon-spacing
|
|
|
|
final-width
|
|
|
|
final-height)
|
1997-11-25 06:05:25 +08:00
|
|
|
(create-mask final-width
|
2006-10-16 09:08:54 +08:00
|
|
|
final-height
|
|
|
|
ribbon-width
|
|
|
|
ribbon-spacing
|
|
|
|
0
|
|
|
|
ribbon-spacing
|
|
|
|
(+ (* 2 ribbon-spacing) ribbon-width)
|
|
|
|
ribbon-width
|
|
|
|
0
|
|
|
|
(+ (* 2 ribbon-spacing) ribbon-width)
|
|
|
|
ribbon-spacing
|
|
|
|
ribbon-width
|
|
|
|
(+ ribbon-width ribbon-spacing)
|
|
|
|
(+ (* 2 ribbon-spacing) ribbon-width)
|
|
|
|
(+ ribbon-width ribbon-spacing)
|
|
|
|
ribbon-width))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
; Creates the mask for vertical ribbons
|
|
|
|
|
2003-07-22 22:24:11 +08:00
|
|
|
(define (create-vertical-mask ribbon-width
|
2006-10-16 09:08:54 +08:00
|
|
|
ribbon-spacing
|
|
|
|
final-width
|
|
|
|
final-height)
|
1997-11-25 06:05:25 +08:00
|
|
|
(create-mask final-width
|
2006-10-16 09:08:54 +08:00
|
|
|
final-height
|
|
|
|
ribbon-width
|
|
|
|
ribbon-spacing
|
|
|
|
(+ (* 2 ribbon-spacing) ribbon-width)
|
|
|
|
0
|
|
|
|
ribbon-width
|
|
|
|
(+ (* 2 ribbon-spacing) ribbon-width)
|
|
|
|
ribbon-spacing
|
|
|
|
0
|
|
|
|
ribbon-width
|
|
|
|
ribbon-spacing
|
|
|
|
ribbon-spacing
|
|
|
|
(+ ribbon-width ribbon-spacing)
|
|
|
|
ribbon-width
|
|
|
|
(+ ribbon-width ribbon-spacing)))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
; Adds a threads layer at a certain orientation to the specified image
|
|
|
|
|
2003-07-22 22:24:11 +08:00
|
|
|
(define (create-threads-layer img
|
2006-10-16 09:08:54 +08:00
|
|
|
width
|
|
|
|
height
|
|
|
|
length
|
|
|
|
density
|
|
|
|
orientation)
|
2003-10-16 20:47:33 +08:00
|
|
|
(let* ((drawable (car (gimp-layer-new img width height RGBA-IMAGE
|
2006-10-16 09:08:54 +08:00
|
|
|
"Threads" 100 NORMAL-MODE)))
|
|
|
|
(dense (/ density 100.0)))
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-image-add-layer img drawable -1)
|
2004-09-23 02:43:09 +08:00
|
|
|
(gimp-context-set-background '(255 255 255))
|
2003-10-16 20:47:33 +08:00
|
|
|
(gimp-edit-fill drawable BACKGROUND-FILL)
|
2007-10-02 03:44:23 +08:00
|
|
|
(plug-in-noisify RUN-NONINTERACTIVE img drawable FALSE dense dense dense dense)
|
|
|
|
(plug-in-c-astretch RUN-NONINTERACTIVE img drawable)
|
1997-11-25 06:05:25 +08:00
|
|
|
(cond ((eq? orientation 'horizontal)
|
2007-10-02 03:44:23 +08:00
|
|
|
(plug-in-gauss-rle RUN-NONINTERACTIVE img drawable length TRUE FALSE))
|
2006-10-16 09:08:54 +08:00
|
|
|
((eq? orientation 'vertical)
|
2007-10-02 03:44:23 +08:00
|
|
|
(plug-in-gauss-rle RUN-NONINTERACTIVE img drawable length FALSE TRUE)))
|
|
|
|
(plug-in-c-astretch RUN-NONINTERACTIVE img drawable)
|
1997-11-25 06:05:25 +08:00
|
|
|
drawable))
|
|
|
|
|
|
|
|
(define (create-complete-weave width
|
2006-10-16 09:08:54 +08:00
|
|
|
height
|
|
|
|
ribbon-width
|
|
|
|
ribbon-spacing
|
|
|
|
shadow-darkness
|
|
|
|
shadow-depth
|
|
|
|
thread-length
|
|
|
|
thread-density
|
|
|
|
thread-intensity)
|
2003-07-22 22:24:11 +08:00
|
|
|
(let* ((weave (create-weave width height ribbon-width ribbon-spacing
|
2006-10-16 09:08:54 +08:00
|
|
|
shadow-darkness shadow-depth))
|
|
|
|
(w-img (car weave))
|
|
|
|
(w-layer (cadr weave))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2006-10-16 09:08:54 +08:00
|
|
|
(h-layer (create-threads-layer w-img width height thread-length
|
|
|
|
thread-density 'horizontal))
|
|
|
|
(h-mask (car (gimp-layer-create-mask h-layer ADD-WHITE-MASK)))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2006-10-16 09:08:54 +08:00
|
|
|
(v-layer (create-threads-layer w-img width height thread-length
|
|
|
|
thread-density 'vertical))
|
|
|
|
(v-mask (car (gimp-layer-create-mask v-layer ADD-WHITE-MASK)))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2006-10-16 09:08:54 +08:00
|
|
|
(hmask (create-horizontal-mask ribbon-width ribbon-spacing
|
|
|
|
width height))
|
|
|
|
(hm-img (car hmask))
|
|
|
|
(hm-layer (cadr hmask))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2006-10-16 09:08:54 +08:00
|
|
|
(vmask (create-vertical-mask ribbon-width ribbon-spacing width height))
|
|
|
|
(vm-img (car vmask))
|
|
|
|
(vm-layer (cadr vmask)))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2003-12-09 06:33:17 +08:00
|
|
|
(gimp-layer-add-mask h-layer h-mask)
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-selection-all hm-img)
|
1998-11-15 04:46:25 +08:00
|
|
|
(gimp-edit-copy hm-layer)
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-image-delete hm-img)
|
1998-11-15 04:46:25 +08:00
|
|
|
(gimp-floating-sel-anchor (car (gimp-edit-paste h-mask FALSE)))
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-layer-set-opacity h-layer thread-intensity)
|
2003-10-16 20:47:33 +08:00
|
|
|
(gimp-layer-set-mode h-layer MULTIPLY-MODE)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2003-12-09 06:33:17 +08:00
|
|
|
(gimp-layer-add-mask v-layer v-mask)
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-selection-all vm-img)
|
1998-11-15 04:46:25 +08:00
|
|
|
(gimp-edit-copy vm-layer)
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-image-delete vm-img)
|
1998-11-15 04:46:25 +08:00
|
|
|
(gimp-floating-sel-anchor (car (gimp-edit-paste v-mask FALSE)))
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-layer-set-opacity v-layer thread-intensity)
|
2003-10-16 20:47:33 +08:00
|
|
|
(gimp-layer-set-mode v-layer MULTIPLY-MODE)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
; Uncomment this if you want to keep the weaving mask image
|
2001-06-13 03:23:07 +08:00
|
|
|
; (gimp-display-new (car (gimp-image-duplicate w-img)))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
(list w-img
|
2006-10-16 09:08:54 +08:00
|
|
|
(car (gimp-image-flatten w-img)))))
|
1997-11-25 06:05:25 +08:00
|
|
|
|
|
|
|
; The main weave function
|
|
|
|
|
|
|
|
(define (script-fu-weave img
|
2006-10-16 09:08:54 +08:00
|
|
|
drawable
|
|
|
|
ribbon-width
|
|
|
|
ribbon-spacing
|
|
|
|
shadow-darkness
|
|
|
|
shadow-depth
|
|
|
|
thread-length
|
|
|
|
thread-density
|
|
|
|
thread-intensity)
|
|
|
|
(let* (
|
|
|
|
(d-img (car (gimp-drawable-get-image drawable)))
|
|
|
|
(d-width (car (gimp-drawable-width drawable)))
|
|
|
|
(d-height (car (gimp-drawable-height drawable)))
|
|
|
|
(d-offsets (gimp-drawable-offsets drawable))
|
|
|
|
|
|
|
|
(weaving (create-complete-weave d-width
|
|
|
|
d-height
|
|
|
|
ribbon-width
|
|
|
|
ribbon-spacing
|
|
|
|
shadow-darkness
|
|
|
|
shadow-depth
|
|
|
|
thread-length
|
|
|
|
thread-density
|
|
|
|
thread-intensity))
|
|
|
|
(w-img (car weaving))
|
|
|
|
(w-layer (cadr weaving))
|
|
|
|
)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2004-09-23 19:16:23 +08:00
|
|
|
(gimp-context-push)
|
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-selection-all w-img)
|
1998-11-15 04:46:25 +08:00
|
|
|
(gimp-edit-copy w-layer)
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-image-delete w-img)
|
1998-11-15 04:46:25 +08:00
|
|
|
(let ((floating-sel (car (gimp-edit-paste drawable FALSE))))
|
1997-11-25 06:05:25 +08:00
|
|
|
(gimp-layer-set-offsets floating-sel
|
2006-10-16 09:08:54 +08:00
|
|
|
(car d-offsets)
|
|
|
|
(cadr d-offsets))
|
2003-10-16 20:47:33 +08:00
|
|
|
(gimp-layer-set-mode floating-sel MULTIPLY-MODE)
|
2006-10-16 09:08:54 +08:00
|
|
|
(gimp-floating-sel-to-layer floating-sel)
|
|
|
|
)
|
1997-11-25 06:05:25 +08:00
|
|
|
|
2004-09-23 19:16:23 +08:00
|
|
|
(gimp-displays-flush)
|
|
|
|
|
2006-10-16 09:08:54 +08:00
|
|
|
(gimp-context-pop)
|
|
|
|
)
|
|
|
|
)
|
2004-11-19 06:44:28 +08:00
|
|
|
|
1997-11-25 06:05:25 +08:00
|
|
|
(script-fu-register "script-fu-weave"
|
2006-10-16 09:08:54 +08:00
|
|
|
_"_Weave..."
|
|
|
|
_"Create a new layer filled with a weave effect to be used as an overlay or bump map"
|
|
|
|
"Federico Mena Quintero"
|
|
|
|
"Federico Mena Quintero"
|
|
|
|
"June 1997"
|
|
|
|
"RGB* GRAY*"
|
|
|
|
SF-IMAGE "Image to Weave" 0
|
|
|
|
SF-DRAWABLE "Drawable to Weave" 0
|
|
|
|
SF-ADJUSTMENT _"Ribbon width" '(30 0 256 1 10 1 1)
|
|
|
|
SF-ADJUSTMENT _"Ribbon spacing" '(10 0 256 1 10 1 1)
|
|
|
|
SF-ADJUSTMENT _"Shadow darkness" '(75 0 100 1 10 1 1)
|
|
|
|
SF-ADJUSTMENT _"Shadow depth" '(75 0 100 1 10 1 1)
|
|
|
|
SF-ADJUSTMENT _"Thread length" '(200 0 256 1 10 1 1)
|
|
|
|
SF-ADJUSTMENT _"Thread density" '(50 0 100 1 10 1 1)
|
|
|
|
SF-ADJUSTMENT _"Thread intensity" '(100 0 100 1 10 1 1)
|
|
|
|
)
|
2004-11-19 06:44:28 +08:00
|
|
|
|
|
|
|
(script-fu-menu-register "script-fu-weave"
|
2006-10-16 09:08:54 +08:00
|
|
|
"<Image>/Filters/Artistic")
|