1
# The GIMP -- an image manipulation program
1
# GIMP - The GNU Image Manipulation Program
2
2
# Copyright (C) 1995 Spencer Kimball and Peter Mattis
4
4
# This program is free software; you can redistribute it and/or modify
18
18
# "Perlized" from C source by Manish Singh <yosh@gimp.org>
22
{ name => 'floating_sel', type => 'layer',
23
desc => 'The floating selection' }
28
my @subname = split /::/, (caller 1)[3];
29
my $cmd = pop @subname;
31
headers => [ qw("core/gimplayer-floating-sel.h") ],
34
if (gimp_layer_is_floating_sel (floating_sel))
43
20
sub floating_sel_remove {
44
21
$blurb = <<'BLURB';
45
22
Remove the specified floating selection from its associated drawable.
33
{ name => 'floating_sel', type => 'layer',
34
desc => 'The floating selection' }
40
if (gimp_layer_is_floating_sel (floating_sel))
41
floating_sel_remove (floating_sel);
58
49
sub floating_sel_anchor {
63
{ name => 'floating_sel', type => 'layer',
64
desc => 'The floating selection' }
70
if (gimp_layer_is_floating_sel (floating_sel))
71
floating_sel_anchor (floating_sel);
74
79
sub floating_sel_to_layer {
95
{ name => 'floating_sel', type => 'layer',
96
desc => 'The floating selection' }
102
if (gimp_layer_is_floating_sel (floating_sel))
103
floating_sel_to_layer (floating_sel);
92
111
sub floating_sel_attach {
111
headers => [ qw("core/gimplayer-floating-sel.h") ],
114
success = gimp_item_is_attached (GIMP_ITEM (drawable));
132
if (gimp_item_is_attached (GIMP_ITEM (drawable)))
117
133
floating_sel_attach (layer, drawable);
123
141
sub floating_sel_rigor {
124
142
$blurb = 'Rigor the floating selection.';
127
This procedure rigors the floating selection.
143
$help = 'This procedure rigors the floating selection.';
133
push @inargs, { name => 'undo', type => 'boolean', desc => '%%desc%%' };
148
{ name => 'floating_sel', type => 'layer',
149
desc => 'The floating selection' },
150
{ name => 'undo', type => 'boolean' }
136
$invoke{code} =~ s/\(floating_sel\);/(floating_sel, undo);/;
156
if (gimp_layer_is_floating_sel (floating_sel))
157
floating_sel_rigor (floating_sel, undo);
139
165
sub floating_sel_relax {
140
166
$blurb = 'Relax the floating selection.';
143
This procedure relaxes the floating selection.
167
$help = 'This procedure relaxes the floating selection.';
149
push @inargs, { name => 'undo', type => 'boolean', desc => '%%desc%%' };
152
$invoke{code} =~ s/\(floating_sel\);/(floating_sel, undo);/;
172
{ name => 'floating_sel', type => 'layer',
173
desc => 'The floating selection' },
174
{ name => 'undo', type => 'boolean' }
180
if (gimp_layer_is_floating_sel (floating_sel))
181
floating_sel_relax (floating_sel, undo);
190
@headers = qw("core/gimplayer-floating-sel.h");
155
192
@procs = qw(floating_sel_remove floating_sel_anchor floating_sel_to_layer
156
193
floating_sel_attach floating_sel_rigor floating_sel_relax);
157
195
%exports = (app => [@procs], lib => [@procs]);
159
197
$desc = 'Floating selections';