How to get Tracing in a Gimp Script? | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
I posted this to Gimp-User awhile ago and got no response. Hoping for more here. :) Also, thanks Kevin for your earlier response! :)
----
Earlier message:
I am trying to turn on script tracing in Gimp 2.4 so I can track the progress of a test script I wrote. Though I have called (tracing 1) as indicated in the tiny-fu documentation I am seeing no tracing occurring. I have checked the console log file, the script-fu console and looked for other output as well but have seen no tracing output. Is there something I am missing? Where is the tracing output supposed to show up? It there another step that I'm missing? The script I wrote is below. Thanks. :)
---
Script:
(define
(
script-fu-text-box inText inFont inFontSize inTextColor inBufferAmount
)
(let*
(
(theImageWidth 10)
(theImageHeight 10)
(theImage (car (gimp-image-new theImageWidth theImageHeight RGB ) ) )
(theText)
(theBuffer)
(theLayer (car (gimp-layer-new theImage theImageWidth theImageHeight RGB-IMAGE "layer 1" 100 NORMAL ) ) )
)
(tracing 1)
( gimp-image-undo-group-start theImage )
(gimp-image-add-layer theImage theLayer 0)
(gimp-context-set-background '(255 255 255) )
(gimp-context-set-foreground inTextColor)
(gimp-drawable-fill theLayer BACKGROUND-FILL)
(set! theText (car (gimp-text-fontname theImage theLayer 0 0 inText 0 TRUE inFontSize PIXELS "ProFontISOLatin1") ) )
(set! theImageWidth (car (gimp-drawable-width theText) ) )
(set! theImageHeight (car (gimp-drawable-height theText) ) )
(gimp-image-resize theImage theImageWidth theImageHeight 0 0)
(gimp-layer-resize theLayer theImageWidth theImageHeight 0 0)
(set! theBuffer (* theImageHeight (/ inBufferAmount 100) ) )
(set! theImageHeight (+ theImageHeight theBuffer theBuffer) )
(set! theImageWidth (+ theImageWidth theBuffer theBuffer) )
(gimp-image-resize theImage theImageWidth theImageHeight 0 0)
(gimp-layer-resize theLayer theImageWidth theImageHeight 0 0)
(gimp-layer-set-offsets theText theBuffer theBuffer)
( gimp-image-undo-group-end theImage )
(gimp-display-new theImage)
(list theImage theLayer theText)
(tracing 0)
)
)
(script-fu-register
"script-fu-text-box"
"First Script"
"Creates a simple text box, sized to fit around the user's choice of text, font, font size, and color." ;description
"Me"
"Copyright 2007"
"June 25, 2007"
"" ;image type that the script works on
SF-STRING "Text:" "Text Box" ;a string variable
SF-FONT "Font:" "Charter" ;a font variable
SF-ADJUSTMENT "Font size" '(50 1 1000 1 10 0 1) ;a spin-button
SF-COLOR "Color:" '(0 0 0) ;color variable
SF-ADJUSTMENT "Buffer amount" '(55 0 100 1 10 1 0) ;a slider
)
(script-fu-menu-register "script-fu-text-box" "<Toolbox>/Xtns/Me")
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
[Non-text portions of this message have been removed]
[Gimp Developers] [Gimp Users] [Photos] [Yosemite News] [Yosemite Photos] [Epson Inkjet] [Scanner] [Gimp's Home] [GIMP Books] [Steve's Art]
![]() |
![]() |