#!/usr/bin/perl -w

use Gimp;
use Gimp::Fu;
# Gimp::set_trace(TRACE_ALL);

# 7/15/03: <sjburges@gimp.org>
# * s/Layers/Layer/ in registration
# * remove layer_to_image_size, since its in core now
#
# These are a couple of one-liners that you might find handy.  Both should
# be undoable w/o any special magick, and work with any gimp.

register "center_layer", "Center Layer",
         "Centers the current layer on the image",
         "Seth Burgess", "Seth Burgess <sjburges\@gimp.org>",
         "1.0", N_"<Image>/Layer/Center Layer", "*", [], sub {
	($img, $layer) = @_;
	$layer->Gimp::Layer::set_offsets(($img->width  - $layer->width )/2,
                        ($img->height - $layer->height)/2);
	return();
};

exit main;

=head1 LICENSE

Copyright Seth Burgess.
Distributed under the same terms as Gimp-Perl.

=cut
