; goose24-border-internal.scm ; by Dave Seaton ; http://thermos.goose24.org ; Version 1.0 (20030806) ; Version 1.0a (2004/09) by Raymond Ostertag : Changed menu entry ; Description ; ; Makes a border inside the bounds of the image. ; License: ; ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2 of the License, or ; (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. ; ; The GNU Public License is available at ; http://www.gnu.org/copyleft/gpl.html (define (goose24-border-internal image drawable pixels color feather ) (let* ((width (car (gimp-image-width image))) (height (car (gimp-image-height image))) (whitelayer (car (gimp-layer-new image width height RGB-IMAGE "Border" 100 NORMAL-MODE))) (oldcolor (car (gimp-palette-get-foreground))) ) (gimp-image-undo-disable image) (gimp-image-add-layer image whitelayer -1) (gimp-layer-add-alpha whitelayer) (gimp-drawable-fill whitelayer TRANS-IMAGE-FILL) (gimp-selection-all image) (gimp-selection-shrink image pixels) (gimp-selection-invert image) (if (= feather TRUE) (gimp-selection-feather image pixels)) (gimp-palette-set-foreground color ) (gimp-bucket-fill whitelayer FG-BUCKET-FILL NORMAL-MODE 100 255 0 1 1) (gimp-palette-set-foreground oldcolor) (gimp-selection-none image) (gimp-image-undo-enable image) (gimp-displays-flush))) (script-fu-register "goose24-border-internal" "/Script-Fu/Decor/Internal Border..." "Make an internal border" "Dave Seaton" "Dave Seaton" "August 2003" "RGB RGBA GRAY GRAYA" SF-IMAGE "Image" 0 SF-DRAWABLE "Drawable" 0 SF-ADJUSTMENT "Pixels" '(8 1 100 1 1 0 0) SF-COLOR "Color" '(255 255 255) SF-TOGGLE "Feather" FALSE )