;;; ;;; draw-rectangle.scm ;;; ;;; ;;; Arch. Giuseppe Conte ;;; ;;; Raymond Ostertag 2004/09 changed menu entry ;;; 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. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with this program; if not, write to the Free Software ;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;; Define the function: (define (script-fu-draw-rectangle inImage inLayer xa ya base altezza) (set! npoint 16) (let* ( (segment (cons-array 16 'double)) ) (aset segment 0 (* 1 xa)) (aset segment 1 (* 1 ya)) (aset segment 2 (* 1 (+ xa base))) (aset segment 3 (* 1 ya)) (aset segment 4 (* 1 (+ xa base))) (aset segment 5 (* 1 ya)) (aset segment 6 (* 1 (+ xa base))) (aset segment 7 (* 1 (+ ya altezza))) (aset segment 8 (* 1 (+ xa base))) (aset segment 9 (* 1 (+ ya altezza))) (aset segment 10 (* 1 xa)) (aset segment 11 (* 1 (+ ya altezza))) (aset segment 12 (* 1 xa)) (aset segment 13 (* 1 (+ ya altezza))) (aset segment 14 (* 1 xa)) (aset segment 15 (* 1 ya)) (gimp-pencil inLayer npoint segment ) (gimp-displays-flush) );let ) ;;def (script-fu-register "script-fu-draw-rectangle" _"/Script-Fu/Geometry/Draw Rectangle..." "Draw rectangle between two points." "Arch. Giuseppe Conte " "2002, Giuseppe Conte" "11 Settembre 2002 - San Pancrazio Sal (BR) - Italy" "RGB* GRAY* INDEXED*" SF-IMAGE "The Image" 0 SF-DRAWABLE "The Layer" 0 SF-ADJUSTMENT "Xa" '(0 0 9999 1 10 0 1) SF-ADJUSTMENT "Ya" '(0 0 9999 1 10 0 1) SF-ADJUSTMENT "Width" '(0 0 9999 1 10 0 1) SF-ADJUSTMENT "Heigth" '(0 0 9999 1 10 0 1) )