Gimp/plug-ins/perl/examples/guide_remove

46 lines
978 B
Text
Raw Normal View History

1999-08-01 14:25:31 -07:00
#!/usr/bin/perl
#
# 11/7/99 <brendy@swipnet.se>
# Guides are pretty good, but I want to be able to remove them.
#
use Gimp;
use Gimp::Fu;
use Gimp::Util;
# Gimp::set_trace(TRACE_ALL);
register "guide_remove",
"guideremove - erases all existing guides\n",
"Just does it!\n",
"Brendon Humphrey",
"Brendon Humphrey <brendy\@swipnet.se>",
"1999-07-20",
1999-11-29 13:46:18 -08:00
N_"<Image>/Guides/Remove Guides",
1999-08-01 14:25:31 -07:00
"*",
[],
[],
['gimp-1.1'],
sub {
my($img,$layer,$xspace, $yspace, $xoffset, $yoffset) =@_;
#
# Remove all existing guides
#
$i=$img->find_next_guide(0);
while ($i != 0) {
$img->delete_guide($i);
1999-11-08 09:39:13 -08:00
$i=$img->find_next_guide(0);
1999-08-01 14:25:31 -07:00
}
#
# Refresh the display (probably not good, works for me!)
#
1999-11-08 09:39:13 -08:00
$img->selection_all();
$img->selection_none();
1999-08-01 14:25:31 -07:00
1999-11-08 09:39:13 -08:00
return();
1999-08-01 14:25:31 -07:00
};
exit main;