; balloon ; creates a balloon like in comics ; it sucks a bit ;-) ; (C) Copyright 2000 by Michael Spunt ; Gopal.V hacked it in 2002 to make it suck less (Aqua'ish) ; but cut a few corners (literally) (define (round-balloon2 img drawable bw bh orientation revert lw fill border) (let* ((x 0)) (begin (set! x (- (* bw 0.5) (* bw 0.2))) (gimp-ellipse-select img x (* bh 0.5) (* bw 0.4) (* bh 0.4) REPLACE TRUE FALSE 0) (set! x (- (* bw 0.5) (* bw 0.2) (* bw orientation -0.1))) (gimp-ellipse-select img x (* bh 0.5) (* bw 0.4) (* bh 0.4) SUB TRUE FALSE 0)) (if (= revert FALSE) (gimp-selection-translate img (* bw orientation 0.3) 0)) (gimp-ellipse-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.65) ADD TRUE FALSE 0) (gimp-palette-set-background fill) (gimp-palette-set-foreground border) (gimp-edit-fill drawable 0) (gimp-selection-shrink img lw) (gimp-edit-fill drawable 1) (gimp-selection-none img) (plug-in-gauss-rle2 1 img drawable 5.0 5.0) (plug-in-bump-map 1 img drawable drawable 135 14 4 0 0 74 182 1 0 1) )) (define (script-fu-balloon2 bw bh right revert lw fill border) (let* ( (orientation 1) (side 1) (img (car (gimp-image-new bw bh RGB))) (balloon (car (gimp-layer-new img bw bh RGBA_IMAGE "Balloon2" 100 NORMAL)))) (if (= right FALSE) (set! orientation -1)) (gimp-image-add-layer img balloon 1) (gimp-display-new img) (gimp-edit-clear balloon) (round-balloon2 img balloon bw bh orientation revert lw fill border) (gimp-selection-none img) (gimp-displays-flush))) (script-fu-register "script-fu-balloon2" "/Xtns/Script-Fu/Text/Balloon2" "Creates an Aqua'ish balloon (was like used in comics.)" "Michael Spunt (Hacked by Gopal)" "Copyright 2000, Michael Spunt" "May 20, 2000" "" SF-VALUE "Width" "240" SF-VALUE "Height" "160" SF-TOGGLE "Right oriented" FALSE SF-TOGGLE "Change side" TRUE SF-VALUE "Line width" "2" SF-COLOR "Fill" '(166 182 194) SF-COLOR "Border" '(22 22 22) )