;; ;; This just creates an image with given text with dimensions appropriate for the ;; main navigation section of the Math Deparment home page. This iteration puts ;; the text on a background color. You probably want to use transgif to make the ;; background transparent if you're using this for the web page. ;; (script-fu-register "script-fu-psuMath-textBox" ; func name "/Xtns/Script-Fu/PSU Math/textBox" ; menu position "Creates a simple text box, sized to fit around the user's choice of text"; "Ron Tapia" ; author "copyright 2003" ; copyright "Jan 26, 2003" ; creation date "" ; image that the script works on SF-STRING "Text:" "Text"; a string ) (define (script-fu-psuMath-textBox inText) (let* ((image (car (gimp-image-new 275 30 RGB))) (layer (car (gimp-layer-new image 275 30 RGB_IMAGE "foobar" 100 NORMAL-MODE)))) (gimp-palette-set-background '(206 206 156)) (gimp-palette-set-foreground '(0 0 0)) (gimp-drawable-fill layer BG-IMAGE-FILL) (gimp-image-add-layer image layer 0) (gimp-floating-sel-anchor (car (gimp-text-fontname image layer 35 7 inText 0 TRUE 18 PIXELS "-adobe-utopia-medium-r-normal-*-*-180-*-*-p-*-iso8859-1"))) (gimp-display-new image) image))