see plug-ins/perl/Changes

This commit is contained in:
Marc Lehmann
1999-03-08 20:05:08 +00:00
parent 28a4c66e32
commit 872e522891
4 changed files with 29 additions and 3 deletions

View File

@ -46,7 +46,7 @@ require Exporter;
);
#@EXPORT_OK = qw();
$VERSION=1.1;
$VERSION=1.101;
use Gimp;
@ -256,6 +256,10 @@ mark the given layers visible (invisible) and all others invisible (visible).
return the position the layer has in the image layer stack.
=item C<gimp_layer_set_position $layer,$new_index>
moves the layer to a new position in the layer stack.
=cut
sub gimp_image_layertype {
my $type = $_[0]->base_type;
@ -300,6 +304,20 @@ sub gimp_layer_get_position {
();
}
sub gimp_layer_set_position {
my($layer,$new_pos)=@_;
$pos=$layer->get_position;
$layer->add_alpha;
while($pos>$new_pos) {
$layer->lower_layer;
$pos--;
}
while($pos<$new_pos) {
$layer->raise_layer;
$pos++;
}
}
=pod
=back