plug-ins: fix a bunch of Scheme scripts after API functions renaming.
Since we renamed a bunch of functions for consistency (the like of gimp_image_width() to gimp_image_get_width() and others), most Scheme scripts ended up broken. This is a simple bash fix with `sed` to at least take care of these simple renaming cases. Many scripts are still broken for other reasons after our API evolution (to be continued).
This commit is contained in:
@ -64,9 +64,9 @@
|
||||
(type (car (gimp-drawable-type-with-alpha drawable)))
|
||||
(image (if (= work-on-copy TRUE) (car (gimp-image-duplicate img)) img))
|
||||
(pic-layer (car (gimp-image-get-active-drawable image)))
|
||||
(offsets (gimp-drawable-offsets pic-layer))
|
||||
(width (car (gimp-drawable-width pic-layer)))
|
||||
(height (car (gimp-drawable-height pic-layer)))
|
||||
(offsets (gimp-drawable-get-offsets pic-layer))
|
||||
(width (car (gimp-drawable-get-width pic-layer)))
|
||||
(height (car (gimp-drawable-get-height pic-layer)))
|
||||
|
||||
; Bumpmap has a one pixel border on each side
|
||||
(bump-layer (car (gimp-layer-new image
|
||||
|
@ -98,8 +98,8 @@
|
||||
)
|
||||
|
||||
(let* ((img (car (gimp-item-get-image adraw)))
|
||||
(owidth (car (gimp-image-width img)))
|
||||
(oheight (car (gimp-image-height img)))
|
||||
(owidth (car (gimp-image-get-width img)))
|
||||
(oheight (car (gimp-image-get-height img)))
|
||||
(width (+ owidth (* 2 xsize)))
|
||||
(height (+ oheight (* 2 ysize)))
|
||||
(layer (car (gimp-layer-new img
|
||||
|
@ -47,8 +47,8 @@
|
||||
(max-blur (max max-blur 0))
|
||||
(frames (max frames 0))
|
||||
(image (car (gimp-image-duplicate img)))
|
||||
(width (car (gimp-image-width image)))
|
||||
(height (car (gimp-image-height image)))
|
||||
(width (car (gimp-image-get-width image)))
|
||||
(height (car (gimp-image-get-height image)))
|
||||
(layers (gimp-image-get-layers image))
|
||||
(num-layers (car layers))
|
||||
(layer-array (cadr layers))
|
||||
@ -82,11 +82,11 @@
|
||||
(gimp-item-set-visible bg-layer FALSE)
|
||||
(while (> layer-count -1)
|
||||
(let* ((layer (aref layer-array layer-count))
|
||||
(layer-width (+ (car (gimp-drawable-width layer))
|
||||
(layer-width (+ (car (gimp-drawable-get-width layer))
|
||||
(* max-blur 2)))
|
||||
(layer-height (+ (car (gimp-drawable-height layer))
|
||||
(layer-height (+ (car (gimp-drawable-get-height layer))
|
||||
(* max-blur 2)))
|
||||
(layer-offsets (gimp-drawable-offsets layer))
|
||||
(layer-offsets (gimp-drawable-get-offsets layer))
|
||||
(layer-offset-x (- (car layer-offsets) max-blur))
|
||||
(layer-offset-y (- (cadr layer-offsets) max-blur)))
|
||||
(gimp-item-set-visible layer FALSE)
|
||||
@ -95,9 +95,9 @@
|
||||
(set! min-offset-x (min min-offset-x layer-offset-x))
|
||||
(set! min-offset-y (min min-offset-y layer-offset-y))
|
||||
(set! layer-count (- layer-count 1))))
|
||||
(set! offset-x (- (car (gimp-drawable-offsets bg-layer))
|
||||
(set! offset-x (- (car (gimp-drawable-get-offsets bg-layer))
|
||||
min-offset-x))
|
||||
(set! offset-y (- (cadr (gimp-drawable-offsets bg-layer))
|
||||
(set! offset-y (- (cadr (gimp-drawable-get-offsets bg-layer))
|
||||
min-offset-y)))
|
||||
|
||||
; create intermediate frames by merging copies of adjacent layers
|
||||
@ -123,8 +123,8 @@
|
||||
(gimp-layer-set-opacity lower-copy opacity)
|
||||
(gimp-layer-set-opacity bg-copy 100)
|
||||
(if (> max-blur 0)
|
||||
(let* ((layer-width (car (gimp-drawable-width upper-copy)))
|
||||
(layer-height (car (gimp-drawable-height upper-copy))))
|
||||
(let* ((layer-width (car (gimp-drawable-get-width upper-copy)))
|
||||
(layer-height (car (gimp-drawable-get-height upper-copy))))
|
||||
(gimp-layer-set-lock-alpha upper-copy FALSE)
|
||||
(gimp-layer-resize upper-copy
|
||||
(+ layer-width (* blur 2))
|
||||
@ -139,9 +139,9 @@
|
||||
TRUE TRUE))
|
||||
(set! blur (- max-blur blur))
|
||||
(gimp-layer-set-lock-alpha lower-copy FALSE)
|
||||
(set! layer-width (car (gimp-drawable-width
|
||||
(set! layer-width (car (gimp-drawable-get-width
|
||||
lower-copy)))
|
||||
(set! layer-height (car (gimp-drawable-height
|
||||
(set! layer-height (car (gimp-drawable-get-height
|
||||
lower-copy)))
|
||||
(gimp-layer-resize lower-copy
|
||||
(+ layer-width (* blur 2))
|
||||
|
@ -63,7 +63,7 @@
|
||||
(gimp-image-convert-rgb img))
|
||||
(set! source-layer (aref (cadr (gimp-image-get-layers img)) 0 ))
|
||||
(set! bg-source-layer (aref (cadr (gimp-image-get-layers img)) 1 ))
|
||||
(set! source-layer-width (car (gimp-drawable-width source-layer)))
|
||||
(set! source-layer-width (car (gimp-drawable-get-width source-layer)))
|
||||
|
||||
;--- hide layers, cause we want to "merge visible layers" later
|
||||
(gimp-item-set-visible source-layer FALSE)
|
||||
@ -88,10 +88,10 @@
|
||||
|
||||
;--- handle layer geometry
|
||||
(set! bl-layer-width source-layer-width)
|
||||
(set! bl-height (car (gimp-drawable-height bl-layer)))
|
||||
(set! bl-height (car (gimp-drawable-get-height bl-layer)))
|
||||
(set! bl-x-off (- bl-x bl-width))
|
||||
(set! bl-x-off (+ bl-x-off (car (gimp-drawable-offsets bl-layer))))
|
||||
(set! bl-y-off (cadr (gimp-drawable-offsets bl-layer)))
|
||||
(set! bl-x-off (+ bl-x-off (car (gimp-drawable-get-offsets bl-layer))))
|
||||
(set! bl-y-off (cadr (gimp-drawable-get-offsets bl-layer)))
|
||||
|
||||
;--- select a rectangular area to blend
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE bl-x-off bl-y-off bl-width bl-height)
|
||||
@ -100,7 +100,7 @@
|
||||
|
||||
(if (= fadeout FALSE)
|
||||
(begin
|
||||
(set! nofadeout-bl-x-off (car (gimp-drawable-offsets bl-layer)))
|
||||
(set! nofadeout-bl-x-off (car (gimp-drawable-get-offsets bl-layer)))
|
||||
(set! nofadeout-bl-width (+ nofadeout-bl-x-off bl-x))
|
||||
(set! nofadeout-bl-width (max nofadeout-bl-width 1))
|
||||
(gimp-image-select-rectangle img CHANNEL-OP-REPLACE
|
||||
|
@ -33,8 +33,8 @@
|
||||
|
||||
(define (script-fu-carve-it mask-img mask-drawable bg-layer carve-white)
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width mask-drawable)))
|
||||
(height (car (gimp-drawable-height mask-drawable)))
|
||||
(width (car (gimp-drawable-get-width mask-drawable)))
|
||||
(height (car (gimp-drawable-get-height mask-drawable)))
|
||||
(type (car (gimp-drawable-type bg-layer)))
|
||||
(img (car (gimp-image-new width height (cond ((= type RGB-IMAGE) RGB)
|
||||
((= type RGBA-IMAGE) RGB)
|
||||
@ -61,8 +61,8 @@
|
||||
(csl-mask 0)
|
||||
(inset-layer 0)
|
||||
(il-mask 0)
|
||||
(bg-width (car (gimp-drawable-width bg-layer)))
|
||||
(bg-height (car (gimp-drawable-height bg-layer)))
|
||||
(bg-width (car (gimp-drawable-get-width bg-layer)))
|
||||
(bg-height (car (gimp-drawable-get-height bg-layer)))
|
||||
(bg-type (car (gimp-drawable-type bg-layer)))
|
||||
(bg-image (car (gimp-item-get-image bg-layer)))
|
||||
(layer1 (car (gimp-layer-new img bg-width bg-height bg-type "Layer1" 100 LAYER-MODE-NORMAL)))
|
||||
|
@ -75,11 +75,11 @@
|
||||
(let* (
|
||||
(banding-img (car (gimp-file-load RUN-NONINTERACTIVE env-map env-map)))
|
||||
(banding-layer (car (gimp-image-get-active-drawable banding-img)))
|
||||
(banding-height (car (gimp-drawable-height banding-layer)))
|
||||
(banding-width (car (gimp-drawable-width banding-layer)))
|
||||
(banding-height (car (gimp-drawable-get-height banding-layer)))
|
||||
(banding-width (car (gimp-drawable-get-width banding-layer)))
|
||||
(banding-type (car (gimp-drawable-type banding-layer)))
|
||||
(width (car (gimp-drawable-width mask-drawable)))
|
||||
(height (car (gimp-drawable-height mask-drawable)))
|
||||
(width (car (gimp-drawable-get-width mask-drawable)))
|
||||
(height (car (gimp-drawable-get-height mask-drawable)))
|
||||
(img (car (gimp-image-new width height GRAY)))
|
||||
(size (min width height))
|
||||
(offx1 (sota-scale size 0.33 chrome-factor))
|
||||
|
@ -30,8 +30,8 @@
|
||||
separate-layer)
|
||||
(let* (
|
||||
(type (car (gimp-drawable-type-with-alpha drawable)))
|
||||
(image-width (car (gimp-image-width image)))
|
||||
(image-height (car (gimp-image-height image)))
|
||||
(image-width (car (gimp-image-get-width image)))
|
||||
(image-height (car (gimp-image-get-height image)))
|
||||
(active-selection 0)
|
||||
(from-selection 0)
|
||||
(selection-bounds 0)
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
(define (script-fu-clothify timg tdrawable bx by azimuth elevation depth)
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width tdrawable)))
|
||||
(height (car (gimp-drawable-height tdrawable)))
|
||||
(width (car (gimp-drawable-get-width tdrawable)))
|
||||
(height (car (gimp-drawable-get-height tdrawable)))
|
||||
(img (car (gimp-image-new width height RGB)))
|
||||
; (layer-two (car (gimp-layer-new img width height RGB-IMAGE "Y Dots" 100 LAYER-MODE-MULTIPLY)))
|
||||
(layer-one (car (gimp-layer-new img width height RGB-IMAGE "X Dots" 100 LAYER-MODE-NORMAL)))
|
||||
|
@ -18,8 +18,8 @@
|
||||
(define (script-fu-coffee-stain inImage inLayer inNumber inDark)
|
||||
(let* (
|
||||
(theImage inImage)
|
||||
(theHeight (car (gimp-image-height theImage)))
|
||||
(theWidth (car (gimp-image-width theImage)))
|
||||
(theHeight (car (gimp-image-get-height theImage)))
|
||||
(theWidth (car (gimp-image-get-width theImage)))
|
||||
(theNumber inNumber)
|
||||
(theSize (min theWidth theHeight))
|
||||
(theStain 0)
|
||||
|
@ -120,8 +120,8 @@
|
||||
(number->string num)
|
||||
_" for directory " dir)
|
||||
0 TRUE 14 PIXELS title-font)))
|
||||
(set! text-width (car (gimp-drawable-width text-layer)))
|
||||
(set! text-height (car (gimp-drawable-height text-layer)))
|
||||
(set! text-width (car (gimp-drawable-get-width text-layer)))
|
||||
(set! text-height (car (gimp-drawable-get-height text-layer)))
|
||||
(gimp-layer-set-offsets text-layer
|
||||
(/ (- img-width text-width) 2)
|
||||
(/ (- (+ border-y off-y) text-height) 2)
|
||||
@ -132,8 +132,8 @@
|
||||
|
||||
(define (make-thumbnail-size img thumb-w thumb-h)
|
||||
(let* (
|
||||
(file-height (car (gimp-image-height img)))
|
||||
(file-width (car (gimp-image-width img)))
|
||||
(file-height (car (gimp-image-get-height img)))
|
||||
(file-width (car (gimp-image-get-width img)))
|
||||
(aspect-ratio (/ file-width file-height))
|
||||
)
|
||||
|
||||
@ -235,10 +235,10 @@
|
||||
;Move thumbnail in to position and center it in area available.
|
||||
(gimp-layer-set-offsets tmp-layer
|
||||
(+ border-x off-x (* pos-x (+ thumb-w border-x))
|
||||
(/ (- thumb-w (car (gimp-image-width new-img))) 2)
|
||||
(/ (- thumb-w (car (gimp-image-get-width new-img))) 2)
|
||||
)
|
||||
(+ border-y off-y (* pos-y (+ thumb-h border-y))
|
||||
(/ (- thumb-h (car (gimp-image-height new-img))) 2)
|
||||
(/ (- thumb-h (car (gimp-image-get-height new-img))) 2)
|
||||
)
|
||||
)
|
||||
|
||||
@ -248,7 +248,7 @@
|
||||
0 TRUE 12 PIXELS legend-font)))
|
||||
(gimp-layer-set-offsets tmp-layer
|
||||
(+ border-x off-x (* pos-x (+ thumb-w border-x))
|
||||
(/ (- thumb-w (car (gimp-drawable-width tmp-layer))) 2))
|
||||
(/ (- thumb-w (car (gimp-drawable-get-width tmp-layer))) 2))
|
||||
(+ border-y off-y (* pos-y (+ thumb-h border-y)) thumb-h 6)
|
||||
)
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
||||
(define (script-fu-difference-clouds image
|
||||
drawable)
|
||||
|
||||
(let* ((draw-offset-x (car (gimp-drawable-offsets drawable)))
|
||||
(draw-offset-y (cadr (gimp-drawable-offsets drawable)))
|
||||
(let* ((draw-offset-x (car (gimp-drawable-get-offsets drawable)))
|
||||
(draw-offset-y (cadr (gimp-drawable-get-offsets drawable)))
|
||||
(has-sel (car (gimp-drawable-mask-intersect drawable)))
|
||||
(sel-offset-x (cadr (gimp-drawable-mask-intersect drawable)))
|
||||
(sel-offset-y (caddr (gimp-drawable-mask-intersect drawable)))
|
||||
|
@ -31,10 +31,10 @@
|
||||
|
||||
(let (
|
||||
(theImage inImage)
|
||||
(theWidth (car (gimp-image-width inImage)))
|
||||
(theHeight (car (gimp-image-height inImage)))
|
||||
(theWidth (car (gimp-image-get-width inImage)))
|
||||
(theHeight (car (gimp-image-get-height inImage)))
|
||||
(theLayer 0)
|
||||
(theMode (car (gimp-image-base-type inImage)))
|
||||
(theMode (car (gimp-image-get-base-type inImage)))
|
||||
(prevLayer (car (gimp-image-get-active-layer inImage)))
|
||||
)
|
||||
|
||||
|
@ -48,8 +48,8 @@
|
||||
(shadow-opacity (min shadow-opacity 100))
|
||||
(shadow-opacity (max shadow-opacity 0))
|
||||
(type (car (gimp-drawable-type-with-alpha drawable)))
|
||||
(image-width (car (gimp-image-width image)))
|
||||
(image-height (car (gimp-image-height image)))
|
||||
(image-width (car (gimp-image-get-width image)))
|
||||
(image-height (car (gimp-image-get-height image)))
|
||||
(from-selection 0)
|
||||
(active-selection 0)
|
||||
(shadow-layer 0)
|
||||
|
@ -4,10 +4,10 @@
|
||||
|
||||
(define (script-fu-erase-nth-rows img drawable orientation offset type nth)
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width drawable)))
|
||||
(height (car (gimp-drawable-height drawable)))
|
||||
(position-x (car (gimp-drawable-offsets drawable)))
|
||||
(position-y (cadr (gimp-drawable-offsets drawable)))
|
||||
(width (car (gimp-drawable-get-width drawable)))
|
||||
(height (car (gimp-drawable-get-height drawable)))
|
||||
(position-x (car (gimp-drawable-get-offsets drawable)))
|
||||
(position-y (cadr (gimp-drawable-get-offsets drawable)))
|
||||
)
|
||||
|
||||
(gimp-context-push)
|
||||
|
@ -44,8 +44,8 @@
|
||||
)
|
||||
|
||||
(let (
|
||||
(theWidth (car (gimp-image-width inImage)))
|
||||
(theHeight (car (gimp-image-height inImage)))
|
||||
(theWidth (car (gimp-image-get-width inImage)))
|
||||
(theHeight (car (gimp-image-get-height inImage)))
|
||||
(theImage (if (= inCopy TRUE) (car (gimp-image-duplicate inImage))
|
||||
inImage))
|
||||
(theLayer 0)
|
||||
|
@ -33,10 +33,10 @@
|
||||
((eq? obj 'g) "g ")
|
||||
(eq? obj '1/g) "1/g "))
|
||||
(string-append "'(" (apply string-append (map wrap-object l)) ")"))
|
||||
(let* ((drw-width (car (gimp-drawable-width drw)))
|
||||
(drw-height (car (gimp-drawable-height drw)))
|
||||
(drw-offset-x (nth 0 (gimp-drawable-offsets drw)))
|
||||
(drw-offset-y (nth 1 (gimp-drawable-offsets drw)))
|
||||
(let* ((drw-width (car (gimp-drawable-get-width drw)))
|
||||
(drw-height (car (gimp-drawable-get-height drw)))
|
||||
(drw-offset-x (nth 0 (gimp-drawable-get-offsets drw)))
|
||||
(drw-offset-y (nth 1 (gimp-drawable-get-offsets drw)))
|
||||
(grid-layer #f)
|
||||
(segment (cons-array 4 'double))
|
||||
(stepped-x 0)
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
(define (script-fu-guide-new-percent image drawable direction position)
|
||||
(let* (
|
||||
(width (car (gimp-image-width image)))
|
||||
(height (car (gimp-image-height image)))
|
||||
(width (car (gimp-image-get-width image)))
|
||||
(height (car (gimp-image-get-height image)))
|
||||
)
|
||||
|
||||
(if (= direction 0)
|
||||
|
@ -9,8 +9,8 @@
|
||||
direction
|
||||
position)
|
||||
(let* (
|
||||
(width (car (gimp-image-width image)))
|
||||
(height (car (gimp-image-height image)))
|
||||
(width (car (gimp-image-get-width image)))
|
||||
(height (car (gimp-image-get-height image)))
|
||||
)
|
||||
|
||||
(if (= direction 0)
|
||||
|
@ -33,8 +33,8 @@
|
||||
current-grad)
|
||||
(let* (
|
||||
(type (car (gimp-drawable-type-with-alpha drawable)))
|
||||
(image-width (car (gimp-image-width image)))
|
||||
(image-height (car (gimp-image-height image)))
|
||||
(image-width (car (gimp-image-get-width image)))
|
||||
(image-height (car (gimp-image-get-height image)))
|
||||
(active-selection 0)
|
||||
(selection-bounds 0)
|
||||
(select-offset-x 0)
|
||||
|
@ -16,9 +16,9 @@
|
||||
(2pi (* 2 *pi*))
|
||||
(rad/deg (/ 2pi 360))
|
||||
(variation/2 (/ variation 2))
|
||||
(drw-width (car (gimp-drawable-width drw)))
|
||||
(drw-height (car (gimp-drawable-height drw)))
|
||||
(drw-offsets (gimp-drawable-offsets drw))
|
||||
(drw-width (car (gimp-drawable-get-width drw)))
|
||||
(drw-height (car (gimp-drawable-get-height drw)))
|
||||
(drw-offsets (gimp-drawable-get-offsets drw))
|
||||
(old-selection FALSE)
|
||||
(radius (max drw-height drw-width))
|
||||
(index 0)
|
||||
|
@ -53,8 +53,8 @@
|
||||
(gimp-drawable-color-balance theLayer TRANSFER-SHADOWS TRUE 30 0 -30)
|
||||
)
|
||||
)
|
||||
(set! theWidth (car (gimp-image-width theImage)))
|
||||
(set! theHeight (car (gimp-image-height theImage)))
|
||||
(set! theWidth (car (gimp-image-get-width theImage)))
|
||||
(set! theHeight (car (gimp-image-get-height theImage)))
|
||||
(if (= inMottle TRUE)
|
||||
(let (
|
||||
(mLayer (car (gimp-layer-new theImage theWidth theHeight
|
||||
|
@ -41,8 +41,8 @@
|
||||
(rel-length (abs rel-length))
|
||||
(alpha (* (/ alpha 180) *pi*))
|
||||
(type (car (gimp-drawable-type-with-alpha drawable)))
|
||||
(image-width (car (gimp-image-width image)))
|
||||
(image-height (car (gimp-image-height image)))
|
||||
(image-width (car (gimp-image-get-width image)))
|
||||
(image-height (car (gimp-image-get-height image)))
|
||||
(from-selection 0)
|
||||
(active-selection 0)
|
||||
(shadow-layer 0)
|
||||
|
@ -32,8 +32,8 @@
|
||||
separate-layer)
|
||||
(let* (
|
||||
(type (car (gimp-drawable-type-with-alpha drawable)))
|
||||
(image-width (car (gimp-image-width image)))
|
||||
(image-height (car (gimp-image-height image)))
|
||||
(image-width (car (gimp-image-get-width image)))
|
||||
(image-height (car (gimp-image-get-height image)))
|
||||
(active-selection 0)
|
||||
(from-selection 0)
|
||||
(selection-bounds 0)
|
||||
|
@ -8,8 +8,8 @@
|
||||
;
|
||||
|
||||
(define (script-fu-ripply-anim image drawable displacement num-frames edge-type)
|
||||
(let* ((width (car (gimp-drawable-width drawable)))
|
||||
(height (car (gimp-drawable-height drawable)))
|
||||
(let* ((width (car (gimp-drawable-get-width drawable)))
|
||||
(height (car (gimp-drawable-get-height drawable)))
|
||||
(work-image (car (gimp-image-new width
|
||||
height
|
||||
(quotient (car (gimp-drawable-type drawable))
|
||||
|
@ -49,8 +49,8 @@
|
||||
(let* ((shadow-blur (abs shadow-blur))
|
||||
(radius (abs radius))
|
||||
(diam (* 2 radius))
|
||||
(width (car (gimp-image-width img)))
|
||||
(height (car (gimp-image-height img)))
|
||||
(width (car (gimp-image-get-width img)))
|
||||
(height (car (gimp-image-get-height img)))
|
||||
(type (car (gimp-drawable-type-with-alpha drawable)))
|
||||
(image (cond ((= work-on-copy TRUE)
|
||||
(car (gimp-image-duplicate img)))
|
||||
@ -95,8 +95,8 @@
|
||||
'(0 0 0)
|
||||
80
|
||||
TRUE)
|
||||
(set! width (car (gimp-image-width image)))
|
||||
(set! height (car (gimp-image-height image)))))
|
||||
(set! width (car (gimp-image-get-width image)))
|
||||
(set! height (car (gimp-image-get-height image)))))
|
||||
|
||||
; optionally add a background
|
||||
(if (= background-toggle TRUE)
|
||||
|
@ -20,10 +20,10 @@
|
||||
;
|
||||
(define (script-fu-util-image-resize-from-layer image layer)
|
||||
(let* (
|
||||
(width (car (gimp-drawable-width layer)))
|
||||
(height (car (gimp-drawable-height layer)))
|
||||
(posx (- (car (gimp-drawable-offsets layer))))
|
||||
(posy (- (cadr (gimp-drawable-offsets layer))))
|
||||
(width (car (gimp-drawable-get-width layer)))
|
||||
(height (car (gimp-drawable-get-height layer)))
|
||||
(posx (- (car (gimp-drawable-get-offsets layer))))
|
||||
(posy (- (cadr (gimp-drawable-get-offsets layer))))
|
||||
)
|
||||
|
||||
(gimp-image-resize image width height posx posy)
|
||||
|
@ -25,7 +25,7 @@
|
||||
(define (script-fu-selection-to-image image drawable)
|
||||
(let* (
|
||||
(draw-type (car (gimp-drawable-type-with-alpha drawable)))
|
||||
(image-type (car (gimp-image-base-type image)))
|
||||
(image-type (car (gimp-image-get-base-type image)))
|
||||
(selection-bounds (gimp-selection-bounds image))
|
||||
(select-offset-x (cadr selection-bounds))
|
||||
(select-offset-y (caddr selection-bounds))
|
||||
|
@ -39,8 +39,8 @@
|
||||
|
||||
(if (= (car (gimp-selection-is-empty image)) TRUE)
|
||||
(begin
|
||||
(set! selection-width (car (gimp-drawable-width drawable)))
|
||||
(set! selection-height (car (gimp-drawable-height drawable)))
|
||||
(set! selection-width (car (gimp-drawable-get-width drawable)))
|
||||
(set! selection-height (car (gimp-drawable-get-height drawable)))
|
||||
)
|
||||
(begin
|
||||
(set! selection-bounds (gimp-drawable-mask-bounds drawable))
|
||||
|
@ -64,8 +64,8 @@
|
||||
(car (gimp-image-duplicate img)))
|
||||
((= work-on-copy FALSE)
|
||||
img)))
|
||||
(owidth (car (gimp-image-width image)))
|
||||
(oheight (car (gimp-image-height image)))
|
||||
(owidth (car (gimp-image-get-width image)))
|
||||
(oheight (car (gimp-image-get-height image)))
|
||||
(ratio (if (>= owidth oheight) (/ 3 2)
|
||||
(/ 2 3)))
|
||||
(crop-width (crop owidth oheight ratio))
|
||||
|
@ -20,8 +20,8 @@
|
||||
(let* (
|
||||
(theImage inImage)
|
||||
(theLayer inLayer)
|
||||
(theHeight (car (gimp-drawable-height theLayer)))
|
||||
(theWidth (car (gimp-drawable-width theLayer)))
|
||||
(theHeight (car (gimp-drawable-get-height theLayer)))
|
||||
(theWidth (car (gimp-drawable-get-width theLayer)))
|
||||
)
|
||||
|
||||
(define (pasteat xoff yoff)
|
||||
|
@ -37,8 +37,8 @@
|
||||
(gimp-context-set-foreground color)
|
||||
|
||||
(set! text-layer (car (gimp-text-fontname img -1 0 0 text 10 TRUE size PIXELS font)))
|
||||
(set! width (car (gimp-drawable-width text-layer)))
|
||||
(set! height (car (gimp-drawable-height text-layer)))
|
||||
(set! width (car (gimp-drawable-get-width text-layer)))
|
||||
(set! height (car (gimp-drawable-get-height text-layer)))
|
||||
(gimp-image-resize img width height 0 0)
|
||||
|
||||
(gimp-image-undo-enable img)
|
||||
|
@ -5,8 +5,8 @@
|
||||
|
||||
(define (script-fu-unsharp-mask img drw mask-size mask-opacity)
|
||||
(let* (
|
||||
(drawable-width (car (gimp-drawable-width drw)))
|
||||
(drawable-height (car (gimp-drawable-height drw)))
|
||||
(drawable-width (car (gimp-drawable-get-width drw)))
|
||||
(drawable-height (car (gimp-drawable-get-height drw)))
|
||||
(new-image (car (gimp-image-new drawable-width drawable-height RGB)))
|
||||
(original-layer (car (gimp-layer-new new-image
|
||||
drawable-width drawable-height
|
||||
|
@ -356,9 +356,9 @@
|
||||
|
||||
(let* (
|
||||
(d-img (car (gimp-item-get-image drawable)))
|
||||
(d-width (car (gimp-drawable-width drawable)))
|
||||
(d-height (car (gimp-drawable-height drawable)))
|
||||
(d-offsets (gimp-drawable-offsets drawable))
|
||||
(d-width (car (gimp-drawable-get-width drawable)))
|
||||
(d-height (car (gimp-drawable-get-height drawable)))
|
||||
(d-offsets (gimp-drawable-get-offsets drawable))
|
||||
|
||||
(weaving (create-complete-weave d-width
|
||||
d-height
|
||||
|
@ -39,9 +39,9 @@
|
||||
(ds-opacity (min ds-opacity 100))
|
||||
(ds-opacity (max ds-opacity 0))
|
||||
(type (car (gimp-drawable-type-with-alpha drawable)))
|
||||
(image-width (car (gimp-image-width image)))
|
||||
(image-width (car (gimp-image-get-width image)))
|
||||
(hl-opacity (list hl-opacity-comp hl-opacity-comp hl-opacity-comp))
|
||||
(image-height (car (gimp-image-height image)))
|
||||
(image-height (car (gimp-image-get-height image)))
|
||||
(active-selection 0)
|
||||
(from-selection 0)
|
||||
(theLayer 0)
|
||||
|
Reference in New Issue
Block a user