Re: GnuB needs Script-Fu Sensei

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, September 05, 2008 9:05 AM, "Rob Antonishen" 
<rob.antonishen@xxxxxxxxx> wrote
> Hia Dalton!
>
> 1) Set the control points the same as the anchor points for straight
> segments,
>
> 2) They aren't schemem pairs, it is a just a big list.  So for a three
> straight segment bezier this is an example:
>
> #( 100 100 100 100 100 100 300 199 300 199 300 199 141 250 141 250 141 
> 250 )
>
> where it is really (P1x P1y P1x P1y P1x P1y P2x P2y P2x P2y P2x P2y P3x 
> P3y
> P3x P3y P3x P3y)

It turns out this is an "array" data type, which is functionally different 
than a "list" and which was originally called a "vector" in Scheme (just to 
keep things totally confusing ;)).

> 3) The last parameter for gimp-vectors-stroke-new-from-points is the 
> closed
> Boolean.  Just set it true in your case.

I knew that. What I was asking (due to an odd experience while trying to 
draw a pentagram manually) was whether the last implied side of the polygon 
would be stroked. However, testing on the Script-Fu console showed it would.

> The best thing I found (running on windows) was to a) Open up a script-fu
> console and play with simple images/objects to see what they commands look
> like/return - I have been burned by not CARing returned layers for 
> example)
> and to b) run gimp in console mode (gimp --console-messages) so you can 
> send
> debug messages out to the console using (gimp-message "foobar")

Now this is what I meant about needing the advice of a Script-Fu Sensei; the 
first part seems perfectly obvious once you read it (but not before 
unfortunately) while the second revealed an option I didn't know existed 
(and will use once I get to that stage). Experimenting with the PDB and 
script console revealed an interesting oddity; even when a procedure returns 
only a single value, it does so as a one element list which has to be CARed 
to extract it. I think this could be important enough to be mentioned in the 
scripting documentation pages the next time they are updated. <hint />

--

Dalton "who will be asking more questions once he gets some sleep" Spence 


[Index of Archives]     [Gimp Developers]     [Gimp Users]     [Yosemite News]     [Epson Inkjet Printers]     [Scanners]     [Gimp's Home]     [Steve's Art]

&hbsp; Powered by Linux