mirror of https://github.com/GNOME/gimp.git
replaced code generated by now gone utility functions list_proc() and
2006-03-16 Michael Natterer <mitch@gimp.org> * tools/pdbgen/pdb/image.pdb: replaced code generated by now gone utility functions list_proc() and type_move() by pdbgen boilerplate code. Fixed wrapper of gimp_image_lower_channel() to actually lower the channel (it was lowering the active layer). * app/pdb/image_cmds.c * libgimp/gimpimage_pdb.[ch]: regenerated.
This commit is contained in:
parent
486d616e11
commit
7911dc16c9
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2006-03-16 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* tools/pdbgen/pdb/image.pdb: replaced code generated by now gone
|
||||
utility functions list_proc() and type_move() by pdbgen
|
||||
boilerplate code. Fixed wrapper of gimp_image_lower_channel() to
|
||||
actually lower the channel (it was lowering the active layer).
|
||||
|
||||
* app/pdb/image_cmds.c
|
||||
* libgimp/gimpimage_pdb.[ch]: regenerated.
|
||||
|
||||
2006-03-15 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* plug-ins/common/AlienMap2.c
|
||||
|
|
|
@ -223,9 +223,8 @@ image_list_invoker (Gimp *gimp,
|
|||
gint32 num_images = 0;
|
||||
gint32 *image_ids = NULL;
|
||||
|
||||
GList *list = NULL;
|
||||
GList *list = GIMP_LIST (gimp->images)->list;
|
||||
|
||||
list = GIMP_LIST (gimp->images)->list;
|
||||
num_images = g_list_length (list);
|
||||
|
||||
if (num_images)
|
||||
|
@ -547,15 +546,21 @@ image_width_invoker (Gimp *gimp,
|
|||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
GimpImage *gimage;
|
||||
gint32 width = 0;
|
||||
|
||||
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
|
||||
if (! GIMP_IS_IMAGE (gimage))
|
||||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
{
|
||||
width = gimp_image_get_width (gimage);
|
||||
}
|
||||
|
||||
return_args = procedural_db_return_args (&image_width_proc, success);
|
||||
|
||||
if (success)
|
||||
return_args[1].value.pdb_int = gimage->width;
|
||||
return_args[1].value.pdb_int = width;
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
@ -605,15 +610,21 @@ image_height_invoker (Gimp *gimp,
|
|||
gboolean success = TRUE;
|
||||
Argument *return_args;
|
||||
GimpImage *gimage;
|
||||
gint32 height = 0;
|
||||
|
||||
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
|
||||
if (! GIMP_IS_IMAGE (gimage))
|
||||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
{
|
||||
height = gimp_image_get_height (gimage);
|
||||
}
|
||||
|
||||
return_args = procedural_db_return_args (&image_height_proc, success);
|
||||
|
||||
if (success)
|
||||
return_args[1].value.pdb_int = gimage->height;
|
||||
return_args[1].value.pdb_int = height;
|
||||
|
||||
return return_args;
|
||||
}
|
||||
|
@ -1133,9 +1144,8 @@ image_get_layers_invoker (Gimp *gimp,
|
|||
|
||||
if (success)
|
||||
{
|
||||
GList *list = NULL;
|
||||
GList *list = GIMP_LIST (gimage->layers)->list;
|
||||
|
||||
list = GIMP_LIST (gimage->layers)->list;
|
||||
num_layers = g_list_length (list);
|
||||
|
||||
if (num_layers)
|
||||
|
@ -1219,9 +1229,8 @@ image_get_channels_invoker (Gimp *gimp,
|
|||
|
||||
if (success)
|
||||
{
|
||||
GList *list = NULL;
|
||||
GList *list = GIMP_LIST (gimage->channels)->list;
|
||||
|
||||
list = GIMP_LIST (gimage->channels)->list;
|
||||
num_channels = g_list_length (list);
|
||||
|
||||
if (num_channels)
|
||||
|
@ -1305,9 +1314,8 @@ image_get_vectors_invoker (Gimp *gimp,
|
|||
|
||||
if (success)
|
||||
{
|
||||
GList *list = NULL;
|
||||
GList *list = GIMP_LIST (gimage->vectors)->list;
|
||||
|
||||
list = GIMP_LIST (gimage->vectors)->list;
|
||||
num_vectors = g_list_length (list);
|
||||
|
||||
if (num_vectors)
|
||||
|
@ -1361,9 +1369,9 @@ static ProcRecord image_get_vectors_proc =
|
|||
"gimp-image-get-vectors",
|
||||
"Returns the list of vectors contained in the specified image.",
|
||||
"This procedure returns the list of vectors contained in the specified image.",
|
||||
"Spencer Kimball & Peter Mattis",
|
||||
"Spencer Kimball & Peter Mattis",
|
||||
"1995-1996",
|
||||
"Simon Budig",
|
||||
"Simon Budig",
|
||||
"2005",
|
||||
NULL,
|
||||
GIMP_INTERNAL,
|
||||
1,
|
||||
|
@ -1974,7 +1982,9 @@ image_raise_layer_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
success = gimp_image_raise_layer (gimage, layer);
|
||||
{
|
||||
success = gimp_image_raise_layer (gimage, layer);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_raise_layer_proc, success);
|
||||
}
|
||||
|
@ -2030,7 +2040,9 @@ image_lower_layer_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
success = gimp_image_lower_layer (gimage, layer);
|
||||
{
|
||||
success = gimp_image_lower_layer (gimage, layer);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_lower_layer_proc, success);
|
||||
}
|
||||
|
@ -2086,7 +2098,9 @@ image_raise_layer_to_top_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
success = gimp_image_raise_layer_to_top (gimage, layer);
|
||||
{
|
||||
success = gimp_image_raise_layer_to_top (gimage, layer);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_raise_layer_to_top_proc, success);
|
||||
}
|
||||
|
@ -2142,7 +2156,9 @@ image_lower_layer_to_bottom_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
success = gimp_image_lower_layer_to_bottom (gimage, layer);
|
||||
{
|
||||
success = gimp_image_lower_layer_to_bottom (gimage, layer);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_lower_layer_to_bottom_proc, success);
|
||||
}
|
||||
|
@ -2198,7 +2214,9 @@ image_raise_vectors_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
success = gimp_image_raise_vectors (gimage, vectors);
|
||||
{
|
||||
success = gimp_image_raise_vectors (gimage, vectors);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_raise_vectors_proc, success);
|
||||
}
|
||||
|
@ -2254,7 +2272,9 @@ image_lower_vectors_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
success = gimp_image_lower_vectors (gimage, vectors);
|
||||
{
|
||||
success = gimp_image_lower_vectors (gimage, vectors);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_lower_vectors_proc, success);
|
||||
}
|
||||
|
@ -2310,7 +2330,9 @@ image_raise_vectors_to_top_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
success = gimp_image_raise_vectors_to_top (gimage, vectors);
|
||||
{
|
||||
success = gimp_image_raise_vectors_to_top (gimage, vectors);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_raise_vectors_to_top_proc, success);
|
||||
}
|
||||
|
@ -2366,7 +2388,9 @@ image_lower_vectors_to_bottom_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
success = gimp_image_lower_vectors_to_bottom (gimage, vectors);
|
||||
{
|
||||
success = gimp_image_lower_vectors_to_bottom (gimage, vectors);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_lower_vectors_to_bottom_proc, success);
|
||||
}
|
||||
|
@ -2669,7 +2693,9 @@ image_raise_channel_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
success = gimp_image_raise_channel (gimage, channel);
|
||||
{
|
||||
success = gimp_image_raise_channel (gimage, channel);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_raise_channel_proc, success);
|
||||
}
|
||||
|
@ -2714,18 +2740,20 @@ image_lower_channel_invoker (Gimp *gimp,
|
|||
{
|
||||
gboolean success = TRUE;
|
||||
GimpImage *gimage;
|
||||
GimpLayer *layer;
|
||||
GimpChannel *channel;
|
||||
|
||||
gimage = gimp_image_get_by_ID (gimp, args[0].value.pdb_int);
|
||||
if (! GIMP_IS_IMAGE (gimage))
|
||||
success = FALSE;
|
||||
|
||||
layer = (GimpLayer *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
|
||||
if (! (GIMP_IS_LAYER (layer) && ! gimp_item_is_removed (GIMP_ITEM (layer))))
|
||||
channel = (GimpChannel *) gimp_item_get_by_ID (gimp, args[1].value.pdb_int);
|
||||
if (! (GIMP_IS_CHANNEL (channel) && ! gimp_item_is_removed (GIMP_ITEM (channel))))
|
||||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
success = gimp_image_lower_layer (gimage, layer);
|
||||
{
|
||||
success = gimp_image_lower_channel (gimage, channel);
|
||||
}
|
||||
|
||||
return procedural_db_return_args (&image_lower_channel_proc, success);
|
||||
}
|
||||
|
@ -2738,9 +2766,9 @@ static ProcArg image_lower_channel_inargs[] =
|
|||
"The image"
|
||||
},
|
||||
{
|
||||
GIMP_PDB_LAYER,
|
||||
"layer",
|
||||
"The layer to lower"
|
||||
GIMP_PDB_CHANNEL,
|
||||
"channel",
|
||||
"The channel to lower"
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -2748,8 +2776,8 @@ static ProcRecord image_lower_channel_proc =
|
|||
{
|
||||
"gimp-image-lower-channel",
|
||||
"gimp-image-lower-channel",
|
||||
"Lower the specified layer in the image's layer stack",
|
||||
"This procedure lowers the specified layer one step in the existing layer stack. It will not move the layer if there is no layer below it.",
|
||||
"Lower the specified channel in the image's channel stack",
|
||||
"This procedure lowers the specified channel one step in the existing channel stack. It will not move the channel if there is no channel below it.",
|
||||
"Spencer Kimball & Peter Mattis",
|
||||
"Spencer Kimball & Peter Mattis",
|
||||
"1995-1996",
|
||||
|
|
|
@ -1420,19 +1420,19 @@ gimp_image_raise_channel (gint32 image_ID,
|
|||
/**
|
||||
* gimp_image_lower_channel:
|
||||
* @image_ID: The image.
|
||||
* @layer_ID: The layer to lower.
|
||||
* @channel_ID: The channel to lower.
|
||||
*
|
||||
* Lower the specified layer in the image's layer stack
|
||||
* Lower the specified channel in the image's channel stack
|
||||
*
|
||||
* This procedure lowers the specified layer one step in the existing
|
||||
* layer stack. It will not move the layer if there is no layer below
|
||||
* it.
|
||||
* This procedure lowers the specified channel one step in the existing
|
||||
* channel stack. It will not move the channel if there is no channel
|
||||
* below it.
|
||||
*
|
||||
* Returns: TRUE on success.
|
||||
*/
|
||||
gboolean
|
||||
gimp_image_lower_channel (gint32 image_ID,
|
||||
gint32 layer_ID)
|
||||
gint32 channel_ID)
|
||||
{
|
||||
GimpParam *return_vals;
|
||||
gint nreturn_vals;
|
||||
|
@ -1441,7 +1441,7 @@ gimp_image_lower_channel (gint32 image_ID,
|
|||
return_vals = gimp_run_procedure ("gimp-image-lower-channel",
|
||||
&nreturn_vals,
|
||||
GIMP_PDB_IMAGE, image_ID,
|
||||
GIMP_PDB_LAYER, layer_ID,
|
||||
GIMP_PDB_CHANNEL, channel_ID,
|
||||
GIMP_PDB_END);
|
||||
|
||||
success = return_vals[0].data.d_status == GIMP_PDB_SUCCESS;
|
||||
|
|
|
@ -112,7 +112,7 @@ gboolean gimp_image_remove_vectors (gint32 ima
|
|||
gboolean gimp_image_raise_channel (gint32 image_ID,
|
||||
gint32 channel_ID);
|
||||
gboolean gimp_image_lower_channel (gint32 image_ID,
|
||||
gint32 layer_ID);
|
||||
gint32 channel_ID);
|
||||
gint32 gimp_image_flatten (gint32 image_ID);
|
||||
gint32 gimp_image_merge_visible_layers (gint32 image_ID,
|
||||
GimpMergeType merge_type);
|
||||
|
|
|
@ -17,100 +17,6 @@
|
|||
|
||||
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
|
||||
|
||||
sub layer_arg () {{
|
||||
name => 'layer',
|
||||
type => 'layer',
|
||||
desc => 'The layer'
|
||||
}}
|
||||
|
||||
sub channel_arg () {{
|
||||
name => 'channel',
|
||||
type => 'channel',
|
||||
desc => 'The channel'
|
||||
}}
|
||||
|
||||
sub vectors_arg () {{
|
||||
name => 'vectors',
|
||||
type => 'vectors',
|
||||
desc => 'The vectors object'
|
||||
}}
|
||||
|
||||
sub image_list_proc {
|
||||
my $type = shift;
|
||||
|
||||
$blurb = "Returns the list of ${type}s contained in the specified image.";
|
||||
|
||||
$help = <<HELP;
|
||||
This procedure returns the list of ${type}s contained in the specified image.
|
||||
HELP
|
||||
|
||||
&std_pdb_misc;
|
||||
|
||||
@inargs = ( &std_image_arg );
|
||||
|
||||
@outargs = (
|
||||
{ name => "${type}_ids", type => 'int32array',
|
||||
desc => "The list of ${type}s contained in the image",
|
||||
array => { name => "num_${type}s",
|
||||
desc => "The number of ${type}s contained in the image" } }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<CODE
|
||||
{
|
||||
GList *list = NULL;
|
||||
|
||||
list = GIMP_LIST (gimage->${type}s)->list;
|
||||
num_${type}s = g_list_length (list);
|
||||
|
||||
if (num_${type}s)
|
||||
{
|
||||
gint i;
|
||||
|
||||
${type}_ids = g_new (gint32, num_${type}s);
|
||||
|
||||
for (i = 0; i < num_${type}s; i++, list = g_list_next (list))
|
||||
${type}_ids[i] = gimp_item_get_ID (GIMP_ITEM (list->data));
|
||||
}
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub type_move {
|
||||
my ($type, $op, $pos) = @_;
|
||||
my $extra = "";
|
||||
|
||||
if ($op =~ /_/) {
|
||||
($op, $extra) = $op =~ /([^_]+)_(.*)/;
|
||||
$extra =~ s/_/ /g;
|
||||
}
|
||||
|
||||
$blurb = "\u$op the specified $type in the image's $type stack";
|
||||
$blurb .= " $extra of stack" if $extra;
|
||||
|
||||
$help = <<HELP;
|
||||
This procedure ${op}s the specified $type one step in the existing $type stack.
|
||||
It will not move the $type if there is no $type $pos it.
|
||||
HELP
|
||||
$help =~ s/one step in/"$extra of"/e if $extra;
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg,
|
||||
&{"${type}_arg"}
|
||||
);
|
||||
$inargs[1]->{desc} .= " to $op $extra";
|
||||
|
||||
if ($extra) {
|
||||
$extra =~ s/ /_/g;
|
||||
$extra = "_$extra";
|
||||
}
|
||||
|
||||
%invoke = (
|
||||
code => "success = gimp_image_${op}_$type$extra (gimage, $type);"
|
||||
);
|
||||
}
|
||||
|
||||
sub image_get_prop_proc {
|
||||
my ($prop, $type, $desc, $func) = @_;
|
||||
|
||||
|
@ -193,23 +99,35 @@ sub image_list {
|
|||
This procedure returns the list of images currently open in the GIMP.
|
||||
HELP
|
||||
|
||||
&image_list_proc('image');
|
||||
&std_pdb_misc;
|
||||
|
||||
undef @inargs;
|
||||
@outargs = (
|
||||
{ name => 'image_ids', type => 'int32array',
|
||||
desc => 'The list of images currently open',
|
||||
array => { name => 'num_images',
|
||||
desc => 'The number of images currently open' } }
|
||||
);
|
||||
|
||||
foreach ($blurb, $help, $outargs[0]->{desc}, $outargs[0]->{array}->{desc}) {
|
||||
s/contained.*/currently open/
|
||||
}
|
||||
|
||||
$blurb .= '.';
|
||||
$help .= ' in the GIMP.';
|
||||
|
||||
for ($invoke{code}) {
|
||||
s/gimage->images/gimp->images/;
|
||||
s/ITEM/IMAGE/;
|
||||
s/gimp_item_get_ID/gimp_image_get_ID/;
|
||||
%invoke = (
|
||||
code => <<CODE
|
||||
{
|
||||
GList *list = GIMP_LIST (gimp->images)->list;
|
||||
|
||||
num_images = g_list_length (list);
|
||||
|
||||
if (num_images)
|
||||
{
|
||||
gint i;
|
||||
|
||||
image_ids = g_new (gint32, num_images);
|
||||
|
||||
for (i = 0; i < num_images; i++, list = g_list_next (list))
|
||||
image_ids[i] = gimp_image_get_ID (GIMP_IMAGE (list->data));
|
||||
}
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_new {
|
||||
$blurb = 'Creates a new image with the specified width, height, and type.';
|
||||
|
@ -505,24 +423,129 @@ HELP
|
|||
}
|
||||
|
||||
sub image_get_layers {
|
||||
&image_list_proc('layer');
|
||||
$blurb = 'Returns the list of layers contained in the specified image.';
|
||||
|
||||
$help .= 'The order of layers is from topmost to bottommost.';
|
||||
$help = <<HELP;
|
||||
This procedure returns the list of layers contained in the specified image.
|
||||
The order of layers is from topmost to bottommost.
|
||||
HELP
|
||||
|
||||
&std_pdb_misc;
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
{ name => "layer_ids", type => 'int32array',
|
||||
desc => "The list of layers contained in the image",
|
||||
array => { name => "num_layers",
|
||||
desc => "The number of layers contained in the image" } }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
GList *list = GIMP_LIST (gimage->layers)->list;
|
||||
|
||||
num_layers = g_list_length (list);
|
||||
|
||||
if (num_layers)
|
||||
{
|
||||
gint i;
|
||||
|
||||
layer_ids = g_new (gint32, num_layers);
|
||||
|
||||
for (i = 0; i < num_layers; i++, list = g_list_next (list))
|
||||
layer_ids[i] = gimp_item_get_ID (GIMP_ITEM (list->data));
|
||||
}
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_get_channels {
|
||||
&image_list_proc('channel');
|
||||
$blurb = 'Returns the list of channels contained in the specified image.';
|
||||
|
||||
$help .= <<'HELP';
|
||||
$help = <<HELP;
|
||||
This procedure returns the list of channels contained in the specified image.
|
||||
This does not include the selection mask, or layer masks. The order is from
|
||||
topmost to bottommost.
|
||||
HELP
|
||||
|
||||
&std_pdb_misc;
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
{ name => "channel_ids", type => 'int32array',
|
||||
desc => "The list of channels contained in the image",
|
||||
array => { name => "num_channels",
|
||||
desc => "The number of channels contained in the image" } }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
GList *list = GIMP_LIST (gimage->channels)->list;
|
||||
|
||||
num_channels = g_list_length (list);
|
||||
|
||||
if (num_channels)
|
||||
{
|
||||
gint i;
|
||||
|
||||
channel_ids = g_new (gint32, num_channels);
|
||||
|
||||
for (i = 0; i < num_channels; i++, list = g_list_next (list))
|
||||
channel_ids[i] = gimp_item_get_ID (GIMP_ITEM (list->data));
|
||||
}
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_get_vectors {
|
||||
&image_list_proc('vector');
|
||||
$blurb = 'Returns the list of vectors contained in the specified image.';
|
||||
|
||||
$since = '2.4';
|
||||
$help = <<HELP;
|
||||
This procedure returns the list of vectors contained in the specified image.
|
||||
HELP
|
||||
|
||||
&simon_pdb_misc('2005', '2.4');
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
{ name => "vector_ids", type => 'int32array',
|
||||
desc => "The list of vectors contained in the image",
|
||||
array => { name => "num_vectors",
|
||||
desc => "The number of vectors contained in the image" } }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
GList *list = GIMP_LIST (gimage->vectors)->list;
|
||||
|
||||
num_vectors = g_list_length (list);
|
||||
|
||||
if (num_vectors)
|
||||
{
|
||||
gint i;
|
||||
|
||||
vector_ids = g_new (gint32, num_vectors);
|
||||
|
||||
for (i = 0; i < num_vectors; i++, list = g_list_next (list))
|
||||
vector_ids[i] = gimp_item_get_ID (GIMP_ITEM (list->data));
|
||||
}
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_unset_active_channel {
|
||||
|
@ -628,11 +651,13 @@ HELP
|
|||
|
||||
&std_pdb_misc;
|
||||
|
||||
@inargs = ( &std_image_arg );
|
||||
foreach (qw(x y)) {
|
||||
push @inargs, { name => $_, type => 'int32',
|
||||
desc => "The $_ coordinate for the pick" }
|
||||
}
|
||||
@inargs = (
|
||||
&std_image_arg,
|
||||
{ name => 'x', type => 'int32',
|
||||
desc => 'The x coordinate for the pick' },
|
||||
{ name => 'y', type => 'int32',
|
||||
desc => 'The y coordinate for the pick' }
|
||||
);
|
||||
|
||||
@outargs = (
|
||||
{ name => 'layer', type => 'layer',
|
||||
|
@ -645,25 +670,109 @@ HELP
|
|||
}
|
||||
|
||||
sub image_raise_layer {
|
||||
&type_move('layer', 'raise', 'above');
|
||||
$blurb = "Raise the specified layer in the image's layer stack";
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure raises the specified layer one step in the existing layer stack.
|
||||
It will not move the layer if there is no layer above it.
|
||||
HELP
|
||||
|
||||
&std_pdb_misc;
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg,
|
||||
{ name => 'layer', type => 'layer',
|
||||
desc => 'The layer to raise' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
success = gimp_image_raise_layer (gimage, layer);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_lower_layer {
|
||||
&type_move('layer', 'lower', 'below');
|
||||
$blurb = "Lower the specified layer in the image's layer stack";
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure lowers the specified layer one step in the existing layer stack.
|
||||
It will not move the layer if there is no layer below it.
|
||||
HELP
|
||||
|
||||
&std_pdb_misc;
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg,
|
||||
{ name => 'layer', type => 'layer',
|
||||
desc => 'The layer to lower' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
success = gimp_image_lower_layer (gimage, layer);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_raise_layer_to_top {
|
||||
&type_move('layer', 'raise_to_top', 'above');
|
||||
$blurb = <<'BLURB';
|
||||
Raise the specified layer in the image's layer stack to top of stack
|
||||
BLURB
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure raises the specified layer to top of the existing layer stack.
|
||||
It will not move the layer if there is no layer above it.
|
||||
HELP
|
||||
|
||||
&wolfgang_pdb_misc('1998');
|
||||
$author .= ", Sven Neumann";
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg,
|
||||
{ name => 'layer', type => 'layer',
|
||||
desc => 'The layer to raise to top' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
success = gimp_image_raise_layer_to_top (gimage, layer);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_lower_layer_to_bottom {
|
||||
&type_move('layer', 'lower_to_bottom', 'below');
|
||||
$blurb = <<'BLURB';
|
||||
Lower the specified layer in the image's layer stack to bottom of stack
|
||||
BLURB
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure lowers the specified layer to bottom of the existing layer stack.
|
||||
It will not move the layer if there is no layer below it.
|
||||
HELP
|
||||
|
||||
&wolfgang_pdb_misc('1998');
|
||||
$author .= ", Sven Neumann";
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg,
|
||||
{ name => 'layer', type => 'layer',
|
||||
desc => 'The layer to lower to bottom' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
success = gimp_image_lower_layer_to_bottom (gimage, layer);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_merge_visible_layers {
|
||||
|
@ -862,13 +971,55 @@ sub image_remove_layer_mask {
|
|||
}
|
||||
|
||||
sub image_raise_channel {
|
||||
&type_move('channel', 'raise', 'above');
|
||||
$blurb = "Raise the specified channel in the image's channel stack";
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure raises the specified channel one step in the existing
|
||||
channel stack. It will not move the channel if there is no channel
|
||||
above it.
|
||||
HELP
|
||||
|
||||
&std_pdb_misc;
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg,
|
||||
{ name => 'channel', type => 'channel',
|
||||
desc => 'The channel to raise' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
success = gimp_image_raise_channel (gimage, channel);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_lower_channel {
|
||||
&type_move('layer', 'lower', 'below');
|
||||
$blurb = "Lower the specified channel in the image's channel stack";
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure lowers the specified channel one step in the existing
|
||||
channel stack. It will not move the channel if there is no channel
|
||||
below it.
|
||||
HELP
|
||||
|
||||
&std_pdb_misc;
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg,
|
||||
{ name => 'channel', type => 'channel',
|
||||
desc => 'The channel to lower' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
success = gimp_image_lower_channel (gimage, channel);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_add_channel {
|
||||
|
@ -967,23 +1118,111 @@ HELP
|
|||
}
|
||||
|
||||
sub image_raise_vectors {
|
||||
&type_move('vectors', 'raise', 'above');
|
||||
$blurb = "Raise the specified vectors in the image's vectors stack";
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure raises the specified vectors one step in the existing
|
||||
vectors stack. It will not move the vectors if there is no vectors
|
||||
above it.
|
||||
HELP
|
||||
|
||||
&simon_pdb_misc('2005', '2.4');
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg,
|
||||
{ name => 'vectors', type => 'vectors',
|
||||
desc => 'The vectors object to raise' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
success = gimp_image_raise_vectors (gimage, vectors);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_lower_vectors {
|
||||
&type_move('vectors', 'lower', 'below');
|
||||
$blurb = "Lower the specified vectors in the image's vectors stack";
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure lowers the specified vectors one step in the existing
|
||||
vectors stack. It will not move the vectors if there is no vectors
|
||||
below it.
|
||||
HELP
|
||||
|
||||
&simon_pdb_misc('2005', '2.4');
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg,
|
||||
{ name => 'vectors', type => 'vectors',
|
||||
desc => 'The vectors object to lower' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
success = gimp_image_lower_vectors (gimage, vectors);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_raise_vectors_to_top {
|
||||
&type_move('vectors', 'raise_to_top', 'above');
|
||||
$blurb = <<'BLURB';
|
||||
Raise the specified vectors in the image's vectors stack to top of stack
|
||||
BLURB
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure raises the specified vectors to top of the existing
|
||||
vectors stack. It will not move the vectors if there is no vectors
|
||||
above it.
|
||||
HELP
|
||||
|
||||
&simon_pdb_misc('2005', '2.4');
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg,
|
||||
{ name => 'vectors', type => 'vectors',
|
||||
desc => 'The vectors object to raise to top' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
success = gimp_image_raise_vectors_to_top (gimage, vectors);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_lower_vectors_to_bottom {
|
||||
&type_move('vectors', 'lower_to_bottom', 'below');
|
||||
$blurb = <<'BLURB';
|
||||
Lower the specified vectors in the image's vectors stack to bottom of stack
|
||||
BLURB
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure lowers the specified vectors to bottom of the existing
|
||||
vectors stack. It will not move the vectors if there is no vectors
|
||||
below it.
|
||||
HELP
|
||||
|
||||
&simon_pdb_misc('2005', '2.4');
|
||||
|
||||
@inargs = (
|
||||
&std_image_arg,
|
||||
{ name => 'vectors', type => 'vectors',
|
||||
desc => 'The vectors object to lower to bottom' }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
success = gimp_image_lower_vectors_to_bottom (gimage, vectors);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
sub image_get_active_drawable {
|
||||
|
@ -1186,27 +1425,56 @@ CODE
|
|||
);
|
||||
}
|
||||
|
||||
foreach (qw(width height)) {
|
||||
eval <<SUB;
|
||||
sub image_$_ {
|
||||
\$blurb = 'Return the $_ of the image';
|
||||
sub image_width {
|
||||
$blurb = 'Return the width of the image';
|
||||
|
||||
\$help = <<'HELP';
|
||||
This procedure returns the image's $_. This value is independent of any of
|
||||
the layers in this image. This is the "canvas" $_.
|
||||
$help = <<'HELP';
|
||||
This procedure returns the image's width. This value is independent of any of
|
||||
the layers in this image. This is the "canvas" width.
|
||||
HELP
|
||||
|
||||
\&std_pdb_misc;
|
||||
&std_pdb_misc;
|
||||
|
||||
\@inargs = ( \&std_image_arg );
|
||||
@inargs = ( &std_image_arg );
|
||||
|
||||
\@outargs = (
|
||||
{ name => '$_', type => 'int32',
|
||||
desc => "The image's $_",
|
||||
alias => 'gimage->$_', no_declare => 1 }
|
||||
@outargs = (
|
||||
{ name => 'width', type => 'int32',
|
||||
desc => "The image's width" }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
width = gimp_image_get_width (gimage);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
SUB
|
||||
|
||||
sub image_height {
|
||||
$blurb = 'Return the height of the image';
|
||||
|
||||
$help = <<'HELP';
|
||||
This procedure returns the image's height. This value is independent of any of
|
||||
the layers in this image. This is the "canvas" height.
|
||||
HELP
|
||||
|
||||
&std_pdb_misc;
|
||||
|
||||
@inargs = ( &std_image_arg );
|
||||
|
||||
@outargs = (
|
||||
{ name => 'height', type => 'int32',
|
||||
desc => "The image's height" }
|
||||
);
|
||||
|
||||
%invoke = (
|
||||
code => <<'CODE'
|
||||
{
|
||||
height = gimp_image_get_height (gimage);
|
||||
}
|
||||
CODE
|
||||
);
|
||||
}
|
||||
|
||||
&image_accessors('active_layer', 'layer', 'active layer', 1,
|
||||
|
|
Loading…
Reference in New Issue