Claus,

Thank you for responding.
> you could write a Script-Fu to do that.

Writing scripts looks kind of hard, as I'm not a programmer or coder by 
nature. But I'm game to try. So I read some of the pages you suggested, 
and also looked up a little info on the web.

I've worked out some of the commands I think I need from the "Procedure 
Browser", and then I looked at some other script files already installed 
on my machine to try and get some sense of the syntax. My first draft of 
the script is at the end of this message.

I'm confused on two points.

One is that the names of the procedures in the "Procedure Browser" don't 
seem to follow the same format as they do in the scripts in my scripts 
directory. In the scripts directory, they use dashes, "-" in their 
names, like "gimp-path-to-selection". But in the "Procedure Browser", 
they all use underscores, "_", like "gimp_path_to_selection". What 
should I be using?

The other is that the parameters often list as their first option to 
specify the image. For example, "gimp_path_to_selection", has this at 
the top of its list of parameters:
image        IMAGE        the image

Since I don't intend to be using this script at the command line, and 
will be using it on an image that I will have open in the GIMP GUI, do I 
need to specify this? Or do I need to use some kind of variable that 
specifies the currently active image?

Here is my first draft. If someone could help me make the syntax 
correct, then I think I could use it as a model for continuing to create 
my own scripts.

----- colour_flat.scm____

; Create anti-aliased colour flats from a path.

(define (colour_flat))

; Convert the path to a selection.
(gimp_path_to_selection)

; Sharpen the selection to ensure it is not anti-aliased.
(gimp_selection_sharpen)

; Fill the selected area with the current foreground colour.
(gimp_edit_fill (GIMP_FOREGROUND_FILL (0)))

; Deselect the currently selected area.
(gimp_selection_none)

; Remove the path.
(gimp_path_delete)

-----file ends-----

Thank you for any assistance or advice.

-- 
Dave M G
Ubuntu 6.10 Edgy Eft
Kernel 2.6.17.7
Pentium D Dual Core Processor
PHP 5, MySQL 5, Apache 2
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply via email to