tools/pdbgen/pdb/display.pdb applied a modified version of a patch from
2002-12-03 Sven Neumann <sven@gimp.org> * tools/pdbgen/pdb/display.pdb * tools/pdbgen/pdb/layer.pdb: applied a modified version of a patch from Wolfgang Hofer <hof@gimp.org> that adds two new PDB functions needed for GAP: gimp_displays_reconnect() and gimp_layer_new_from_drawable() (bug #77508). * app/pdb/display_cmds.c * app/pdb/internal_procs.c * app/pdb/layer_cmds.c * libgimp/gimpdisplay_pdb.[ch] * libgimp/gimplayer_pdb.[ch]: regenerated.
This commit is contained in:
committed by
Sven Neumann
parent
1c60f4e045
commit
2193d83a26
@ -86,10 +86,35 @@ HELP
|
||||
%invoke = ( code => 'gimp_displays_flush (gimp);' );
|
||||
}
|
||||
|
||||
|
||||
sub displays_reconnect {
|
||||
$blurb = 'Reconnect displays from one image to another image.';
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure connects all displays of the old_image to the new_image.
|
||||
If the new_image already has a display the reconnect is not performed and the
|
||||
procedure returns without success. You should rarely need to use this
|
||||
function.
|
||||
HELP
|
||||
|
||||
&std_pdb_misc;
|
||||
|
||||
@inargs = (
|
||||
{ name => 'old_image', type => 'image',
|
||||
desc => 'The old image (should have at least one display)',
|
||||
alias => 'gimage_old' },
|
||||
{ name => 'new_image', type => 'image',
|
||||
desc => 'The new image (must not have a display)',
|
||||
alias => 'gimage_new' }
|
||||
);
|
||||
|
||||
%invoke = ( code => 'gdisplays_reconnect(gimage_old, gimage_new);' );
|
||||
}
|
||||
|
||||
@headers = qw("core/gimp.h" "display/display-types.h" "display/gimpdisplay.h"
|
||||
"display/gimpdisplay-foreach.h");
|
||||
|
||||
@procs = qw(display_new display_delete displays_flush);
|
||||
@procs = qw(display_new display_delete displays_flush displays_reconnect);
|
||||
%exports = (app => [@procs], lib => [@procs]);
|
||||
|
||||
$desc = 'GimpDisplay procedures';
|
||||
|
||||
@ -490,6 +490,39 @@ HELP
|
||||
);
|
||||
}
|
||||
|
||||
sub layer_new_from_drawable {
|
||||
$blurb = 'Create a new layer by copying an existing drawable.';
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure creates a new layer as a copy of the specified drawable. The
|
||||
new layer still needs to be added to the image, as this is not automatic. Add
|
||||
the new layer with the 'gimp_image_add_layer' command. Other attributes such
|
||||
as layer mask modes, and offsets should be set with explicit procedure calls.
|
||||
HELP
|
||||
|
||||
&std_pdb_misc;
|
||||
|
||||
@inargs = (
|
||||
{ name => 'drawable', type => 'drawable',
|
||||
desc => 'The source drawable from where the new layer is copied',
|
||||
alias => 'drawable' },
|
||||
{ name => 'dest_image', type => 'image',
|
||||
desc => 'The destination image to which to add the layer',
|
||||
alias => 'gimage' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
{ name => 'layer_copy', type => 'layer', init => 1,
|
||||
desc => 'The newly copied layer', alias => 'copy' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => 'success = (copy = gimp_layer_new_from_drawable (drawable,
|
||||
gimage)) != NULL;'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
&layer_accessors('name', 'string', 'name', 1, 0, undef,
|
||||
'object', 'GIMP_OBJECT (layer)');
|
||||
|
||||
@ -574,7 +607,8 @@ CODE
|
||||
|
||||
unshift @procs, qw(layer_new layer_copy layer_create_mask layer_scale
|
||||
layer_resize layer_delete layer_translate layer_add_alpha
|
||||
layer_set_offsets layer_mask layer_is_floating_sel);
|
||||
layer_set_offsets layer_mask layer_is_floating_sel
|
||||
layer_new_from_drawable);
|
||||
%exports = (app => [@procs], lib => [@procs]);
|
||||
|
||||
$desc = 'Layer';
|
||||
|
||||
Reference in New Issue
Block a user