Commit a99e25b6 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

added "clip_result" to the transform_options_args() utility function and

2004-11-01  Michael Natterer  <mitch@gimp.org>

	* tools/pdbgen/pdb/drawable_transform.pdb: added "clip_result" to
	the transform_options_args() utility function and changed all
	wrappers accordingly. Removed "interpolation", "supersample" and
	"recursion_level" args from drawable_transform_flip().

	* app/pdb/drawable_transform_cmds.c
	* libgimp/gimpdrawabletransform_pdb.[ch]: regenerated.
parent 8526b483
2004-11-01 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/drawable_transform.pdb: added "clip_result" to
the transform_options_args() utility function and changed all
wrappers accordingly. Removed "interpolation", "supersample" and
"recursion_level" args from drawable_transform_flip().
* app/pdb/drawable_transform_cmds.c
* libgimp/gimpdrawabletransform_pdb.[ch]: regenerated.
2004-11-01 Sven Neumann <sven@gimp.org>
 
* plug-ins/common/tiff.c (query): fixed typo.
......
......@@ -72,9 +72,6 @@ drawable_transform_flip_invoker (Gimp *gimp,
gboolean center;
gdouble axis;
gint32 transform_direction;
gint32 interpolation;
gboolean supersample;
gint32 recursion_level;
gboolean clip_result;
drawable = (GimpDrawable *) gimp_item_get_by_ID (gimp, args[0].value.pdb_int);
......@@ -93,17 +90,7 @@ drawable_transform_flip_invoker (Gimp *gimp,
if (transform_direction < GIMP_TRANSFORM_FORWARD || transform_direction > GIMP_TRANSFORM_BACKWARD)
success = FALSE;
interpolation = args[5].value.pdb_int;
if (interpolation < GIMP_INTERPOLATION_NONE || interpolation > GIMP_INTERPOLATION_CUBIC)
success = FALSE;
supersample = args[6].value.pdb_int ? TRUE : FALSE;
recursion_level = args[7].value.pdb_int;
if (recursion_level <= 0)
success = FALSE;
clip_result = args[8].value.pdb_int ? TRUE : FALSE;
clip_result = args[5].value.pdb_int ? TRUE : FALSE;
if (success)
{
......@@ -114,8 +101,7 @@ drawable_transform_flip_invoker (Gimp *gimp,
if (success &&
gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
{
success = gimp_drawable_transform_flip (drawable,
context,
success = gimp_drawable_transform_flip (drawable, context,
transform_direction,
center, axis,
clip_result);
......@@ -157,21 +143,6 @@ static ProcArg drawable_transform_flip_inargs[] =
"transform_direction",
"Direction of Transformation: { GIMP_TRANSFORM_FORWARD (0), GIMP_TRANSFORM_BACKWARD (1) }"
},
{
GIMP_PDB_INT32,
"interpolation",
"Type of interpolation: { GIMP_INTERPOLATION_NONE (0), GIMP_INTERPOLATION_LINEAR (1), GIMP_INTERPOLATION_CUBIC (2) }"
},
{
GIMP_PDB_INT32,
"supersample",
"Whether to perform supersample"
},
{
GIMP_PDB_INT32,
"recursion_level",
"Level of recursion (3 is a nice default)"
},
{
GIMP_PDB_INT32,
"clip_result",
......@@ -198,7 +169,7 @@ static ProcRecord drawable_transform_flip_proc =
"2004",
NULL,
GIMP_INTERNAL,
9,
6,
drawable_transform_flip_inargs,
1,
drawable_transform_flip_outargs,
......
......@@ -32,9 +32,6 @@
* @center: Whether to automatically position the axis in the image center.
* @axis: coord. of flip axis.
* @transform_direction: Direction of Transformation.
* @interpolation: Type of interpolation.
* @supersample: Whether to perform supersample.
* @recursion_level: Level of recursion (3 is a nice default).
* @clip_result: Whether to clip results.
*
* Flip the specified drawable either vertically or horizontally.
......@@ -59,9 +56,6 @@ gimp_drawable_transform_flip (gint32 drawable_ID,
gboolean center,
gdouble axis,
GimpTransformDirection transform_direction,
GimpInterpolationType interpolation,
gboolean supersample,
gint recursion_level,
gboolean clip_result)
{
GimpParam *return_vals;
......@@ -75,9 +69,6 @@ gimp_drawable_transform_flip (gint32 drawable_ID,
GIMP_PDB_INT32, center,
GIMP_PDB_FLOAT, axis,
GIMP_PDB_INT32, transform_direction,
GIMP_PDB_INT32, interpolation,
GIMP_PDB_INT32, supersample,
GIMP_PDB_INT32, recursion_level,
GIMP_PDB_INT32, clip_result,
GIMP_PDB_END);
......
......@@ -34,9 +34,6 @@ gint32 gimp_drawable_transform_flip (gint32 drawable_ID,
gboolean center,
gdouble axis,
GimpTransformDirection transform_direction,
GimpInterpolationType interpolation,
gboolean supersample,
gint recursion_level,
gboolean clip_result);
gint32 gimp_drawable_transform_flip_free (gint32 drawable_ID,
gdouble x0,
......
......@@ -35,31 +35,18 @@ sub drawable_arg () {{
desc => 'The affected drawable'
}}
sub clip_result_arg () {{
name => 'clip_result',
type => 'boolean',
desc => 'Whether to clip results'
}}
sub transform_options_args ()
{
{
name => 'transform_direction', type => 'enum GimpTransformDirection',
desc => 'Direction of Transformation: { %%desc%% } '
},
{
name => 'interpolation', type => 'enum GimpInterpolationType',
desc => 'Type of interpolation: { %%desc%% } '
},
{
name => 'supersample', type => 'boolean',
desc => 'Whether to perform supersample'
},
{
name => 'recursion_level', type => '0 < int32',
desc => 'Level of recursion (3 is a nice default)'
}
}
sub transform_options_args () {
{ name => 'transform_direction', type => 'enum GimpTransformDirection',
desc => 'Direction of Transformation: { %%desc%% }' },
{ name => 'interpolation', type => 'enum GimpInterpolationType',
desc => 'Type of interpolation: { %%desc%% }' },
{ name => 'supersample', type => 'boolean',
desc => 'Whether to perform supersample' },
{ name => 'recursion_level', type => '0 < int32',
desc => 'Level of recursion (3 is a nice default)' },
{ name => 'clip_result', type => 'boolean',
desc => 'Whether to clip results' }
}
sub drawable_out_arg {
my $type = shift;
......@@ -100,9 +87,10 @@ HELP
desc => 'Whether to automatically position the axis in the image center' },
{ name => 'axis', type => 'float',
desc => 'coord. of flip axis' },
&transform_options_args,
&clip_result_arg,
{ name => 'transform_direction', type => 'enum GimpTransformDirection',
desc => 'Direction of Transformation: { %%desc%% }' },
{ name => 'clip_result', type => 'boolean',
desc => 'Whether to clip results' }
);
@outargs = ( &drawable_out_arg('flipped') );
......@@ -117,8 +105,7 @@ HELP
if (success &&
gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
{
success = gimp_drawable_transform_flip (drawable,
context,
success = gimp_drawable_transform_flip (drawable, context,
transform_direction,
center, axis,
clip_result);
......@@ -160,8 +147,7 @@ HELP
{ name => 'y1', type => 'float',
desc => 'vert. coord. of other end of axis' },
&transform_options_args,
&clip_result_arg,
&transform_options_args
);
@outargs = ( &drawable_out_arg('flipped') );
......@@ -245,8 +231,7 @@ HELP
$pos++;
}
@inargs = (@inargs,
&transform_options_args,
&clip_result_arg
&transform_options_args
);
@outargs = ( &drawable_out_arg('newly mapped') );
......@@ -317,8 +302,7 @@ HELP
desc => 'The hor. coordinate of the center of rotation' },
{ name => 'center_y', type => 'int32',
desc => 'The vert. coordinate of the center of rotation' },
&transform_options_args,
&clip_result_arg
&transform_options_args
);
@outargs = ( &drawable_out_arg('rotated') );
......@@ -389,8 +373,7 @@ HELP
}
@inargs = (@inargs,
&transform_options_args,
&clip_result_arg
&transform_options_args
);
@outargs = ( &drawable_out_arg('scaled') );
......@@ -463,8 +446,7 @@ HELP
desc => 'Type of shear: %%desc%%' },
{ name => 'magnitude', type => 'float',
desc => 'The magnitude of the shear' },
&transform_options_args,
&clip_result_arg
&transform_options_args
);
@outargs = ( &drawable_out_arg('sheared') );
......@@ -543,8 +525,7 @@ HELP
desc => 'X coordinate of where the center goes' },
{ name => 'dest_y', type => 'float',
desc => 'Y coordinate of where the center goes' },
&transform_options_args,
&clip_result_arg
&transform_options_args
);
@outargs = ( &drawable_out_arg('transformed') );
......@@ -624,8 +605,7 @@ HELP
desc => 'coefficient (2,1) of the transformation matrix' },
{ name => 'coeff_2_2', type => 'float',
desc => 'coefficient (2,2) of the transformation matrix' },
&transform_options_args,
&clip_result_arg
&transform_options_args
);
@outargs = ( &drawable_out_arg('transformed') );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment