; Studio Tecnico Arch. Giuseppe Conte ; 72026 - San Pancrazio Salentino (BR) - Italy ; ; Plugin : selection-to-array.scm ; Author : Arch. Giuseppe Conte ; Date : 31 luglio 2003 - San Pancrazio Salentino ; Revision: 17 giugno 2004 ; Version : 2.0 ; Version 2.0a Raymond Ostertag 2004/09 ; - changed menu entry, translated ; Last version at: http://xoomer.virgilio.it/lwcon/ ; Help guide at : http://xoomer.virgilio.it/lwcon/ ; ; Dependencie: ; Download : http://xoomer.virgilio.it/lwcon/gimp/script-fu/script-fu.htm ; ; Description: ; Draw an polar array from active selection. ; ; ; ----------------------------------------------------------------------------- ; ; 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. ; ; 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-selection-to-array inImage inLayer righe colonne dy dx ) (set! drawable inLayer) (gimp-edit-copy drawable) ;;coordinate dell'angolo superiore sinistro della selezione (set! xsel (cadr (gimp-selection-bounds inImage))) (set! ysel (caddr (gimp-selection-bounds inImage))) (set! xofset xsel) (set! yofset ysel) (set! ycount 0) (while (< ycount righe) (begin (set! yofset (+ ysel (* dy ycount))) (draw-riga colonne xsel dx yofset) (set! ycount (+ ycount 1)) );end begin (gimp-displays-flush) );end while ) ;;def (define (draw-riga ncol xsel dx yofs) (set! gcount 0) (while (< gcount ncol) (begin (set! xofset (+ xsel (* dx gcount) )) (set! sel-float (car (gimp-edit-paste drawable FALSE))) (gimp-layer-set-offsets sel-float xofset yofs) (gimp-floating-sel-anchor sel-float) (set! gcount (+ gcount 1)) );begin );while ) (script-fu-register "script-fu-selection-to-array" _"/Script-Fu/Selection/Selection to array..." "Convert active selection to an array n x n. Tutorial and help guide on web site: http://xoomer.virgilio.it/lwcon/ " "Arch. Giuseppe Conte" "Giuseppe Conte" "31 Luglio 2003 - Ver. 2.0" "RGB* GRAY* INDEXED*" SF-IMAGE "The Image" 0 SF-DRAWABLE "The Layer" 0 SF-ADJUSTMENT "Line" '(0 0 9999 1 10 0 1) SF-ADJUSTMENT "Column" '(0 0 9999 1 10 0 1) SF-ADJUSTMENT "Lines offset" '(0 -9999 9999 1 10 0 1) SF-ADJUSTMENT "Columns offset" '(0 -9999 9999 1 10 0 1) )