Commit d9e7cd8b authored by Manish Singh's avatar Manish Singh
Browse files

Lossa stuff

-Yosh
parent 9e1879d9
......@@ -13,7 +13,8 @@ enum_headers = \
../../app/channel.h \
../../app/eraser.h \
../../app/paint_core.h \
../../app/lut_funcs.h
../../app/lut_funcs.h \
../../app/shear_tool.h
enums.pl: enumgen.pl $(enum_headers)
cd $(srcdir) \
......
......@@ -70,6 +70,16 @@ sub make_arg_test {
if ($yes || $no) {
&$reverse(\$test) if $yes;
if (exists $arg->{cond}) {
my $cond = "";
foreach (@{$arg->{cond}}) {
$cond .= '!' if $yes;
$cond .= /\W/ ? "($_)" : $_;
$cond .= $yes ? ' !! ' : ' && ';
}
$test = "$cond($test)";
}
$result = ' ' x 2 . "if ($test)\n";
$result .= &format_code_frag($arg->{on_success}, 1) if $yes;
......@@ -169,7 +179,11 @@ sub make_arg_recs {
}
$info =~ s/$nick \(.*?\)(, )?//
}
$info =~ s/, $//; last };
$info =~ s/, $//;
if (!$#{[$info =~ /,/g]} &&
$desc !~ /{ %%desc%% }/) {
$info =~ s/,/ or/
} last };
}
$desc =~ s/%%desc%%/$info/eg;
......
......@@ -193,21 +193,21 @@ package Gimp::CodeGen::enums;
},
GradientType =>
{ contig => 1,
symbols => [ qw(Linear BiLinear Radial Square ConicalSymmetric
ConicalAsymmetric ShapeburstAngular
ShapeburstSpherical ShapeburstDimpled
SpiralClockwise SpiralAntiClockwise) ],
mapping => { Linear => '0',
BiLinear => '1',
Radial => '2',
Square => '3',
ConicalSymmetric => '4',
ConicalAsymmetric => '5',
ShapeburstAngular => '6',
ShapeburstSpherical => '7',
ShapeburstDimpled => '8',
SpiralClockwise => '9',
SpiralAntiClockwise => '10' }
symbols => [ qw(LINEAR BILINEAR RADIAL SQUARE CONICAL_SYMMETRIC
CONICAL_ASYMMETRIC SHAPEBURST_ANGULAR
SHAPEBURST_SPHERICAL SHAPEBURST_DIMPLED
SPIRAL_CLOCKWISE SPIRAL_ANTICLOCKWISE) ],
mapping => { LINEAR => '0',
BILINEAR => '1',
RADIAL => '2',
SQUARE => '3',
CONICAL_SYMMETRIC => '4',
CONICAL_ASYMMETRIC => '5',
SHAPEBURST_ANGULAR => '6',
SHAPEBURST_SPHERICAL => '7',
SHAPEBURST_DIMPLED => '8',
SPIRAL_CLOCKWISE => '9',
SPIRAL_ANTICLOCKWISE => '10' }
},
BlendMode =>
{ contig => 1,
......@@ -216,7 +216,11 @@ package Gimp::CodeGen::enums;
mapping => { FG_BG_RGB_MODE => '0',
FG_BG_HSV_MODE => '1',
FG_TRANS_MODE => '2',
CUSTOM_MODE => '3' }
CUSTOM_MODE => '3' },
nicks => { FG_BG_RGB_MODE => 'FG_BG_RGB',
FG_BG_HSV_MODE => 'FG_BG_HSV',
FG_TRANS_MODE => 'FG_TRANS',
CUSTOM_MODE => 'CUSTOM' }
},
RepeatMode =>
{ contig => 1,
......@@ -225,25 +229,28 @@ package Gimp::CodeGen::enums;
REPEAT_SAWTOOTH => '1',
REPEAT_TRIANGULAR => '2' }
},
FillMode =>
BucketFillMode =>
{ contig => 1,
symbols => [ qw(FgColorFill BgColorFill PatternFill) ],
mapping => { FgColorFill => '0',
BgColorFill => '1',
PatternFill => '2' }
symbols => [ qw(FG_BUCKET_FILL BG_BUCKET_FILL PATTERN_BUCKET_FILL) ],
mapping => { FG_BUCKET_FILL => '0',
BG_BUCKET_FILL => '1',
PATTERN_BUCKET_FILL => '2' }
},
CloneType =>
{ contig => 1,
symbols => [ qw(ImageClone PatternClone) ],
mapping => { ImageClone => '0',
PatternClone => '1' }
symbols => [ qw(IMAGE_CLONE PATTERN_CLONE) ],
mapping => { IMAGE_CLONE => '0',
PATTERN_CLONE => '1' }
},
ConvolveType =>
{ contig => 1,
symbols => [ qw(Blur Sharpen Custom) ],
mapping => { Blur => '0',
Sharpen => '1',
Custom => '2' }
symbols => [ qw(BLUR_CONVOLVE SHARPEN_CONVOLVE CUSTOM_CONVOLVE) ],
mapping => { BLUR_CONVOLVE => '0',
SHARPEN_CONVOLVE => '1',
CUSTOM_CONVOLVE => '2' },
nicks => { BLUR_CONVOLVE => 'BLUR',
SHARPEN_CONVOLVE => 'SHARPEN',
CUSTOM_CONVOLVE => 'CUSTOM' }
},
ChannelOps =>
{ contig => 1,
......@@ -267,6 +274,16 @@ package Gimp::CodeGen::enums;
INCREMENTAL => '1' },
nicks => { CONSTANT => 'CONTINUOUS' }
},
GradientPaintMode =>
{ contig => 1,
symbols => [ qw(ONCE_FORWARD ONCE_BACKWARDS LOOP_SAWTOOTH
LOOP_TRIANGLE ONCE_END_COLOR) ],
mapping => { ONCE_FORWARD => '0',
ONCE_BACKWARDS => '1',
LOOP_SAWTOOTH => '2',
LOOP_TRIANGLE => '3',
ONCE_END_COLOR => '4' }
},
ChannelLutType =>
{ contig => 1,
symbols => [ qw(VALUE_LUT RED_LUT GREEN_LUT BLUE_LUT) ],
......@@ -278,6 +295,14 @@ package Gimp::CodeGen::enums;
RED_LUT => 'RED',
GREEN_LUT => 'GREEN',
BLUE_LUT => 'BLUE' }
},
ShearType =>
{ contig => 1,
symbols => [ qw(HORZ_SHEAR VERT_SHEAR) ],
mapping => { HORZ_SHEAR => '0',
VERT_SHEAR => '1' },
nicks => { HORZ_SHEAR => 'HORIZONTAL',
VERT_SHEAR => 'VERTICAL' }
}
);
......
......@@ -19,4 +19,4 @@
@groups = qw(gdisplay edit floating_sel undo palette gradient convert
channel_ops gimprc drawable parasite paths gradient_select
unit procedural_db brushes text_tool brush_select color
misc);
misc tools);
......@@ -28,8 +28,7 @@ sub brush_args {(
{ name => 'spacing', type => 'int32',
desc => 'The initial spacing of the brush (if < 0 then use brush default
spacing)' },
{ name => 'paint_mode',
type => 'enum LayerModeEffects (no ERASE_MODE, REPLACE_MODE)',
{ name => 'paint_mode', type => &std_layer_mode_enum,
desc => 'The initial paint mode: { %%desc%% }' }
)}
......
......@@ -44,8 +44,7 @@ sub spacing_arg () {{
}}
sub paint_mode_arg () {{
name => 'paint_mode',
type => 'enum LayerModeEffects (no ERASE_MODE, REPLACE_MODE)',
name => 'paint_mode', type => &std_layer_mode_enum,
desc => 'The paint mode: { %%desc%% }'
}}
......
......@@ -31,6 +31,7 @@ sub drawable_out_arg {
my $type = shift;
my $arg = &drawable_arg;
$arg->{desc} = "The $type drawable";
$arg->{no_declare} = 1;
$arg;
}
......@@ -43,7 +44,7 @@ sub sample_merged_arg () {{
sub operation_arg () {{
name => 'operation',
type => 'enum ChannelOps',
desc => 'The selection operation: %%desc%%'
desc => 'The selection operation: { %%desc%% }'
}}
sub threshold_arg () {{
......@@ -61,9 +62,10 @@ sub feather_select_args () {(
sub stroke_arg () {
{ name => 'strokes', type => 'floatarray',
desc => 'array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ...,
desc => 'Array of stroke coordinates: { s1.x, s1.y, s2.x, s2.y, ...,
sn.x, sn.y }',
array => { desc => 'number of stroke control points (count each
array => { type => '2 <= int32', on_success => 'num_strokes /= 2;',
desc => 'Number of stroke control points (count each
coordinate as 2 points)' } }
}
......@@ -79,7 +81,7 @@ BLURB
This tool simulates the use of an airbrush. Paint pressure represents the
relative intensity of the paint application. High pressure results in a thicker
layer of paint while low pressure results in a thinner layer.
HELP;
HELP
&std_pdb_misc;
......@@ -92,7 +94,9 @@ HELP;
%invoke = (
headers => [ qw("airbrush.h") ],
code => 'airbrush_non_gui (drawable, pressure, num_strokes, strokes);'
code => <<'CODE'
success = airbrush_non_gui (drawable, pressure, num_strokes, strokes);
CODE
);
}
......@@ -113,25 +117,27 @@ HELP
@inargs = (
&drawable_arg,
{ name => 'blend_mode', type => 'enum BlendMode',
desc => 'The type of blend: %%desc%%' },
desc => 'The type of blend: { %%desc%% }' },
{ name => 'paint_mode', type => &std_layer_mode_enum,
desc => 'The paint application mode: { %%desc%% }' },
{ name => 'gradient_type', type => 'enum GradientType',
desc => 'The paint application mode: %%desc%%' },
desc => 'The type of gradient: { %%desc%% }' },
{ name => 'opacity', type => '0 <= float <= 100',
desc => 'The opacity of the final blend %%desc%%' },
desc => 'The opacity of the final blend (%%desc%%)' },
{ name => 'offset', type => '0 <= float',
desc => 'Offset relates to the starting and ending coordinates
specified for the blend. This parameter is mode dependent
%%desc%%' },
(%%desc%%)' },
{ name => 'repeat', type => 'enum RepeatMode',
desc => 'Repeat mode: %%desc%%' },
desc => 'Repeat mode: { %%desc%% }' },
{ name => 'supersample', type => 'boolean',
desc => 'Do adaptive supersampling (%%desc%%)' },
{ name => 'max_depth', type => '1 <= int32 <= 9',
desc => 'Maximum recursion levels for supersampling',
cond => 'supersample' },
cond => [ 'supersample' ] },
{ name => 'threshold', type => '0 <= float <= 4',
desc => 'Supersampling threshold',
cond => 'supersample' },
cond => [ 'supersample' ] },
{ name => 'x1', type => 'float',
desc => "The x coordinate of this blend's starting point" },
{ name => 'y1', type => 'float',
......@@ -149,7 +155,8 @@ HELP
{
gimage = drawable_gimage (GIMP_DRAWABLE (drawable));
blend (gimage, drawable, blend_mode, paint_mode, gradient_type, opacity,
offset, repeat, supersample, max_depth, threshold, x1, y1, x2, y2);
offset, repeat, supersample, max_depth, threshold, x1, y1, x2, y2,
NULL, NULL);
}
CODE
);
......@@ -178,28 +185,28 @@ HELP
my $validity = 'This parameter is only valid when there is no selection in
the specified image.';
my $coord = "The \$a coordinate of this bucket fill's application.
$validity";
%inargs = (
@inargs = (
&drawable_arg,
{ name => 'fill_mode', type => 'enum FillMode',
desc => 'The type of fill: %%desc%%' },
{ name => paint_mode, type => 'enum LayerMode',
desc => 'The paint application mode: %%desc%%' },
{ name => 'fill_mode', type => 'enum BucketFillMode',
desc => 'The type of fill: { %%desc%% }' },
{ name => paint_mode, type => &std_layer_mode_enum,
desc => 'The paint application mode: { %%desc%% }' },
{ name => 'opacity', type => '0 <= float <= 100',
desc => 'The opacity of the final bucket fill %%desc%%' },
desc => 'The opacity of the final bucket fill (%%desc%%)' },
{ name => 'threshold', type => '0 <= float <= 255',
desc => "The threshold determines how extensive the seed fill will
be. It's value is specified in terms of intensity levels
%%desc%%. $validity" },
(%%desc%%). $validity" },
&sample_merged_arg,
{ name => 'x', type => 'float',
desc => eval qq/{\$a = 'x'; "$coord";}/ },
{ name => 'y', type => 'float',
desc => eval qq/{\$a = 'y';"$coord";}/ }
);
foreach (qw(x y)) {
push @inargs, { name => $_, type => 'float',
desc => "The $_ coordinate of this bucket fill's
application. $validity" }
}
%invoke = (
headers => [ qw ("bucket_fill.h") ],
vars => [ 'GimpImage *gimage' ],
......@@ -284,7 +291,7 @@ HELP
{ name => 'src_drawable', type => 'drawable',
desc => 'The source drawable' },
{ name => 'clone_type', type => 'enum CloneType',
desc => 'The type of clone: %%desc%%' },
desc => 'The type of clone: { %%desc%% }' },
{ name => 'src_x', type => 'float',
desc => 'The x coordinate in the source image' },
{ name => 'src_y', type => 'float',
......@@ -295,8 +302,8 @@ HELP
%invoke = (
headers => [ qw("clone.h") ],
code => <<'CODE'
clone_non_gui (drawable, src_drawable, clone_type, src_x, src_y,
num_strokes, strokes);
success = clone_non_gui (drawable, src_drawable, clone_type, src_x, src_y,
num_strokes, strokes);
CODE
);
}
......@@ -322,15 +329,23 @@ HELP
&std_pdb_misc;
@inargs = (
&std_image_arg,
&drawable_arg,
{ name => 'x', type => 'float',
desc => 'x coordinate of upper-left corner of rectangle' },
{ name => 'y', type => 'float',
desc => 'y coordinate of upper-left corner of rectangle' },
&sample_merged_arg,
{ name => 'sample_average', type => 'boolean',
desc => 'Average the color of all the pixels in a specified
radius' },
{ name => 'average_radius', type => '0 < float',
desc => 'The radius of pixels to average',
cond => [ 'sample_average' ] },
{ name => 'save_color', type => 'boolean',
desc => 'Save the color to the active palette' }
);
$inargs[1]->{no_success} = 1;
@outargs = (
{ name => 'color', type => 'color',
......@@ -339,13 +354,17 @@ HELP
%invoke = (
headers => [ qw("color_picker.h") ],
vars => [ 'GimpImage *gimage' ],
code => <<'CODE'
{
gimage = drawable_gimage (GIMP_DRAWABLE (drawable));
if (success = get_color (gimage, drawable, (int) x, (int) y,
sample_merged, save_color)
if (!sample_merged)
if (!drawable || (drawable_gimage (drawable) != gimage))
success = FALSE;
if (success)
success = pick_color (gimage, drawable, (int) x, (int) y,
sample_merged, sample_average, average_radius,
save_color);
if (success)
{
color = g_new (guchar, 3);
color[RED_PIX] = col_value[RED_PIX];
......@@ -373,14 +392,17 @@ HELP
&drawable_arg,
{ name => 'pressure', type => '0 <= float <= 100',
desc => 'The pressure: %%desc%%' },
{ name => 'convolve_type', type => 'enum Convolve (no CUSTOM)',
desc => 'Convolve type: %%desc%%' },
{ name => 'convolve_type',
type => 'enum ConvolveType (no CUSTOM_CONVOLVE)',
desc => 'Convolve type: { %%desc%% }' },
&stroke_arg
);
%invoke = (
headers => [ qw("convolve.h") ],
code => 'convolve_non_gui (drawable, pressure, num_strokes, strokes);'
code => <<'CODE'
success = convolve_non_gui (drawable, pressure, num_strokes, strokes);
CODE
);
}
......@@ -415,10 +437,11 @@ HELP
{
if (new_width > gimage->width || new_height > gimage->height ||
offx > (gimage->width - new_width) ||
offy > (gimage->height - new_height)
offy > (gimage->height - new_height))
success = FALSE;
else
crop_image (gimage, offx, offy, offx + new_width, offy + new_height);
crop_image (gimage, offx, offy, offx + new_width, offy + new_height,
FALSE, FALSE);
}
CODE
);
......@@ -438,6 +461,8 @@ blurred before combining. The blur is a gaussian blur with the specified
feather radius.
HELP
&std_pdb_misc;
@inargs = (
&std_image_arg,
{ name => 'x', type => 'float',
......@@ -450,7 +475,7 @@ HELP
desc => 'The height of the ellipse: %%desc%%' },
&operation_arg,
&std_antialias_arg,
&feather_args
&feather_select_args
);
%invoke = (
......@@ -487,7 +512,7 @@ HELP
%invoke = (
headers => [ qw("eraser.h") ],
code => <<'CODE'
eraser_non_gui (drawable, num_strokes, strokes, hardness, method);
success = eraser_non_gui (drawable, num_strokes, strokes, hardness, method);
CODE
);
}
......@@ -513,15 +538,16 @@ HELP
@inargs = (
&drawable_arg,
{ name => 'flip_type', type => 'enum PaintApplicationMode', # FIXME
desc => 'Type of flip: %%desc%%' }
{ name => 'flip_type', type => '0 <= int32 <= 1',
desc => 'Type of flip: HORIZONTAL (0) or VERTICAL (1)' } # ick
);
@outargs = ( &drawable_out_arg('flipped') );
%invoke = (
headers => [ qw("flip_tool.h" "tranform_core.h") ],
vars => [ 'GimpImage *gimage', 'TileManger *float_tiles, *new_tiles' ],
headers => [ qw("flip_tool.h" "transform_core.h" "undo.h") ],
vars => [ 'GimpImage *gimage', 'TileManager *float_tiles, *new_tiles',
'Layer *layer', 'int new_layer' ],
code => <<'CODE'
{
gimage = drawable_gimage (GIMP_DRAWABLE (drawable));
......@@ -541,7 +567,10 @@ HELP
case 1: /* vert */
new_tiles = flip_tool_flip_vert (gimage, drawable, float_tiles, -1);
break;
}
default:
new_tiles = NULL;
break;
}
/* free the cut/copied buffer */
tile_manager_destroy (float_tiles);
......@@ -583,7 +612,8 @@ HELP
{ name => 'segs', type => 'floatarray',
desc => 'Array of points: { p1.x, p1.y, p2.x, p2.y, ...,
pn.x, pn.y}',
array => { desc => 'Number of points (count 1 coordinate as two
array => { type => '2 <= int32', on_success => 'num_segs /= 2;',
desc => 'Number of points (count 1 coordinate as two
points)' } },
&operation_arg,
&std_antialias_arg,
......@@ -591,10 +621,10 @@ HELP
);
%invoke = (
headers => qw("free_select.h"),
headers => [ qw("free_select.h") ],
code => <<'CODE'
free_select (gimage, num_segs, segs, operation, antialias, feather,
feather_radius);
free_select (gimage, num_segs, (FreeSelectPoint *) segs, operation,
antialias, feather, feather_radius);
CODE
);
}
......@@ -620,7 +650,7 @@ of the composite image will be used instead of that for the specified drawable.
This is equivalent to sampling for colors after merging all visible layers. In
the case of a merged sampling, the supplied drawable is ignored. If the sample
is merged, the specified coordinates are relative to the image origin;
otherwise, they are relative to the drawable's origin.'
otherwise, they are relative to the drawable's origin.
HELP
&std_pdb_misc;
......@@ -641,19 +671,19 @@ HELP
);
%invoke = (
headers => qw("fuzzy_select.h"),
headers => [ qw("fuzzy_select.h") ],
vars => [ 'GimpImage *gimage', 'Channel *new, *old_fuzzy_mask' ],
code => <<'CODE'
{
gimage = drawable_gimage (GIMP_DRAWABLE (drawable));
new = find_contiguous_region (gimage, drawable, antialias, threshold,
x, y, sample_merged);
x, y, sample_merged);
old_fuzzy_mask = fuzzy_mask;
fuzzy_mask = new;
drawable = sample_merged ? NULL : drawable;
fuzzy_select (gimage, drawbale, operation, feather, feather_radius);
fuzzy_select (gimage, drawable, operation, feather, feather_radius);
fuzzy_mask = old_fuzzy_mask;
}
......@@ -662,7 +692,10 @@ CODE
}
sub paintbrush {
$blurb = 'Paint in the current brush with optional fade out parameter.';
$blurb = <<'BLURB';
Paint in the current brush with optional fade out parameter and pull colors
from a gradient.
BLURB
$help = <<'HELP';
This tool is the standard paintbrush. It draws linearly interpolated lines
......@@ -670,7 +703,9 @@ through the specified stroke coordinates. It operates on the specified drawable
in the foreground color with the active brush. The "fade_out" parameter is
measured in pixels and allows the brush stroke to linearly fall off. The
pressure is set to the maximum at the beginning of the stroke. As the distance
of the stroke nears the fade_out value, the pressure will approach zero.
of the stroke nears the fade_out value, the pressure will approach zero. The
gradient_length is the distance to spread the gradient over. It is measured in
pixels. If the gradient_length is 0, no gradient is used.
HELP
&std_pdb_misc;
......@@ -681,13 +716,16 @@ HELP
desc => 'Fade out parameter: %%desc%%' },
&stroke_arg,
{ name => 'method', type => 'enum PaintApplicationMode',
desc => '%%desc%%' }
desc => '%%desc%%' },
{ name => 'gradient_length', type => '0 <= float',
desc => 'Length of gradient to draw: %%desc%%' }
);
%invoke = (
headers => [ qw("paintbrush.h") ],
code => <<'CODE'
paintbrush_non_gui (drawable, num_strokes, strokes, fade_out, method);
success = paintbrush_non_gui (drawable, num_strokes, strokes, fade_out,
method, gradient_length);
CODE
);
}
......@@ -711,8 +749,8 @@ HELP
);
%invoke = (
headers => qw("fuzzy_select.h"),
code => 'pencil_non_gui (drawable, num_strokes, strokes);'
headers => [ qw("pencil.h") ],
code => 'success = pencil_non_gui (drawable, num_strokes, strokes);'
);
}
......@@ -754,7 +792,7 @@ HELP
{ name => "$_$pos", type => 'float',
desc => "The new $_ coordinate of $where corner of original
bounding box",
alias => "trans_info[@{[ uc $_ ]}$pos]}", no_declare => 1 }
alias => "trans_info[@{[ uc ]}$pos]", no_declare => 1 }
}
$pos++;
}
......@@ -762,10 +800,12 @@ HELP
@outargs = ( &drawable_out_arg('newly mapped') );
%invoke = (
headers => [ qw("perspective_tool.h" "tranform_core.h") ],
vars => [ 'GimpImage *gimage', 'TileManger *float_tiles, *new_tiles',
'int new_layer', 'double cx, cy', 'double scalex, scaley',
'double trans_info[8]', 'GimpMatrix matrix' ],
headers => [ qw("perspective_tool.h" "transform_core.h"
"tile_manager_pvt.h") ],
vars => [ 'GimpImage *gimage', 'TileManager *float_tiles, *new_tiles',
'Layer *layer', 'int new_layer', 'double cx, cy',
'double scalex, scaley', 'double trans_info[8]',
'GimpMatrix m, matrix' ],
code => <<'CODE'
{
gimage = drawable_gimage (GIMP_DRAWABLE (drawable));
......@@ -881,11 +921,11 @@ HELP
desc => 'The angle of rotation (radians)' }
);
@outargs = ( &drawable_arg('rotated') );
@outargs = ( &drawable_out_arg('rotated') );
%invoke = (
headers => [ qw("rotate_tool.h" "tranform_core.h") ],
vars => [ 'GimpImage *gimage', 'TileManger *float_tiles, *new_tiles',
headers => [ qw("rotate_tool.h" "transform_core.h") ],
vars => [ 'GimpImage *gimage', 'TileManager *float_tiles, *new_tiles',
'Layer *layer', 'int new_layer', 'double cx, cy',
'GimpMatrix matrix' ],
code => <<'CODE'
......@@ -940,7 +980,7 @@ specified amount. The interpolation parameter can be set to TRUE to indicate
that either linear or cubic interpolation should be used to smooth the
resulting scaled drawable. The return value is the ID of the scaled drawable.
If there was no selection, this will be equal to the drawable ID supplied as
input. Otherwise, this will be the newly created and scaled drawable.
input. Otherwise, this will be the newly created and scaled drawable.
HELP
&std_pdb_misc;
......@@ -951,14 +991,14 @@ HELP
desc => 'Whether to use interpolation' }
);
my $pos = 1;
my $pos = 0;
foreach $where (qw(upper-left lower-right)) {
foreach (qw(x y)) {
push @inargs,
{ name => "$_$pos", type => 'float',
desc => "The new $_ coordinate of $where corner of newly
scaled region",
alias => "trans_info[@{[ uc $_ ]}$pos]}", no_declare => 1 }
alias => "trans_info[@{[ uc ]}$pos]", no_declare => 1 }