Problem with gimp-path-set-points and gimp-path-stroke-current

Problem with gimp-path-set-points and gimp-path-stroke-current

Post by Brian Showalte » Thu, 13 Dec 2001 07:58:03



I'm trying to write a script-fu to draw some bezier curves using paths,
but GIMP locks up when it gets to the gimp-path-stroke-current command.  
Here are the relevant sections of my script:

(define (setPathCoords! s x0 y0 t0 x1 y1 t1 x2 y2 t2 x3 y3 t3 x4 y4 t4 x5
y5 t5)
        (aset s 0 x0)
        (aset s 1 y0)
        (aset s 2 t0)
        (aset s 3 x1)
        (aset s 4 y1)
        (aset s 5 t1)
        (aset s 6 x2)
        (aset s 7 y2)
        (aset s 8 t2)
        (aset s 9 x3)
        (aset s 10 y3)
        (aset s 11 t3)
        (aset s 12 x4)
        (aset s 13 y4)
        (aset s 14 t4)
        (aset s 15 x5)
        (aset s 16 y5)
        (aset s 17 t5)
)

Create an image and add a couple of layers here.

;Draw a path on the border
(gimp-selection-none image)
(setPathCoords! pathPoints
        0 20 1
        0 20 2
        0 0 2
        20 0 1
        0 0 2
        20 0 2
)
(gimp-path-set-points image "Border Path" 1 6 pathPoints)
(gimp-palette-set-foreground inBorderColor)
(gimp-brushes-set-brush "Circle (01)")
(gimp-path-stroke-current image)

What am I doing wrong?  Where can I find some sample scripts that use the
gimp-path-set-points and gimp-path-stroke-current commands?  I have
scoured Google and the mailing list archives, but there is really a
dearth of information on manipulating paths with script-fu.

Thanks.

 
 
 

1. gimp-path-set-points

Hello!

Does anyone know how to invoke the gimp-path-set-points function in a
script-fu? Is there an other possibility to make bezier selections in a
script?

Thanks!

--

CU, Michael


---=[ http://technoid.xodox.com ]=---

2. MPEG

3. Stroke Path versus Stroke Selection

4. N-gon to triangle?? (subpixel info also wanted!!!!!)

5. Intelligent scissors / paths with new gimp?

6. The REAL Lena

7. Basic Stroking a path Problem PS6

8. creating an enclosing path around a set of points

9. path finding problem in 3D set of vertices and faces

10. Stroking a Path