; The GIMP -- an image manipulation program ; Copyright (C) 1995 Spencer Kimball and Peter Mattis ; ; ; Copyright (c) 2002 Matteo Nastasi aka MatOfPenguins aka mop ; nastasi@alternativeoutput.it ; matteo.nastasi@milug.org ; ; Create a menu button from parameter (2 text lines, not hilite) ; ; ; 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-aonew-menu2 border inmeno altezza txt txt2 outfile) (let* ((img (car (gimp-image-new 512 100 RGB))) (drawable (car (gimp-layer-new img 512 100 RGB-IMAGE "Jabar" 100 NORMAL))) ) (gimp-image-add-layer img drawable 0) (gimp-palette-set-foreground '(232 226 212)) (gimp-palette-set-background '(145 23 25)) (gimp-edit-clear drawable) ;; (set! templayer (car (gimp-text-fontname img drawable 0 0 txt border TRUE altezza PIXELS "-adobe-avantgarde-demi-r-normal-*-*-140-*-*-p-*-iso8859-1"))) (set! templayer (car (gimp-text-fontname img drawable 0 0 txt border TRUE altezza PIXELS "URW Gothic L,"))) (set! larg (car (gimp-drawable-width templayer))) (set! alte (car (gimp-drawable-height templayer))) (gimp-floating-sel-anchor templayer) (set! offs (- altezza inmeno)) ;; (set! templayer (car (gimp-text-fontname img drawable 0 offs txt2 border TRUE altezza PIXELS "-adobe-avantgarde-demi-r-normal-*-*-140-*-*-p-*-iso8859-1"))) (set! templayer (car (gimp-text-fontname img drawable 0 offs txt2 border TRUE altezza PIXELS "URW Gothic L,"))) (set! larg2 (car (gimp-drawable-width templayer))) (set! alte2 (car (gimp-drawable-height templayer))) (gimp-floating-sel-anchor templayer) (set! hcrop (max larg larg2)) (set! vcrop (+ offs alte2)) (gimp-crop img hcrop vcrop 0 0) (file-pnm-save 1 img drawable outfile outfile 1))) (script-fu-register "script-fu-aonew-menu2" "/Xtns/Script-Fu/Misc/AO New Menu2" "AO New Menu2" "Matteo Nastasi" "Matteo Nastasi" "2002-03-06" "" SF-VALUE "Border" "5" SF-VALUE "In meno" "5" SF-VALUE "Height" "14" SF-STRING "Text" "text" SF-STRING "Text" "text2" SF-FILENAME "Outfile" "outfile.pnm")