mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 04:22:29 +00:00
see plug-ins/perl/Changes
This commit is contained in:
parent
12976d24f4
commit
043920cf9a
|
@ -727,7 +727,7 @@ The return code should be immediately handed out to exit:
|
|||
|
||||
Before the call to C<Gimp::main>, I<no> other PDB function must be called.
|
||||
|
||||
In a Gimp::Fu-script, you should call C<Gimp::Fu::main> instead:
|
||||
In a C<Gimp::Fu>-script, you should call C<Gimp::Fu::main> instead:
|
||||
|
||||
exit main; # Gimp::Fu::main is exported by default as well.
|
||||
|
||||
|
@ -787,12 +787,12 @@ There are two different flavours of gimp-functions. Functions from the
|
|||
B<PDB> (the Procedural DataBase), and functions from B<libgimp> (the
|
||||
C-language interface library).
|
||||
|
||||
You can get a listing and description of every PDB function by starting the
|
||||
B<DB Browser> extension in the Gimp-B<Xtns> menu (but remember that B<DB
|
||||
Browser> is buggy and displays "_" (underscores) as "-" (dashes), so you
|
||||
can't see the difference between gimp_quit and gimp-quit. As a rule of
|
||||
thumb, B<Script-Fu> registers scripts with dashes, and everything else uses
|
||||
underscores).
|
||||
You can get a listing and description of every PDB function by starting
|
||||
the B<DB Browser> extension in the Gimp-B<Xtns> menu (but remember that
|
||||
B<DB Browser> is buggy and displays "_" (underscores) as "-" (dashes), so
|
||||
you can't see the difference between gimp_quit and gimp-quit. As a rule
|
||||
of thumb, B<Script-Fu> in gimp versions before 1.2 registers scripts with
|
||||
dashes, and everything else uses underscores).
|
||||
|
||||
B<libgimp> functions can't be traced (and won't be traceable in the
|
||||
foreseeable future).
|
||||
|
@ -818,11 +818,12 @@ syntax, so its actually shorter to write.
|
|||
perl book and learn perl! Anyway, newer perls understand a nice syntax (see
|
||||
also the description for C<gimp_call_procedure>):
|
||||
|
||||
"plug-in-the-egg"->(RUN_INTERACTIVE,$image,$drawable);
|
||||
"Gimp::plug-in-the-egg"->(RUN_INTERACTIVE,$image,$drawable);
|
||||
|
||||
Very old perls may need:
|
||||
You can drop the C<Gimp::> when using the C<:auto>-import-tag. Very
|
||||
(very!) old perls may need:
|
||||
|
||||
&{"plug-in-the-egg"}(RUN_INTERACTIVE,$image,$drawable);
|
||||
&{"Gimp::plug-in-the-egg"}("Gimp",RUN_INTERACTIVE,$image,$drawable);
|
||||
|
||||
(unfortunately. the plug-in in this example is actually called
|
||||
"plug_in_the_egg" *sigh*)
|
||||
|
|
|
@ -76,9 +76,7 @@ sub DESTROY {
|
|||
# dummy function, very necessary
|
||||
}
|
||||
|
||||
sub new {
|
||||
Gtk::Object::new @_;
|
||||
}
|
||||
*new = \&Gtk::Object::new;
|
||||
|
||||
sub import {
|
||||
my $self = shift;
|
||||
|
|
|
@ -107,6 +107,12 @@ my %type2str = (
|
|||
&PARAM_INT32ARRAY => 'INT32ARRAY',
|
||||
);
|
||||
|
||||
sub setheight {
|
||||
my($w,$y)=@_;
|
||||
$w->set_usize(-1, ($w->style->font->ascent + $w->style->font->descent) * $y);
|
||||
|
||||
}
|
||||
|
||||
sub new_cinfo {
|
||||
$cinfo->freeze;
|
||||
$cinfo->clear;
|
||||
|
@ -326,6 +332,7 @@ sub inputline {
|
|||
$inputline=$e;
|
||||
|
||||
my $c = new Gtk::CList(1);
|
||||
setheight $c, 6;
|
||||
$clist = $c;
|
||||
$c->set_selection_mode(-extended);
|
||||
$c->signal_connect("select_row", sub {
|
||||
|
@ -469,7 +476,7 @@ sub create_main {
|
|||
$cinfo->set_column_auto_resize (1,1);
|
||||
$cinfo->set_column_auto_resize (2,1);
|
||||
$cinfo->set_selection_mode('single');
|
||||
#$cinfo->set_usize(0, $ey*4);
|
||||
setheight $cinfo, 8;
|
||||
$sw->add ($cinfo);
|
||||
$f2->pack_start ($sw,1,1,5);
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ register "plug_in_ditherize",
|
|||
my($image,$drawable,$dither,$colours)=@_;
|
||||
|
||||
Gimp::set_trace(-1);
|
||||
"Gimp::script-fu-add-bevel"->($drawable, 55, 0, 0);
|
||||
|
||||
$drawable->is_layer or die "this plug-in only works for layers";
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ register "layer_apply",
|
|||
"Marc Lehmann <pcg\@goof.com>",
|
||||
"Marc Lehmann <pcg\@goof.com>",
|
||||
"19990708",
|
||||
N_"<Image>/Filters/Animation/Apply Perl Expression",
|
||||
N_"<Image>/Filters/Apply Perl Expression...",
|
||||
"*",
|
||||
[
|
||||
[PF_TEXT, "expr", "the perl expression to run for each layer",
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
# in a directory more suitable than the lame "Misc"
|
||||
# Here's the boring start of every script...
|
||||
|
||||
use Gimp;
|
||||
use Gimp qw(:auto __ N_);
|
||||
use Gimp::Fu;
|
||||
|
||||
register "xach_blocks",
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#
|
||||
# Here's the boring start of every script...
|
||||
|
||||
use Gimp;
|
||||
use Gimp qw(:auto __ N_);
|
||||
use Gimp::Fu;
|
||||
|
||||
register "xach_shadows",
|
||||
|
@ -70,7 +70,7 @@ register "xach_shadows",
|
|||
gimp_edit_clear($gridlayer);
|
||||
gimp_palette_set_background([255,255,255]);
|
||||
gimp_edit_fill($gridlayer);
|
||||
$gridlayer->plug_in_grid($blocksize, $blocksize, 0, 0);
|
||||
$gridlayer->plug_in_grid((1, $blocksize, 0, "black", 0) x 3);
|
||||
|
||||
gimp_layer_set_mode($gridlayer, 3);
|
||||
# Clean up stuff
|
||||
|
|
Loading…
Reference in a new issue