/usr/share/gimp/2.0/scripts/conte-draw-tools.scm is in gimp-plugin-registry 7.20140602ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | ;
; The GIMP -- an image manipulation program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; Conte draw tools script for GIMP 2.4
; Author : Arch. Giuseppe Conte
; Date : 24 settembre 2003
; Revision: 22 maggio 2004
; Version : 2.0
; Last version at: http://xoomer.virgilio.it/lwcon/
; Help guide at : http://xoomer.virgilio.it/lwcon/
; Arch. Giuseppe Conte <http://space.tin.it/edicola/lwcon/>
; Studio Tecnico Arch. Giuseppe Conte
; 72026 - San Pancrazio Salentino (BR) - Italy
;
; Tags: shapes
;
; Author statement:
;
;
; --------------------------------------------------------------------
; Distributed by Gimp FX Foundry project
; --------------------------------------------------------------------
; - Changelog -
; Updated to Gimp2.4 (11-2007) http://www.gimpscripts.com
;
; --------------------------------------------------------------------
;
; 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 (script-fu-draw-box inImage inLayer inXorig inYorig inWidth inHeight FeatherRadius Feather)
(gimp-rect-select inImage
inXorig inYorig
inWidth inHeight
REPLACE
Feather ; No feathering
FeatherRadius)
(gimp-edit-fill inLayer 0)
(gimp-selection-none inImage)
(gimp-displays-flush)
)
(script-fu-register
"script-fu-draw-box"
_"<Image>/FX-Foundry/Shapes/Parametric/Box"
"Draw a box by filling in numeric values"
"Arch. Giuseppe Conte"
"2003, Giuseppe Conte"
"13 Agosto 2003 - 72026 San Pancrazio Salentino (BR) - ITALY"
"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 "Width" '(0 0 9999 1 10 0 1)
SF-ADJUSTMENT "Height" '(0 0 9999 1 10 0 1)
SF-ADJUSTMENT "Radius Feather" '(0 0 9999 1 10 0 1)
SF-TOGGLE "Feather" FALSE
)
;Draw arch
;
; Define the function:
(define (lung))
(define (angolo))
(define (arco))
(define (aRotaz))
(define (beta))
(define (gamma))
(define (gcount))
(define (npoint))
(define (script-fu-draw-arch inImage inLayer dx dy Radius From To Lati)
(set! lung (- From To))
(set! angolo (/ lung Lati))
(set! arco (* angolo (/ 3.14 180)))
(set! aRotaz (* To (/ 3.14 180)))
(set! beta aRotaz)
(set! gamma 0)
(set! gcount 1)
(set! npoint 4)
(let* ( (segment (cons-array 4 'double))
(stepx dx)
(stepy dy)
(raggio Radius)
(nlati Lati)
)
;inizio delle operazioni che potranno essere annullate con un solo undo
(gimp-image-undo-group-start inImage)
(while (<= gcount nlati)
(set! beta (+ beta arco))
(set! gamma (- beta arco))
(aset segment 0 (+ (* raggio (cos gamma)) stepx))
(aset segment 1 (+ (- (* raggio (sin gamma))) stepy))
(aset segment 2 (+ (* raggio (cos beta)) stepx))
(aset segment 3 (+ (- (* raggio (sin beta))) stepy))
(gimp-pencil inLayer npoint segment )
(set! gcount (+ gcount 1))
(gimp-displays-flush)
);end while
;fine delle operazioni che potranno essere annullate con un solo undo
(gimp-image-undo-group-end inImage)
);;let
) ;;def
(script-fu-register
"script-fu-draw-arch"
_"<Image>/FX-Foundry/Shapes/Parametric/_Arch"
"Draw arch and circles, at center point specified, from initial angle to final angle."
"Arch. Giuseppe Conte"
"2004, Giuseppe Conte"
"22 maggio 2004 - Ver. 2.0"
"RGB* GRAY* INDEXED*"
SF-IMAGE "The Image" 0
SF-DRAWABLE "The Layer" 0
SF-ADJUSTMENT "X center" '(0 -9999 9999 1 10 0 1)
SF-ADJUSTMENT "Y center" '(0 -9999 9999 1 10 0 1)
SF-ADJUSTMENT "Radius" '(10 0 9999 1 10 0 1)
SF-ADJUSTMENT "From angle" '(0 -9999 9999 1 10 0 1)
SF-ADJUSTMENT "To angle" '(360 -9999 9999 1 10 0 1)
SF-ADJUSTMENT "Number of Segments" '(36 0 9999 1 10 0 1)
)
;;;
;;; draw-ellipse
;;;
;;; Updated to Gimp2.4 (11-2007) http://www.gimpscripts.com
;;; Define the function:
(define (angolo))
(define (arco))
(define (delta))
(define (alfa))
(define (xa))
(define (ya))
(define (xb))
(define (yb))
(define (gcount))
(define (npoint))
(define (script-fu-draw-ellipse inImage inLayer dx dy Ra Rb Lati Rotaz)
(set! angolo (/ 360 Lati))
(set! arco (* angolo (/ 3.14 180)))
(set! delta (* Rotaz (/ 3.14 180)))
(set! alfa 0)
(set! xa 0)
(set! ya 0)
(set! xb 0)
(set! yb 0)
(set! gcount 1)
(set! npoint 4)
(let* ( (segment (cons-array 4 'double))
(stepx dx)
(stepy dy)
(nlati Lati)
)
;inizio delle operazioni che potranno essere annullate con un solo undo
(gimp-image-undo-group-start inImage)
(while (<= gcount nlati)
(set! xa (* Ra (cos alfa)) )
(set! ya (- (* Rb (sin alfa))) )
(aset segment 0 (+ (- (* (cos delta) xa) (* (sin delta) ya)) stepx) )
(aset segment 1 (+ (+ (* (sin delta) xa) (* (cos delta) ya)) stepy) )
(set! alfa (+ alfa arco))
(set! xb (* Ra (cos alfa)) )
(set! yb (- (* Rb (sin alfa))) )
(aset segment 2 (+ (- (* (cos delta) xb) (* (sin delta) yb)) stepx) )
(aset segment 3 (+ (+ (* (sin delta) xb) (* (cos delta) yb)) stepy) )
(gimp-pencil inLayer npoint segment )
(set! gcount (+ gcount 1))
);end while
;fine delle operazioni che potranno essere annullate con un solo undo
(gimp-image-undo-group-end inImage)
(gimp-displays-flush)
);;let
) ;;def
(script-fu-register
"script-fu-draw-ellipse"
_"<Image>/FX-Foundry/Shapes/Parametric/Ellipse"
"Draw an ellipse."
"Arch. Giuseppe Conte <http://space.tin.it/edicola/lwcon/>"
"2002, Giuseppe Conte"
"21 September 2002 - 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 "Semi-axis a" '(10 0 9999 1 10 0 1)
SF-ADJUSTMENT "Semi-axis b" '(10 0 9999 1 10 0 1)
SF-ADJUSTMENT "Number segments" '(36 0 9999 1 10 0 1)
SF-ADJUSTMENT "Inclination" '(0 -9999 9999 1 10 0 1)
)
;;;
;;; draw-polygon
;;;
;;; Updated to Gimp2.4 (11-2007) http://www.gimpscripts.com
;;; Define the function:
(define (script-fu-draw-polygon inImage inLayer dx dy Radius Lati)
(set! angolo (/ 360 Lati))
(set! arco (* angolo (/ 3.14 180)))
(set! beta 0)
(set! gamma 0)
(set! gcount 1)
(set! npoint 4)
(let* ( (segment (cons-array 4 'double))
(stepx dx)
(stepy dy)
(raggio Radius)
(nlati Lati)
)
;inizio delle operazioni che potranno essere annullate con un solo undo
(gimp-image-undo-group-start inImage)
(begin
(while (<= gcount nlati)
(set! beta (+ beta arco))
(set! gamma (- beta arco))
(aset segment 0 (+ (* raggio (cos gamma)) stepx))
(aset segment 1 (+ (- (* raggio (sin gamma))) stepy))
(aset segment 2 (+ (* raggio (cos beta)) stepx))
(aset segment 3 (+ (- (* raggio (sin beta))) stepy))
(gimp-pencil inLayer npoint segment )
(set! gcount (+ gcount 1))
);end while
);end begin
;fine delle operazioni che potranno essere annullate con un solo undo
(gimp-image-undo-group-end inImage)
(gimp-displays-flush)
);;let
) ;;def
(script-fu-register
"script-fu-draw-polygon"
_"Polygon"
_"Draw all regular polygonos by exact numbers. Input: center, radius, number segment."
"Arch. Giuseppe Conte <http://space.tin.it/edicola/lwcon/>"
"2002, Giuseppe Conte"
"08 Maggio 2002 - Florence - 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 "Radius" '(10 0 9999 1 10 0 1)
SF-ADJUSTMENT "Segments" '(3 0 9999 1 10 0 1)
)
(script-fu-menu-register "script-fu-draw-polygon"
"<Image>/FX-Foundry/Shapes/Parametric")
|