Re: Re[2]: Round selection (again)

2000-07-08 Thread Hago Ziegler

Hi Thomas,

 Again, it just does not work, the error message I receive is:
 "Procedural database execution failed: (gimp_selection_bounds 0)
 Can it be possibly a bug?

I tried it again and incidentally I found out, that it works, just like
it is. But is works only once, immediately after having started Gimp.
If you do anything before, it will display the typical error message.

I tested it on linux-gimp 1.1.24 ands on windows-gimp 1.1.19  -  the
same.
For the moment I don't know how to resolve this Problem.

Hago





Re[2]: Round selection (again)

2000-07-07 Thread Thomas Stolt

Hago,

yes, the *gimp-ellipse-select* works, however that is not what I am searching for.  A 
rounding of a rectangular select gives me a different shape, than the ellipse does.

Again, it just does not work, the error message I receive is:
"Procedural database execution failed: (gimp_selection_bounds 0)"

Can it be possibly a bug?

Any further ideas??


Thomas



"Hago Ziegler" [EMAIL PROTECTED] schrieb am 06.07.00:
 Hi Thomas,
 
 I still changed it a little. With the first one I had to restart Gimp to
 use it twice, with "set!" instead of "let*" this is not necessary.
 
 Hago
 
 ...
 (define (script-fu-text-test inHeight inWidth )
(set! theImage (car (gimp-image-new inWidth inHeight RGB)))
(set! theLayer (car (gimp-layer-new theImage inWidth inHeight
 RGBA_IMAGE "Layer 1" 100 NORMAL)))
   (gimp-image-add-layer theImage theLayer -1)
   (gimp-selection-all theImage)
   (gimp-edit-clear theLayer)
   (gimp-image-set-active-layer theImage theLayer)
 
   (gimp-ellipse-select theImage 0 0 inHeight inHeight 2 TRUE 0 0
   (gimp-display-new theImage)
   (gimp-image-clean-all theImage)
 )
 
 (script-fu-register
   "script-fu-text-test"
   "Toolbox/Xtns/Script-Fu/Text/Test1"
   "create a box with a round selection (to create a nice button)"
   "Thomas Stolt"
   "copyright 2000, Thomas Stolt"
   "5th of July 2000"
   ""  ;Image type that the script works on
   SF-VALUE "Height:" "31"  ;Button Height
   SF-VALUE "Width:" "100"  ;Button Width
 )
 ...
  92รจ 


___
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
[EMAIL PROTECTED], 8MB Speicher, Verschluesselung - http://freemail.web.de




Round selection (again)

2000-07-06 Thread Thomas Stolt

Ok, I just don't get it, I am still struggling with the basics of ScriptFu.

Please look into the attached script, all I am trying to do is this:

Create a box, transparent
Select all
Round selection

This works perfectly simple and easy manually, but I cannot convince ScriptFu of that. 
Neither script-fu-selection-round nor perl-fu-round-sel give me the results that I get 
by hand.  Very strange, if I produce a box with the script below and round the 
selection manually it works perfectly!!??

*argl*  Help Please!!!

Moreover: I still have not found a proper ScriptFu guide, the couple of pages in the 
GimpUserGuide are totally unsufficient, once you've read them.  Is there a proper 
Language-Definition-Guide out there?

many thanks in advance

Thomas

-
(define (script-fu-text-test inHeight inWidth )
 (let*
  (
   (theImage (car (gimp-image-new inWidth inHeight RGB)))
   (theLayer (car (gimp-layer-new theImage inWidth inHeight RGBA_IMAGE "Layer 1" 100 
NORMAL)))
  )
  (gimp-image-add-layer theImage theLayer -1)
  (gimp-selection-all theImage)
  (gimp-edit-clear theLayer)
  (gimp-image-set-active-layer theImage theLayer)

  ; neither this ...
  (script-fu-selection-round 0 theImage theLayer "1.0")
  ; ...nor this works
  ;(perl-fu-round-sel 1 theImage theLayer 1)

  (gimp-display-new theImage)
  (gimp-image-clean-all theImage)
 )
)

(script-fu-register
  "script-fu-text-test" 
  "Toolbox/Xtns/Script-Fu/Text/Test" 
  "create a box with a round selection (to create a nice button)"
  "Thomas Stolt"  
  "copyright 2000, Thomas Stolt"  
  "5th of July 2000"  
  ""  ;Image type that the script works on
  SF-VALUE "Height:" "31"  ;Button Height
  SF-VALUE "Width:" "100"  ;Button Width
)
-
___
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
[EMAIL PROTECTED], 8MB Speicher, Verschluesselung - http://freemail.web.de




Re: Round selection (again)

2000-07-06 Thread Hago Ziegler

Hi Thomas,

..
(define (script-fu-text-test inHeight inWidth )
 (let*
  (
   (theImage (car (gimp-image-new inWidth inHeight RGB)))
   (theLayer (car (gimp-layer-new theImage inWidth inHeight RGBA_IMAGE
"Layer 1" 100 NORMAL)))
  )
  (gimp-image-add-layer theImage theLayer -1)
  (gimp-selection-all theImage)
  (gimp-edit-clear theLayer)
  (gimp-image-set-active-layer theImage theLayer)

  (gimp-ellipse-select theImage 0 0 inHeight inWidth 2 TRUE 0 0)  ;only
change

  ; neither this ...
  (script-fu-selection-round 0 theImage theLayer "1.0")
  ; ...nor this works
  ;(perl-fu-round-sel 1 theImage theLayer 1)

  (gimp-display-new theImage)
  (gimp-image-clean-all theImage)
 )
)

(script-fu-register
  "script-fu-text-test"
  "Toolbox/Xtns/Script-Fu/Text/Test1"
  "create a box with a round selection (to create a nice button)"
  "Thomas Stolt"
  "copyright 2000, Thomas Stolt"
  "5th of July 2000"
  ""  ;Image type that the script works on
  SF-VALUE "Height:" "31"  ;Button Height
  SF-VALUE "Width:" "100"  ;Button Width
)


This works here.

Hago




Re: Round selection (again)

2000-07-06 Thread Hago Ziegler

Hi Thomas,

I still changed it a little. With the first one I had to restart Gimp to
use it twice, with "set!" instead of "let*" this is not necessary.

Hago

...
(define (script-fu-text-test inHeight inWidth )
   (set! theImage (car (gimp-image-new inWidth inHeight RGB)))
   (set! theLayer (car (gimp-layer-new theImage inWidth inHeight
RGBA_IMAGE "Layer 1" 100 NORMAL)))
  (gimp-image-add-layer theImage theLayer -1)
  (gimp-selection-all theImage)
  (gimp-edit-clear theLayer)
  (gimp-image-set-active-layer theImage theLayer)

  (gimp-ellipse-select theImage 0 0 inHeight inHeight 2 TRUE 0 0
  (gimp-display-new theImage)
  (gimp-image-clean-all theImage)
)

(script-fu-register
  "script-fu-text-test"
  "Toolbox/Xtns/Script-Fu/Text/Test1"
  "create a box with a round selection (to create a nice button)"
  "Thomas Stolt"
  "copyright 2000, Thomas Stolt"
  "5th of July 2000"
  ""  ;Image type that the script works on
  SF-VALUE "Height:" "31"  ;Button Height
  SF-VALUE "Width:" "100"  ;Button Width
)
...




Re: Round selection (again)

2000-07-06 Thread Hago Ziegler

Hi,

 what version of GIMP are you using? (I know it works on 1.1.14 or
so)... however, I am using 1.1.24.

I'm using the same.

Hago