revert previous change
* tools/pdbgen/pdb/tools.pdb: revert previous change * tools/pdbgen/pdb/guides.pdb: perform orientation xform here * app/gimpimage.h: use 2 enums, one for internal and for external * libgimp/gimpenums.h: change around external enums here -Yosh
This commit is contained in:
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Thu Jul 29 22:06:41 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* tools/pdbgen/pdb/tools.pdb: revert previous change
|
||||||
|
|
||||||
|
* tools/pdbgen/pdb/guides.pdb: perform orientation xform here
|
||||||
|
|
||||||
|
* app/gimpimage.h: use 2 enums, one for internal and for external
|
||||||
|
|
||||||
|
* libgimp/gimpenums.h: change around external enums here
|
||||||
|
|
||||||
Fri Jul 30 02:34:43 CEST 1999 Marc Lehmann <pcg@goof.com>
|
Fri Jul 30 02:34:43 CEST 1999 Marc Lehmann <pcg@goof.com>
|
||||||
|
|
||||||
* app/gimpparasite.c: I escaped everything when writing out
|
* app/gimpparasite.c: I escaped everything when writing out
|
||||||
|
@ -61,6 +61,12 @@ typedef enum {
|
|||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
|
} InternalOrientationType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
HORIZONTAL,
|
||||||
|
VERTICAL,
|
||||||
|
UNKNOWN
|
||||||
} OrientationType;
|
} OrientationType;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -61,6 +61,12 @@ typedef enum {
|
|||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
|
} InternalOrientationType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
HORIZONTAL,
|
||||||
|
VERTICAL,
|
||||||
|
UNKNOWN
|
||||||
} OrientationType;
|
} OrientationType;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -61,6 +61,12 @@ typedef enum {
|
|||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
|
} InternalOrientationType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
HORIZONTAL,
|
||||||
|
VERTICAL,
|
||||||
|
UNKNOWN
|
||||||
} OrientationType;
|
} OrientationType;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -61,6 +61,12 @@ typedef enum {
|
|||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
|
} InternalOrientationType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
HORIZONTAL,
|
||||||
|
VERTICAL,
|
||||||
|
UNKNOWN
|
||||||
} OrientationType;
|
} OrientationType;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -61,6 +61,12 @@ typedef enum {
|
|||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
|
} InternalOrientationType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
HORIZONTAL,
|
||||||
|
VERTICAL,
|
||||||
|
UNKNOWN
|
||||||
} OrientationType;
|
} OrientationType;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -61,6 +61,12 @@ typedef enum {
|
|||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
|
} InternalOrientationType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
HORIZONTAL,
|
||||||
|
VERTICAL,
|
||||||
|
UNKNOWN
|
||||||
} OrientationType;
|
} OrientationType;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -61,6 +61,12 @@ typedef enum {
|
|||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
|
} InternalOrientationType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
HORIZONTAL,
|
||||||
|
VERTICAL,
|
||||||
|
UNKNOWN
|
||||||
} OrientationType;
|
} OrientationType;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -61,6 +61,12 @@ typedef enum {
|
|||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
|
} InternalOrientationType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
HORIZONTAL,
|
||||||
|
VERTICAL,
|
||||||
|
UNKNOWN
|
||||||
} OrientationType;
|
} OrientationType;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -408,7 +408,7 @@ image_get_guide_orientation_invoker (Argument *args)
|
|||||||
if ((((Guide *) guides->data)->guide_ID == guide) &&
|
if ((((Guide *) guides->data)->guide_ID == guide) &&
|
||||||
(((Guide *) guides->data)->position >= 0))
|
(((Guide *) guides->data)->position >= 0))
|
||||||
{
|
{
|
||||||
orientation = ((Guide *) guides->data)->orientation;
|
orientation = ((Guide *) guides->data)->orientation - 1;
|
||||||
success = TRUE;
|
success = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -444,7 +444,7 @@ static ProcArg image_get_guide_orientation_outargs[] =
|
|||||||
{
|
{
|
||||||
PDB_INT32,
|
PDB_INT32,
|
||||||
"orientation",
|
"orientation",
|
||||||
"The guide's orientation: { ORIENTATION_HORIZONTAL (1), ORIENTATION_VERTICAL (2) }"
|
"The guide's orientation: { HORIZONTAL (0), VERTICAL (1), UNKNOWN (2) }"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "flip_tool.h"
|
#include "flip_tool.h"
|
||||||
#include "free_select.h"
|
#include "free_select.h"
|
||||||
#include "fuzzy_select.h"
|
#include "fuzzy_select.h"
|
||||||
|
#include "gimpimage.h"
|
||||||
#include "paint_core.h"
|
#include "paint_core.h"
|
||||||
#include "paint_funcs.h"
|
#include "paint_funcs.h"
|
||||||
#include "paintbrush.h"
|
#include "paintbrush.h"
|
||||||
@ -1573,7 +1574,7 @@ flip_invoker (Argument *args)
|
|||||||
success = FALSE;
|
success = FALSE;
|
||||||
|
|
||||||
flip_type = args[1].value.pdb_int;
|
flip_type = args[1].value.pdb_int;
|
||||||
if (flip_type < 0 || flip_type > 1)
|
if (flip_type < VERTICAL || flip_type > UNKNOWN)
|
||||||
success = FALSE;
|
success = FALSE;
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
@ -1587,9 +1588,16 @@ flip_invoker (Argument *args)
|
|||||||
float_tiles = transform_core_cut (gimage, drawable, &new_layer);
|
float_tiles = transform_core_cut (gimage, drawable, &new_layer);
|
||||||
|
|
||||||
/* flip the buffer */
|
/* flip the buffer */
|
||||||
new_tiles = flip_tool_flip (gimage, drawable, float_tiles, -1,
|
switch (flip_type)
|
||||||
flip_type == 1 ? ORIENTATION_VERTICAL :
|
{
|
||||||
ORIENTATION_HORIZONTAL);
|
case ORIENTATION_HORIZONTAL:
|
||||||
|
case ORIENTATION_VERTICAL:
|
||||||
|
new_tiles = flip_tool_flip (gimage, drawable, float_tiles, -1, flip_type);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
new_tiles = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* free the cut/copied buffer */
|
/* free the cut/copied buffer */
|
||||||
tile_manager_destroy (float_tiles);
|
tile_manager_destroy (float_tiles);
|
||||||
@ -1624,7 +1632,7 @@ static ProcArg flip_inargs[] =
|
|||||||
{
|
{
|
||||||
PDB_INT32,
|
PDB_INT32,
|
||||||
"flip_type",
|
"flip_type",
|
||||||
"Type of flip: HORIZONTAL (0) or VERTICAL (1)"
|
"Type of flip: HORIZONTAL (0), VERTICAL (1), UNKNOWN (2)"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2648,7 +2656,7 @@ shear_invoker (Argument *args)
|
|||||||
interpolation = args[1].value.pdb_int ? TRUE : FALSE;
|
interpolation = args[1].value.pdb_int ? TRUE : FALSE;
|
||||||
|
|
||||||
shear_type = args[2].value.pdb_int;
|
shear_type = args[2].value.pdb_int;
|
||||||
if (shear_type < 0 || shear_type > 1)
|
if (shear_type < VERTICAL || shear_type > UNKNOWN)
|
||||||
success = FALSE;
|
success = FALSE;
|
||||||
|
|
||||||
magnitude = args[3].value.pdb_float;
|
magnitude = args[3].value.pdb_float;
|
||||||
@ -2669,9 +2677,9 @@ shear_invoker (Argument *args)
|
|||||||
gimp_matrix_identity (matrix);
|
gimp_matrix_identity (matrix);
|
||||||
gimp_matrix_translate (matrix, -cx, -cy);
|
gimp_matrix_translate (matrix, -cx, -cy);
|
||||||
/* Shear matrix */
|
/* Shear matrix */
|
||||||
if (shear_type == 0)
|
if (shear_type == ORIENTATION_HORIZONTAL)
|
||||||
gimp_matrix_xshear (matrix, magnitude / float_tiles->height);
|
gimp_matrix_xshear (matrix, magnitude / float_tiles->height);
|
||||||
else if (shear_type == 1)
|
else if (shear_type == ORIENTATION_VERTICAL)
|
||||||
gimp_matrix_yshear (matrix, magnitude / float_tiles->width);
|
gimp_matrix_yshear (matrix, magnitude / float_tiles->width);
|
||||||
gimp_matrix_translate (matrix, +cx, +cy);
|
gimp_matrix_translate (matrix, +cx, +cy);
|
||||||
|
|
||||||
@ -2717,7 +2725,7 @@ static ProcArg shear_inargs[] =
|
|||||||
{
|
{
|
||||||
PDB_INT32,
|
PDB_INT32,
|
||||||
"shear_type",
|
"shear_type",
|
||||||
"Type of shear: HORIZONTAL (0) or VERTICAL (1)"
|
"Type of shear: HORIZONTAL (0), VERTICAL (1), UNKNOWN (2)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
PDB_FLOAT,
|
PDB_FLOAT,
|
||||||
|
@ -29,9 +29,9 @@ typedef enum
|
|||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
ORIENTATION_UNKNOWN = 0,
|
ORIENTATION_HORIZONTAL = 0,
|
||||||
ORIENTATION_HORIZONTAL = 1,
|
ORIENTATION_VERTICAL = 1,
|
||||||
ORIENTATION_VERTICAL = 2
|
ORIENTATION_UNKNOWN = 2
|
||||||
} GOrientation;
|
} GOrientation;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
|
@ -185,7 +185,7 @@ package Gimp::CodeGen::enums;
|
|||||||
GRAY => '1',
|
GRAY => '1',
|
||||||
INDEXED => '2' }
|
INDEXED => '2' }
|
||||||
},
|
},
|
||||||
OrientationType =>
|
InternalOrientationType =>
|
||||||
{ contig => 1,
|
{ contig => 1,
|
||||||
header => 'gimpimage.h',
|
header => 'gimpimage.h',
|
||||||
symbols => [ qw(ORIENTATION_UNKNOWN ORIENTATION_HORIZONTAL
|
symbols => [ qw(ORIENTATION_UNKNOWN ORIENTATION_HORIZONTAL
|
||||||
@ -194,6 +194,14 @@ package Gimp::CodeGen::enums;
|
|||||||
ORIENTATION_HORIZONTAL => '1',
|
ORIENTATION_HORIZONTAL => '1',
|
||||||
ORIENTATION_VERTICAL => '2' }
|
ORIENTATION_VERTICAL => '2' }
|
||||||
},
|
},
|
||||||
|
OrientationType =>
|
||||||
|
{ contig => 1,
|
||||||
|
header => 'gimpimage.h',
|
||||||
|
symbols => [ qw(HORIZONTAL VERTICAL UNKNOWN) ],
|
||||||
|
mapping => { HORIZONTAL => '0',
|
||||||
|
VERTICAL => '1',
|
||||||
|
UNKNOWN => '2' }
|
||||||
|
},
|
||||||
ChannelType =>
|
ChannelType =>
|
||||||
{ contig => 1,
|
{ contig => 1,
|
||||||
header => 'gimpimage.h',
|
header => 'gimpimage.h',
|
||||||
|
@ -235,7 +235,7 @@ HELP
|
|||||||
if ((((Guide *) guides->data)->guide_ID == guide) &&
|
if ((((Guide *) guides->data)->guide_ID == guide) &&
|
||||||
(((Guide *) guides->data)->position >= 0))
|
(((Guide *) guides->data)->position >= 0))
|
||||||
{
|
{
|
||||||
orientation = ((Guide *) guides->data)->orientation;
|
orientation = ((Guide *) guides->data)->orientation - 1;
|
||||||
success = TRUE;
|
success = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -649,8 +649,8 @@ HELP
|
|||||||
|
|
||||||
@inargs = (
|
@inargs = (
|
||||||
&drawable_arg,
|
&drawable_arg,
|
||||||
{ name => 'flip_type', type => '0 <= int32 <= 1',
|
{ name => 'flip_type', type => &std_orientation_enum,
|
||||||
desc => 'Type of flip: HORIZONTAL (0) or VERTICAL (1)' }
|
desc => 'Type of flip: %%desc%%' }
|
||||||
);
|
);
|
||||||
|
|
||||||
@outargs = ( &drawable_out_arg('flipped') );
|
@outargs = ( &drawable_out_arg('flipped') );
|
||||||
@ -670,9 +670,16 @@ HELP
|
|||||||
float_tiles = transform_core_cut (gimage, drawable, &new_layer);
|
float_tiles = transform_core_cut (gimage, drawable, &new_layer);
|
||||||
|
|
||||||
/* flip the buffer */
|
/* flip the buffer */
|
||||||
new_tiles = flip_tool_flip (gimage, drawable, float_tiles, -1,
|
switch (flip_type)
|
||||||
flip_type == 1 ? ORIENTATION_VERTICAL :
|
{
|
||||||
ORIENTATION_HORIZONTAL);
|
case ORIENTATION_HORIZONTAL:
|
||||||
|
case ORIENTATION_VERTICAL:
|
||||||
|
new_tiles = flip_tool_flip (gimage, drawable, float_tiles, -1, flip_type);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
new_tiles = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* free the cut/copied buffer */
|
/* free the cut/copied buffer */
|
||||||
tile_manager_destroy (float_tiles);
|
tile_manager_destroy (float_tiles);
|
||||||
@ -1226,8 +1233,8 @@ HELP
|
|||||||
&drawable_arg,
|
&drawable_arg,
|
||||||
{ name => 'interpolation', type => 'boolean',
|
{ name => 'interpolation', type => 'boolean',
|
||||||
desc => 'Whether to use interpolation' },
|
desc => 'Whether to use interpolation' },
|
||||||
{ name => 'shear_type', type => '0 <= int32 <= 1',
|
{ name => 'shear_type', type => &std_orientation_enum,
|
||||||
desc => 'Type of shear: HORIZONTAL (0) or VERTICAL (1)' },
|
desc => 'Type of shear: %%desc%%' },
|
||||||
{ name => 'magnitude', type => 'float',
|
{ name => 'magnitude', type => 'float',
|
||||||
desc => 'The magnitude of the shear' }
|
desc => 'The magnitude of the shear' }
|
||||||
);
|
);
|
||||||
@ -1256,9 +1263,9 @@ HELP
|
|||||||
gimp_matrix_identity (matrix);
|
gimp_matrix_identity (matrix);
|
||||||
gimp_matrix_translate (matrix, -cx, -cy);
|
gimp_matrix_translate (matrix, -cx, -cy);
|
||||||
/* Shear matrix */
|
/* Shear matrix */
|
||||||
if (shear_type == 0)
|
if (shear_type == ORIENTATION_HORIZONTAL)
|
||||||
gimp_matrix_xshear (matrix, magnitude / float_tiles->height);
|
gimp_matrix_xshear (matrix, magnitude / float_tiles->height);
|
||||||
else if (shear_type == 1)
|
else if (shear_type == ORIENTATION_VERTICAL)
|
||||||
gimp_matrix_yshear (matrix, magnitude / float_tiles->width);
|
gimp_matrix_yshear (matrix, magnitude / float_tiles->width);
|
||||||
gimp_matrix_translate (matrix, +cx, +cy);
|
gimp_matrix_translate (matrix, +cx, +cy);
|
||||||
|
|
||||||
|
@ -649,8 +649,8 @@ HELP
|
|||||||
|
|
||||||
@inargs = (
|
@inargs = (
|
||||||
&drawable_arg,
|
&drawable_arg,
|
||||||
{ name => 'flip_type', type => '0 <= int32 <= 1',
|
{ name => 'flip_type', type => &std_orientation_enum,
|
||||||
desc => 'Type of flip: HORIZONTAL (0) or VERTICAL (1)' }
|
desc => 'Type of flip: %%desc%%' }
|
||||||
);
|
);
|
||||||
|
|
||||||
@outargs = ( &drawable_out_arg('flipped') );
|
@outargs = ( &drawable_out_arg('flipped') );
|
||||||
@ -670,9 +670,16 @@ HELP
|
|||||||
float_tiles = transform_core_cut (gimage, drawable, &new_layer);
|
float_tiles = transform_core_cut (gimage, drawable, &new_layer);
|
||||||
|
|
||||||
/* flip the buffer */
|
/* flip the buffer */
|
||||||
new_tiles = flip_tool_flip (gimage, drawable, float_tiles, -1,
|
switch (flip_type)
|
||||||
flip_type == 1 ? ORIENTATION_VERTICAL :
|
{
|
||||||
ORIENTATION_HORIZONTAL);
|
case ORIENTATION_HORIZONTAL:
|
||||||
|
case ORIENTATION_VERTICAL:
|
||||||
|
new_tiles = flip_tool_flip (gimage, drawable, float_tiles, -1, flip_type);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
new_tiles = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* free the cut/copied buffer */
|
/* free the cut/copied buffer */
|
||||||
tile_manager_destroy (float_tiles);
|
tile_manager_destroy (float_tiles);
|
||||||
@ -1226,8 +1233,8 @@ HELP
|
|||||||
&drawable_arg,
|
&drawable_arg,
|
||||||
{ name => 'interpolation', type => 'boolean',
|
{ name => 'interpolation', type => 'boolean',
|
||||||
desc => 'Whether to use interpolation' },
|
desc => 'Whether to use interpolation' },
|
||||||
{ name => 'shear_type', type => '0 <= int32 <= 1',
|
{ name => 'shear_type', type => &std_orientation_enum,
|
||||||
desc => 'Type of shear: HORIZONTAL (0) or VERTICAL (1)' },
|
desc => 'Type of shear: %%desc%%' },
|
||||||
{ name => 'magnitude', type => 'float',
|
{ name => 'magnitude', type => 'float',
|
||||||
desc => 'The magnitude of the shear' }
|
desc => 'The magnitude of the shear' }
|
||||||
);
|
);
|
||||||
@ -1256,9 +1263,9 @@ HELP
|
|||||||
gimp_matrix_identity (matrix);
|
gimp_matrix_identity (matrix);
|
||||||
gimp_matrix_translate (matrix, -cx, -cy);
|
gimp_matrix_translate (matrix, -cx, -cy);
|
||||||
/* Shear matrix */
|
/* Shear matrix */
|
||||||
if (shear_type == 0)
|
if (shear_type == ORIENTATION_HORIZONTAL)
|
||||||
gimp_matrix_xshear (matrix, magnitude / float_tiles->height);
|
gimp_matrix_xshear (matrix, magnitude / float_tiles->height);
|
||||||
else if (shear_type == 1)
|
else if (shear_type == ORIENTATION_VERTICAL)
|
||||||
gimp_matrix_yshear (matrix, magnitude / float_tiles->width);
|
gimp_matrix_yshear (matrix, magnitude / float_tiles->width);
|
||||||
gimp_matrix_translate (matrix, +cx, +cy);
|
gimp_matrix_translate (matrix, +cx, +cy);
|
||||||
|
|
||||||
|
@ -649,8 +649,8 @@ HELP
|
|||||||
|
|
||||||
@inargs = (
|
@inargs = (
|
||||||
&drawable_arg,
|
&drawable_arg,
|
||||||
{ name => 'flip_type', type => '0 <= int32 <= 1',
|
{ name => 'flip_type', type => &std_orientation_enum,
|
||||||
desc => 'Type of flip: HORIZONTAL (0) or VERTICAL (1)' }
|
desc => 'Type of flip: %%desc%%' }
|
||||||
);
|
);
|
||||||
|
|
||||||
@outargs = ( &drawable_out_arg('flipped') );
|
@outargs = ( &drawable_out_arg('flipped') );
|
||||||
@ -670,9 +670,16 @@ HELP
|
|||||||
float_tiles = transform_core_cut (gimage, drawable, &new_layer);
|
float_tiles = transform_core_cut (gimage, drawable, &new_layer);
|
||||||
|
|
||||||
/* flip the buffer */
|
/* flip the buffer */
|
||||||
new_tiles = flip_tool_flip (gimage, drawable, float_tiles, -1,
|
switch (flip_type)
|
||||||
flip_type == 1 ? ORIENTATION_VERTICAL :
|
{
|
||||||
ORIENTATION_HORIZONTAL);
|
case ORIENTATION_HORIZONTAL:
|
||||||
|
case ORIENTATION_VERTICAL:
|
||||||
|
new_tiles = flip_tool_flip (gimage, drawable, float_tiles, -1, flip_type);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
new_tiles = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* free the cut/copied buffer */
|
/* free the cut/copied buffer */
|
||||||
tile_manager_destroy (float_tiles);
|
tile_manager_destroy (float_tiles);
|
||||||
@ -1226,8 +1233,8 @@ HELP
|
|||||||
&drawable_arg,
|
&drawable_arg,
|
||||||
{ name => 'interpolation', type => 'boolean',
|
{ name => 'interpolation', type => 'boolean',
|
||||||
desc => 'Whether to use interpolation' },
|
desc => 'Whether to use interpolation' },
|
||||||
{ name => 'shear_type', type => '0 <= int32 <= 1',
|
{ name => 'shear_type', type => &std_orientation_enum,
|
||||||
desc => 'Type of shear: HORIZONTAL (0) or VERTICAL (1)' },
|
desc => 'Type of shear: %%desc%%' },
|
||||||
{ name => 'magnitude', type => 'float',
|
{ name => 'magnitude', type => 'float',
|
||||||
desc => 'The magnitude of the shear' }
|
desc => 'The magnitude of the shear' }
|
||||||
);
|
);
|
||||||
@ -1256,9 +1263,9 @@ HELP
|
|||||||
gimp_matrix_identity (matrix);
|
gimp_matrix_identity (matrix);
|
||||||
gimp_matrix_translate (matrix, -cx, -cy);
|
gimp_matrix_translate (matrix, -cx, -cy);
|
||||||
/* Shear matrix */
|
/* Shear matrix */
|
||||||
if (shear_type == 0)
|
if (shear_type == ORIENTATION_HORIZONTAL)
|
||||||
gimp_matrix_xshear (matrix, magnitude / float_tiles->height);
|
gimp_matrix_xshear (matrix, magnitude / float_tiles->height);
|
||||||
else if (shear_type == 1)
|
else if (shear_type == ORIENTATION_VERTICAL)
|
||||||
gimp_matrix_yshear (matrix, magnitude / float_tiles->width);
|
gimp_matrix_yshear (matrix, magnitude / float_tiles->width);
|
||||||
gimp_matrix_translate (matrix, +cx, +cy);
|
gimp_matrix_translate (matrix, +cx, +cy);
|
||||||
|
|
||||||
|
@ -649,8 +649,8 @@ HELP
|
|||||||
|
|
||||||
@inargs = (
|
@inargs = (
|
||||||
&drawable_arg,
|
&drawable_arg,
|
||||||
{ name => 'flip_type', type => '0 <= int32 <= 1',
|
{ name => 'flip_type', type => &std_orientation_enum,
|
||||||
desc => 'Type of flip: HORIZONTAL (0) or VERTICAL (1)' }
|
desc => 'Type of flip: %%desc%%' }
|
||||||
);
|
);
|
||||||
|
|
||||||
@outargs = ( &drawable_out_arg('flipped') );
|
@outargs = ( &drawable_out_arg('flipped') );
|
||||||
@ -670,9 +670,16 @@ HELP
|
|||||||
float_tiles = transform_core_cut (gimage, drawable, &new_layer);
|
float_tiles = transform_core_cut (gimage, drawable, &new_layer);
|
||||||
|
|
||||||
/* flip the buffer */
|
/* flip the buffer */
|
||||||
new_tiles = flip_tool_flip (gimage, drawable, float_tiles, -1,
|
switch (flip_type)
|
||||||
flip_type == 1 ? ORIENTATION_VERTICAL :
|
{
|
||||||
ORIENTATION_HORIZONTAL);
|
case ORIENTATION_HORIZONTAL:
|
||||||
|
case ORIENTATION_VERTICAL:
|
||||||
|
new_tiles = flip_tool_flip (gimage, drawable, float_tiles, -1, flip_type);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
new_tiles = NULL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* free the cut/copied buffer */
|
/* free the cut/copied buffer */
|
||||||
tile_manager_destroy (float_tiles);
|
tile_manager_destroy (float_tiles);
|
||||||
@ -1226,8 +1233,8 @@ HELP
|
|||||||
&drawable_arg,
|
&drawable_arg,
|
||||||
{ name => 'interpolation', type => 'boolean',
|
{ name => 'interpolation', type => 'boolean',
|
||||||
desc => 'Whether to use interpolation' },
|
desc => 'Whether to use interpolation' },
|
||||||
{ name => 'shear_type', type => '0 <= int32 <= 1',
|
{ name => 'shear_type', type => &std_orientation_enum,
|
||||||
desc => 'Type of shear: HORIZONTAL (0) or VERTICAL (1)' },
|
desc => 'Type of shear: %%desc%%' },
|
||||||
{ name => 'magnitude', type => 'float',
|
{ name => 'magnitude', type => 'float',
|
||||||
desc => 'The magnitude of the shear' }
|
desc => 'The magnitude of the shear' }
|
||||||
);
|
);
|
||||||
@ -1256,9 +1263,9 @@ HELP
|
|||||||
gimp_matrix_identity (matrix);
|
gimp_matrix_identity (matrix);
|
||||||
gimp_matrix_translate (matrix, -cx, -cy);
|
gimp_matrix_translate (matrix, -cx, -cy);
|
||||||
/* Shear matrix */
|
/* Shear matrix */
|
||||||
if (shear_type == 0)
|
if (shear_type == ORIENTATION_HORIZONTAL)
|
||||||
gimp_matrix_xshear (matrix, magnitude / float_tiles->height);
|
gimp_matrix_xshear (matrix, magnitude / float_tiles->height);
|
||||||
else if (shear_type == 1)
|
else if (shear_type == ORIENTATION_VERTICAL)
|
||||||
gimp_matrix_yshear (matrix, magnitude / float_tiles->width);
|
gimp_matrix_yshear (matrix, magnitude / float_tiles->width);
|
||||||
gimp_matrix_translate (matrix, +cx, +cy);
|
gimp_matrix_translate (matrix, +cx, +cy);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user