;;; ;;; draw-poligono.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-radial-line inImage inLayer dx dy iRadius eRadius Lati Arch Rotaz) ; (set! angolo (/ 360 Lati)) (set! angolo (/ Arch Lati)) (set! arco (* angolo (/ 3.14 180))) (set! aRotaz (* Rotaz (/ 3.14 180))) (set! beta aRotaz) (set! gcount 0) (set! npoint 4) ;; (set! nlati (+ Lati 1)) (let* ( (segment (cons-array 4 'double)) (stepx dx) (stepy dy) (iRaggio iRadius) (eRaggio eRadius) (nlati Lati) ) (while (<= gcount nlati) (aset segment 0 (+ (* iRaggio (cos beta)) stepx)) (aset segment 1 (+ (- (* iRaggio (sin beta))) stepy)) (aset segment 2 (+ (* eRaggio (cos beta)) stepx)) (aset segment 3 (+ (- (* eRaggio (sin beta))) stepy)) (gimp-pencil inLayer npoint segment ) (set! gcount (+ gcount 1)) (set! beta (+ beta arco)) );end while (gimp-displays-flush) );;let ) ;;def (script-fu-register "script-fu-draw-radial-line" _"/Script-Fu/Geometry/Draw radial Line..." "Draw Radial Line." "Arch. Giuseppe Conte " "2002, Giuseppe Conte" "13 Settembre 2002 - 72026 San Pancrazio Salentino (BR) - Italy" "RGB* GRAY* INDEXED*" SF-IMAGE "The Image" 0 SF-DRAWABLE "The Layer" 0 SF-ADJUSTMENT "X center" '(0 0 9999 1 10 0 1) SF-ADJUSTMENT "Y center" '(0 0 9999 1 10 0 1) SF-ADJUSTMENT "Interior Radius" '(10 0 9999 1 10 0 1) SF-ADJUSTMENT "Exterior Radius" '(10 0 9999 1 10 0 1) SF-ADJUSTMENT "Number of segment" '(3 0 9999 1 10 0 1) SF-ADJUSTMENT "Arch Length" '(0 -9999 9999 1 10 0 1) SF-ADJUSTMENT "Tilting" '(0 -9999 9999 1 10 0 1) )