What should I change in Script-Fu scripts?

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

 



Yesterday evening, I started to edit the Script-Fu scripts so that
they fill with the foreground color instead of the background color.
There are 215 calls to gimp-edit-fill in the scripts delivered with
Gimp 1.1.17, and most of them are preceded by a call to
gimp-palette-set-background, which can easily be replaced by
gimp-palette-set-foreground in order to get the correct behavior.

However, I found a couple of logo scripts that are filling the
selection without setting the color first; they take the background
color that is currently in use when the script is run.  You can see
this effect with the "Bovination" and "Comic Book" script, for
example: set the background color to pink or something easily visible,
then run the scripts and look at the results.

There are several ways to fix these scripts, and I would like to get
your opinions about this:

A1) Do not change anything in these calls to gimp-edit-fill, which
    means that these scripts would now create a background layer
    that is filled with the current foreground color.
A2) Keep the current behavior by adding something like
    (gimp-palette-set-foreground (car (gimp-palette-get-background)))
    before filling the layer, or by changing the layer creation mode
    so that it is directly created with the current background color
    instead of being created transparent and then filled later.
A3) Add a new parameter ("background color") to the script so that it
    uses the value specified in the dialog box instead of using the
    current colors.

I think that the last solution is the best one, but of course it
changes the interface.

And if I am changing the interface, there is another thing that might
be worth changing in the logo scripts: should they flatten the final
image or not?  Some scripts silently flatten (parts of) the final
image, some others provide this as an option (a "flatten image?" check
box), and some others always leave all layers in the final image.  I
would like to make them a bit more consistent.  Again, there are
several options:

B1) Leave the scripts as they are now, even if there are some
    inconsistencies.
B2) Add a "flatten image?" option in all scripts, with the default
    value set to TRUE.
B3) Add a "flatten image?" option in all scripts, with the default
    value set to FALSE.
B4) Remove all calls to gimp-image-flatten as well as the option to
    flatten the image in the scripts that already have it, because it
    is not so important to have this option anymore.  In previous
    versions of the Gimp, it was useful for the scripts to flatten the
    image so that the users would not have to remember to do it (and
    risk loosing part of their work) before saving the result as a GIF
    or JPEG image.  But the current version will automatically ask if
    the image has to be flattened before saving it, so the risk of
    saving the wrong layer and loosing some data is greatly reduced.
    So maybe we could remove the flatten option from the scripts?

There are some other inconsistencies in the logo scripts: they use
different values for the default text string to be used in the logo.
Ten of them use "The GIMP" or "The Gimp" as the default text; five of
them use "Hello world!" some of them use some text related to the name
or function of the script (e.g. "Alien Glow" uses "ALIEN", "Carved"
uses "Marble") and the others use something unrelated to the name of
the script (e.g. "Comic Book" and "Gradient Bevel" use "Moo").  If I
have to change all scrips anyway, maybe I could make them more
consistent?  Time for another opinion poll...

C1) Leave all scripts as they are.  Diversity is fun.  Besides, who
    am I to decide what the default text should be?  Each author has
    the right to decide what is best.
C2) Change all logo scripts to use "The Gimp" as the default text (or
    only "GIMP" for those such as "Alien Glow" that look better in all
    caps).
C3) Change all scripts to use their name (or a part of it) as the
    default text.
C4) Change all scripts to use "Moo!".
C5) Or maybe "SCRIPT-FU" as in the "Basic II" script?

And finally, some scripts such as "Carved" or "Textured" are using a
background texture that cannot be easily extended if the logo has to
be integrated in a larger image.  So you have to take the background
as it is, or do a lot of hand-editing if you want the background
texture to cover a larger area.  Although this is a new feature, I was
thinking about adding a "padding" option to some of these scripts.
This would allow you to specify some extra padding around the text, so
that you could have a larger background if necessary.  Do you think
that I should:

D1) Forget this idea and leave the scripts as they are.
D2) Add a "padding" parameter to these scripts, so that it is possible
    to specify a number of padding pixels around the text.

I would like to get the opinions of other developers about these
options.  If you have something to say about this, please post it
either in concise form (just the numbers) or in a more verbose message
if you have some other comments to add.

My personal opinion would be: A3 B2 C2 D2.

-Raphael

P.S.: Hmmm...  I think that I spent more time writing this message than
      I would have spent making these changes to the code without
      asking...



[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux