;;; ;;; draw-circle.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-circle inImage inLayer cx cy Radius FeatherRadius Feather Antialias) (let* ( (sx (- cx Radius)) (sy (- cy Radius)) (diameter (* Radius 2)) (dx diameter) (dy diameter) ) (gimp-ellipse-select inImage sx sy dx dy REPLACE Antialias Feather FeatherRadius) (gimp-edit-fill inLayer 0) (gimp-displays-flush) ) ;;let ) ;;def (script-fu-register "script-fu-draw-circle" _"/Script-Fu/Geometry/Draw Circle..." "Disegna una circonferenza di centro e raggio dati e la colora con il colore di primo piano attivo. X ed Y indicano le coordinate del centro della circonferenza e Radius il suo raggio." "Arch. Giuseppe Conte" "2002, Giuseppe Conte" "06 Maggio 2002" "RGB* GRAY* INDEXED*" SF-IMAGE "The Image" 0 SF-DRAWABLE "The Layer" 0 SF-ADJUSTMENT "X origin" '(0 0 9999 1 10 0 1) SF-ADJUSTMENT "Y origin" '(0 0 9999 1 10 0 1) SF-ADJUSTMENT "Radius" '(0 0 9999 1 10 0 1) SF-ADJUSTMENT "Radius Feather" '(0 0 9999 1 10 0 1) SF-TOGGLE "Feather" FALSE SF-TOGGLE "Antialias" FALSE )