mirror of https://github.com/GNOME/gimp.git
renamed GimpInterpolationType values to something sane and unexported it
2002-02-12 Sven Neumann <sven@gimp.org> * app/base/base-enums.h: renamed GimpInterpolationType values to something sane and unexported it from the PDB since it was never used in any PDB calls. * app/gimprc.c * app/config/gimpcoreconfig.c * app/core/gimpcoreconfig.c * app/core/gimpdrawable-transform.c * app/core/gimplayer.c * app/gui/preferences-dialog.c * app/gui/resize-dialog.c * app/paint-funcs/paint-funcs.c * app/pdb/transform_tools_cmds.c * app/tools/transform_options.c * tools/pdbgen/pdb/transform_tools.pdb: changed accordingly. * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated.
This commit is contained in:
parent
6083787ba0
commit
04c995fb70
25
ChangeLog
25
ChangeLog
|
@ -1,7 +1,30 @@
|
||||||
|
2002-02-12 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/base/base-enums.h: renamed GimpInterpolationType values to
|
||||||
|
something sane and unexported it from the PDB since it was never
|
||||||
|
used in any PDB calls.
|
||||||
|
|
||||||
|
* app/gimprc.c
|
||||||
|
* app/config/gimpcoreconfig.c
|
||||||
|
* app/core/gimpcoreconfig.c
|
||||||
|
* app/core/gimpdrawable-transform.c
|
||||||
|
* app/core/gimplayer.c
|
||||||
|
* app/gui/preferences-dialog.c
|
||||||
|
* app/gui/resize-dialog.c
|
||||||
|
* app/paint-funcs/paint-funcs.c
|
||||||
|
* app/pdb/transform_tools_cmds.c
|
||||||
|
* app/tools/transform_options.c
|
||||||
|
* tools/pdbgen/pdb/transform_tools.pdb: changed accordingly.
|
||||||
|
|
||||||
|
* libgimp/gimpenums.h
|
||||||
|
* plug-ins/script-fu/script-fu-constants.c
|
||||||
|
* tools/pdbgen/enums.pl: regenerated.
|
||||||
|
|
||||||
2002-02-11 Nathan Summers <rock@gimp.org>
|
2002-02-11 Nathan Summers <rock@gimp.org>
|
||||||
|
|
||||||
* app/plug-in/plug-in.[ch]
|
* app/plug-in/plug-in.[ch]
|
||||||
* libgimp/gimp.c: added support for the init function in plug-ins.
|
* libgimp/gimp.c: added support for the init function in plug-ins
|
||||||
|
(fixes bug #66859).
|
||||||
|
|
||||||
2002-02-12 Michael Natterer <mitch@gimp.org>
|
2002-02-12 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
|
|
|
@ -40,11 +40,11 @@
|
||||||
|
|
||||||
GType gimp_interpolation_type_get_type (void) G_GNUC_CONST;
|
GType gimp_interpolation_type_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
typedef enum
|
typedef enum /*< pdb-skip >*/
|
||||||
{
|
{
|
||||||
GIMP_LINEAR_INTERPOLATION,
|
GIMP_INTERPOLATION_NONE,
|
||||||
GIMP_CUBIC_INTERPOLATION,
|
GIMP_INTERPOLATION_LINEAR,
|
||||||
GIMP_NEAREST_NEIGHBOR_INTERPOLATION
|
GIMP_INTERPOLATION_CUBIC
|
||||||
} GimpInterpolationType;
|
} GimpInterpolationType;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ gimp_core_config_class_init (GimpCoreConfigClass *klass)
|
||||||
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_INTERPOLATION_TYPE,
|
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_INTERPOLATION_TYPE,
|
||||||
"interpolation-type",
|
"interpolation-type",
|
||||||
GIMP_TYPE_INTERPOLATION_TYPE,
|
GIMP_TYPE_INTERPOLATION_TYPE,
|
||||||
GIMP_LINEAR_INTERPOLATION);
|
GIMP_INTERPOLATION_LINEAR);
|
||||||
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PLUG_IN_PATH,
|
GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_PLUG_IN_PATH,
|
||||||
"plug-in-path",
|
"plug-in-path",
|
||||||
gimp_config_build_plug_in_path ("plug-ins"));
|
gimp_config_build_plug_in_path ("plug-ins"));
|
||||||
|
|
|
@ -124,9 +124,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
|
|
||||||
/* turn interpolation off for simple transformations (e.g. rot90) */
|
/* turn interpolation off for simple transformations (e.g. rot90) */
|
||||||
if (gimp_matrix3_is_simple (matrix))
|
if (gimp_matrix3_is_simple (matrix))
|
||||||
{
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the background color */
|
/* Get the background color */
|
||||||
gimp_image_get_background (gimage, drawable, bg_col);
|
gimp_image_get_background (gimage, drawable, bg_col);
|
||||||
|
@ -144,8 +142,8 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
case GIMP_INDEXED:
|
case GIMP_INDEXED:
|
||||||
bg_col[ALPHA_I_PIX] = TRANSPARENT_OPACITY;
|
bg_col[ALPHA_I_PIX] = TRANSPARENT_OPACITY;
|
||||||
alpha = ALPHA_I_PIX;
|
alpha = ALPHA_I_PIX;
|
||||||
/* If the gimage is indexed color, ignore smoothing value */
|
/* If the gimage is indexed color, ignore interpolation value */
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
|
@ -233,18 +231,18 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
/* initialise the pixel_surround accessor */
|
/* initialise the pixel_surround accessor */
|
||||||
switch (interpolation_type)
|
switch (interpolation_type)
|
||||||
{
|
{
|
||||||
case GIMP_CUBIC_INTERPOLATION:
|
case GIMP_INTERPOLATION_NONE:
|
||||||
|
/* not actually useful, keeps the code cleaner */
|
||||||
|
pixel_surround_init (&surround, float_tiles, 1, 1, bg_col);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GIMP_INTERPOLATION_CUBIC:
|
||||||
pixel_surround_init (&surround, float_tiles, 4, 4, bg_col);
|
pixel_surround_init (&surround, float_tiles, 4, 4, bg_col);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_LINEAR_INTERPOLATION:
|
case GIMP_INTERPOLATION_LINEAR:
|
||||||
pixel_surround_init (&surround, float_tiles, 2, 2, bg_col);
|
pixel_surround_init (&surround, float_tiles, 2, 2, bg_col);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_NEAREST_NEIGHBOR_INTERPOLATION:
|
|
||||||
/* not actually useful, keeps the code cleaner */
|
|
||||||
pixel_surround_init (&surround, float_tiles, 1, 1, bg_col);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
width = tile_manager_width (tiles);
|
width = tile_manager_width (tiles);
|
||||||
|
@ -294,7 +292,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
|
|
||||||
switch (interpolation_type)
|
switch (interpolation_type)
|
||||||
{
|
{
|
||||||
case GIMP_CUBIC_INTERPOLATION:
|
case GIMP_INTERPOLATION_CUBIC:
|
||||||
/* ttx & tty are the subpixel coordinates of the point in
|
/* ttx & tty are the subpixel coordinates of the point in
|
||||||
* the original selection's floating buffer.
|
* the original selection's floating buffer.
|
||||||
* We need the four integer pixel coords around them:
|
* We need the four integer pixel coords around them:
|
||||||
|
@ -391,7 +389,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_LINEAR_INTERPOLATION:
|
case GIMP_INTERPOLATION_LINEAR:
|
||||||
itx = floor (ttx);
|
itx = floor (ttx);
|
||||||
ity = floor (tty);
|
ity = floor (tty);
|
||||||
|
|
||||||
|
@ -477,7 +475,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_NEAREST_NEIGHBOR_INTERPOLATION:
|
case GIMP_INTERPOLATION_NONE:
|
||||||
itx = floor (ttx);
|
itx = floor (ttx);
|
||||||
ity = floor (tty);
|
ity = floor (tty);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ gimp_core_config_init (Gimp *gimp)
|
||||||
|
|
||||||
gimp->config = g_new0 (GimpCoreConfig, 1);
|
gimp->config = g_new0 (GimpCoreConfig, 1);
|
||||||
|
|
||||||
gimp->config->interpolation_type = GIMP_LINEAR_INTERPOLATION;
|
gimp->config->interpolation_type = GIMP_INTERPOLATION_LINEAR;
|
||||||
|
|
||||||
gimp->config->tool_plug_in_path = NULL;
|
gimp->config->tool_plug_in_path = NULL;
|
||||||
gimp->config->plug_in_path = NULL;
|
gimp->config->plug_in_path = NULL;
|
||||||
|
|
|
@ -124,9 +124,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
|
|
||||||
/* turn interpolation off for simple transformations (e.g. rot90) */
|
/* turn interpolation off for simple transformations (e.g. rot90) */
|
||||||
if (gimp_matrix3_is_simple (matrix))
|
if (gimp_matrix3_is_simple (matrix))
|
||||||
{
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the background color */
|
/* Get the background color */
|
||||||
gimp_image_get_background (gimage, drawable, bg_col);
|
gimp_image_get_background (gimage, drawable, bg_col);
|
||||||
|
@ -144,8 +142,8 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
case GIMP_INDEXED:
|
case GIMP_INDEXED:
|
||||||
bg_col[ALPHA_I_PIX] = TRANSPARENT_OPACITY;
|
bg_col[ALPHA_I_PIX] = TRANSPARENT_OPACITY;
|
||||||
alpha = ALPHA_I_PIX;
|
alpha = ALPHA_I_PIX;
|
||||||
/* If the gimage is indexed color, ignore smoothing value */
|
/* If the gimage is indexed color, ignore interpolation value */
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
|
@ -233,18 +231,18 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
/* initialise the pixel_surround accessor */
|
/* initialise the pixel_surround accessor */
|
||||||
switch (interpolation_type)
|
switch (interpolation_type)
|
||||||
{
|
{
|
||||||
case GIMP_CUBIC_INTERPOLATION:
|
case GIMP_INTERPOLATION_NONE:
|
||||||
|
/* not actually useful, keeps the code cleaner */
|
||||||
|
pixel_surround_init (&surround, float_tiles, 1, 1, bg_col);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GIMP_INTERPOLATION_CUBIC:
|
||||||
pixel_surround_init (&surround, float_tiles, 4, 4, bg_col);
|
pixel_surround_init (&surround, float_tiles, 4, 4, bg_col);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_LINEAR_INTERPOLATION:
|
case GIMP_INTERPOLATION_LINEAR:
|
||||||
pixel_surround_init (&surround, float_tiles, 2, 2, bg_col);
|
pixel_surround_init (&surround, float_tiles, 2, 2, bg_col);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_NEAREST_NEIGHBOR_INTERPOLATION:
|
|
||||||
/* not actually useful, keeps the code cleaner */
|
|
||||||
pixel_surround_init (&surround, float_tiles, 1, 1, bg_col);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
width = tile_manager_width (tiles);
|
width = tile_manager_width (tiles);
|
||||||
|
@ -294,7 +292,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
|
|
||||||
switch (interpolation_type)
|
switch (interpolation_type)
|
||||||
{
|
{
|
||||||
case GIMP_CUBIC_INTERPOLATION:
|
case GIMP_INTERPOLATION_CUBIC:
|
||||||
/* ttx & tty are the subpixel coordinates of the point in
|
/* ttx & tty are the subpixel coordinates of the point in
|
||||||
* the original selection's floating buffer.
|
* the original selection's floating buffer.
|
||||||
* We need the four integer pixel coords around them:
|
* We need the four integer pixel coords around them:
|
||||||
|
@ -391,7 +389,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_LINEAR_INTERPOLATION:
|
case GIMP_INTERPOLATION_LINEAR:
|
||||||
itx = floor (ttx);
|
itx = floor (ttx);
|
||||||
ity = floor (tty);
|
ity = floor (tty);
|
||||||
|
|
||||||
|
@ -477,7 +475,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_NEAREST_NEIGHBOR_INTERPOLATION:
|
case GIMP_INTERPOLATION_NONE:
|
||||||
itx = floor (ttx);
|
itx = floor (ttx);
|
||||||
ity = floor (tty);
|
ity = floor (tty);
|
||||||
|
|
||||||
|
|
|
@ -918,7 +918,7 @@ gimp_layer_scale_lowlevel (GimpLayer *layer,
|
||||||
*/
|
*/
|
||||||
if (GIMP_IMAGE_TYPE_IS_INDEXED (GIMP_DRAWABLE (layer)->type))
|
if (GIMP_IMAGE_TYPE_IS_INDEXED (GIMP_DRAWABLE (layer)->type))
|
||||||
{
|
{
|
||||||
scale_region (&srcPR, &destPR, GIMP_NEAREST_NEIGHBOR_INTERPOLATION);
|
scale_region (&srcPR, &destPR, GIMP_INTERPOLATION_NONE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -2536,11 +2536,11 @@ preferences_dialog_create (Gimp *gimp)
|
||||||
GINT_TO_POINTER (gimp->config->interpolation_type),
|
GINT_TO_POINTER (gimp->config->interpolation_type),
|
||||||
|
|
||||||
_("Nearest Neighbor (Fastest)"),
|
_("Nearest Neighbor (Fastest)"),
|
||||||
GINT_TO_POINTER (GIMP_NEAREST_NEIGHBOR_INTERPOLATION), NULL,
|
GINT_TO_POINTER (GIMP_INTERPOLATION_NONE), NULL,
|
||||||
_("Linear"),
|
_("Linear"),
|
||||||
GINT_TO_POINTER (GIMP_LINEAR_INTERPOLATION), NULL,
|
GINT_TO_POINTER (GIMP_INTERPOLATION_LINEAR), NULL,
|
||||||
_("Cubic (Slowest & Best)"),
|
_("Cubic (Slowest & Best)"),
|
||||||
GINT_TO_POINTER (GIMP_CUBIC_INTERPOLATION), NULL,
|
GINT_TO_POINTER (GIMP_INTERPOLATION_CUBIC), NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
|
|
@ -674,15 +674,15 @@ resize_widget_new (GimpImage *gimage,
|
||||||
GINT_TO_POINTER (resize->interpolation),
|
GINT_TO_POINTER (resize->interpolation),
|
||||||
|
|
||||||
_("Nearest Neighbor (Fastest)"),
|
_("Nearest Neighbor (Fastest)"),
|
||||||
GINT_TO_POINTER (GIMP_NEAREST_NEIGHBOR_INTERPOLATION),
|
GINT_TO_POINTER (GIMP_INTERPOLATION_NONE),
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
_("Linear"),
|
_("Linear"),
|
||||||
GINT_TO_POINTER (GIMP_LINEAR_INTERPOLATION),
|
GINT_TO_POINTER (GIMP_INTERPOLATION_LINEAR),
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
_("Cubic (Slowest & Best)"),
|
_("Cubic (Slowest & Best)"),
|
||||||
GINT_TO_POINTER (GIMP_CUBIC_INTERPOLATION),
|
GINT_TO_POINTER (GIMP_INTERPOLATION_CUBIC),
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
16
app/gimprc.c
16
app/gimprc.c
|
@ -1266,12 +1266,12 @@ parse_interpolation_type (gpointer val1p,
|
||||||
return ERROR;
|
return ERROR;
|
||||||
token = get_next_token ();
|
token = get_next_token ();
|
||||||
|
|
||||||
if (strcmp (token_sym, "nearest-neighbor") == 0)
|
if (strcmp (token_sym, "none") == 0)
|
||||||
*typep = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
*typep = GIMP_INTERPOLATION_NONE;
|
||||||
else if (strcmp (token_sym, "linear") == 0)
|
else if (strcmp (token_sym, "linear") == 0)
|
||||||
*typep = GIMP_LINEAR_INTERPOLATION;
|
*typep = GIMP_INTERPOLATION_LINEAR;
|
||||||
else if (strcmp (token_sym, "cubic") == 0)
|
else if (strcmp (token_sym, "cubic") == 0)
|
||||||
*typep = GIMP_CUBIC_INTERPOLATION;
|
*typep = GIMP_INTERPOLATION_CUBIC;
|
||||||
else
|
else
|
||||||
return ERROR;
|
return ERROR;
|
||||||
|
|
||||||
|
@ -2583,12 +2583,12 @@ interpolation_type_to_str (gpointer val1p,
|
||||||
type = *((GimpInterpolationType *)val1p);
|
type = *((GimpInterpolationType *)val1p);
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case GIMP_LINEAR_INTERPOLATION:
|
case GIMP_INTERPOLATION_NONE:
|
||||||
|
return g_strdup ("none");
|
||||||
|
case GIMP_INTERPOLATION_LINEAR:
|
||||||
return g_strdup ("linear");
|
return g_strdup ("linear");
|
||||||
case GIMP_CUBIC_INTERPOLATION:
|
case GIMP_INTERPOLATION_CUBIC:
|
||||||
return g_strdup ("cubic");
|
return g_strdup ("cubic");
|
||||||
case GIMP_NEAREST_NEIGHBOR_INTERPOLATION:
|
|
||||||
return g_strdup ("nearest-neighbor");
|
|
||||||
default:
|
default:
|
||||||
return g_strdup ("bad interpolation type");
|
return g_strdup ("bad interpolation type");
|
||||||
}
|
}
|
||||||
|
|
|
@ -2536,11 +2536,11 @@ preferences_dialog_create (Gimp *gimp)
|
||||||
GINT_TO_POINTER (gimp->config->interpolation_type),
|
GINT_TO_POINTER (gimp->config->interpolation_type),
|
||||||
|
|
||||||
_("Nearest Neighbor (Fastest)"),
|
_("Nearest Neighbor (Fastest)"),
|
||||||
GINT_TO_POINTER (GIMP_NEAREST_NEIGHBOR_INTERPOLATION), NULL,
|
GINT_TO_POINTER (GIMP_INTERPOLATION_NONE), NULL,
|
||||||
_("Linear"),
|
_("Linear"),
|
||||||
GINT_TO_POINTER (GIMP_LINEAR_INTERPOLATION), NULL,
|
GINT_TO_POINTER (GIMP_INTERPOLATION_LINEAR), NULL,
|
||||||
_("Cubic (Slowest & Best)"),
|
_("Cubic (Slowest & Best)"),
|
||||||
GINT_TO_POINTER (GIMP_CUBIC_INTERPOLATION), NULL,
|
GINT_TO_POINTER (GIMP_INTERPOLATION_CUBIC), NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
|
|
@ -674,15 +674,15 @@ resize_widget_new (GimpImage *gimage,
|
||||||
GINT_TO_POINTER (resize->interpolation),
|
GINT_TO_POINTER (resize->interpolation),
|
||||||
|
|
||||||
_("Nearest Neighbor (Fastest)"),
|
_("Nearest Neighbor (Fastest)"),
|
||||||
GINT_TO_POINTER (GIMP_NEAREST_NEIGHBOR_INTERPOLATION),
|
GINT_TO_POINTER (GIMP_INTERPOLATION_NONE),
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
_("Linear"),
|
_("Linear"),
|
||||||
GINT_TO_POINTER (GIMP_LINEAR_INTERPOLATION),
|
GINT_TO_POINTER (GIMP_INTERPOLATION_LINEAR),
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
_("Cubic (Slowest & Best)"),
|
_("Cubic (Slowest & Best)"),
|
||||||
GINT_TO_POINTER (GIMP_CUBIC_INTERPOLATION),
|
GINT_TO_POINTER (GIMP_INTERPOLATION_CUBIC),
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -2803,7 +2803,7 @@ expand_line (gdouble *dest,
|
||||||
each x */
|
each x */
|
||||||
switch(interp)
|
switch(interp)
|
||||||
{
|
{
|
||||||
case GIMP_CUBIC_INTERPOLATION:
|
case GIMP_INTERPOLATION_CUBIC:
|
||||||
for (x = 0; x < width; x++)
|
for (x = 0; x < width; x++)
|
||||||
{
|
{
|
||||||
src_col = ((int)((x) * ratio + 2.0 - 0.5)) - 2;
|
src_col = ((int)((x) * ratio + 2.0 - 0.5)) - 2;
|
||||||
|
@ -2817,7 +2817,7 @@ expand_line (gdouble *dest,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_LINEAR_INTERPOLATION:
|
case GIMP_INTERPOLATION_LINEAR:
|
||||||
for (x = 0; x < width; x++)
|
for (x = 0; x < width; x++)
|
||||||
{
|
{
|
||||||
src_col = ((int)((x) * ratio + 2.0 - 0.5)) - 2;
|
src_col = ((int)((x) * ratio + 2.0 - 0.5)) - 2;
|
||||||
|
@ -2831,8 +2831,8 @@ expand_line (gdouble *dest,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_NEAREST_NEIGHBOR_INTERPOLATION:
|
case GIMP_INTERPOLATION_NONE:
|
||||||
g_error("sampling_type can't be GIMP_NEAREST_NEIGHBOR_INTERPOLATION");
|
g_assert_not_reached ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2942,7 +2942,7 @@ scale_region (PixelRegion *srcPR,
|
||||||
gint old_y = -4, new_y;
|
gint old_y = -4, new_y;
|
||||||
gint x, y;
|
gint x, y;
|
||||||
|
|
||||||
if (interpolation_type == GIMP_NEAREST_NEIGHBOR_INTERPOLATION)
|
if (interpolation_type == GIMP_INTERPOLATION_NONE)
|
||||||
{
|
{
|
||||||
scale_region_no_resample (srcPR, destPR);
|
scale_region_no_resample (srcPR, destPR);
|
||||||
return;
|
return;
|
||||||
|
@ -3031,7 +3031,7 @@ scale_region (PixelRegion *srcPR,
|
||||||
}
|
}
|
||||||
switch(interpolation_type)
|
switch(interpolation_type)
|
||||||
{
|
{
|
||||||
case GIMP_CUBIC_INTERPOLATION:
|
case GIMP_INTERPOLATION_CUBIC:
|
||||||
{
|
{
|
||||||
double p0, p1, p2, p3;
|
double p0, p1, p2, p3;
|
||||||
double dy = ((y) * y_rat - .5) - new_y;
|
double dy = ((y) * y_rat - .5) - new_y;
|
||||||
|
@ -3044,7 +3044,7 @@ scale_region (PixelRegion *srcPR,
|
||||||
p2 * src[2][x] + p3 * src[3][x];
|
p2 * src[2][x] + p3 * src[3][x];
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case GIMP_LINEAR_INTERPOLATION:
|
case GIMP_INTERPOLATION_LINEAR:
|
||||||
{
|
{
|
||||||
double idy = ((y) * y_rat - 0.5) - new_y;
|
double idy = ((y) * y_rat - 0.5) - new_y;
|
||||||
double dy = 1.0 - idy;
|
double dy = 1.0 - idy;
|
||||||
|
@ -3052,9 +3052,8 @@ scale_region (PixelRegion *srcPR,
|
||||||
accum[x] = dy * src[1][x] + idy * src[2][x];
|
accum[x] = dy * src[1][x] + idy * src[2][x];
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case GIMP_NEAREST_NEIGHBOR_INTERPOLATION:
|
case GIMP_INTERPOLATION_NONE:
|
||||||
g_error ("sampling_type can't be "
|
g_assert_not_reached ();
|
||||||
"GIMP_NEAREST_NEIGHBOR_INTERPOLATION");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,7 @@ perspective_invoker (Gimp *gimp,
|
||||||
if (interpolation)
|
if (interpolation)
|
||||||
interpolation_type = gimp->config->interpolation_type;
|
interpolation_type = gimp->config->interpolation_type;
|
||||||
else
|
else
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
|
|
||||||
/* Perspective the selection */
|
/* Perspective the selection */
|
||||||
success = gimp_drawable_transform_affine (drawable,
|
success = gimp_drawable_transform_affine (drawable,
|
||||||
|
@ -313,7 +313,7 @@ rotate_invoker (Gimp *gimp,
|
||||||
if (interpolation)
|
if (interpolation)
|
||||||
interpolation_type = gimp->config->interpolation_type;
|
interpolation_type = gimp->config->interpolation_type;
|
||||||
else
|
else
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
|
|
||||||
/* Rotate the selection */
|
/* Rotate the selection */
|
||||||
success = gimp_drawable_transform_affine (drawable,
|
success = gimp_drawable_transform_affine (drawable,
|
||||||
|
@ -420,7 +420,7 @@ scale_invoker (Gimp *gimp,
|
||||||
if (interpolation)
|
if (interpolation)
|
||||||
interpolation_type = gimp->config->interpolation_type;
|
interpolation_type = gimp->config->interpolation_type;
|
||||||
else
|
else
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
|
|
||||||
/* Scale the selection */
|
/* Scale the selection */
|
||||||
success = gimp_drawable_transform_affine (drawable,
|
success = gimp_drawable_transform_affine (drawable,
|
||||||
|
@ -545,7 +545,7 @@ shear_invoker (Gimp *gimp,
|
||||||
if (interpolation)
|
if (interpolation)
|
||||||
interpolation_type = gimp->config->interpolation_type;
|
interpolation_type = gimp->config->interpolation_type;
|
||||||
else
|
else
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
|
|
||||||
/* Shear the selection */
|
/* Shear the selection */
|
||||||
success = gimp_drawable_transform_affine (drawable,
|
success = gimp_drawable_transform_affine (drawable,
|
||||||
|
@ -662,7 +662,7 @@ transform_2d_invoker (Gimp *gimp,
|
||||||
if (interpolation)
|
if (interpolation)
|
||||||
interpolation_type = gimp->config->interpolation_type;
|
interpolation_type = gimp->config->interpolation_type;
|
||||||
else
|
else
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
|
|
||||||
/* Transform the selection */
|
/* Transform the selection */
|
||||||
success = gimp_drawable_transform_affine (drawable,
|
success = gimp_drawable_transform_affine (drawable,
|
||||||
|
|
|
@ -126,15 +126,15 @@ transform_options_init (TransformOptions *options,
|
||||||
GINT_TO_POINTER (options->interpolation),
|
GINT_TO_POINTER (options->interpolation),
|
||||||
|
|
||||||
_("None (Fastest)"),
|
_("None (Fastest)"),
|
||||||
GINT_TO_POINTER (GIMP_NEAREST_NEIGHBOR_INTERPOLATION),
|
GINT_TO_POINTER (GIMP_INTERPOLATION_NONE),
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
_("Linear"),
|
_("Linear"),
|
||||||
GINT_TO_POINTER (GIMP_LINEAR_INTERPOLATION),
|
GINT_TO_POINTER (GIMP_INTERPOLATION_LINEAR),
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
_("Cubic (Slowest & Best)"),
|
_("Cubic (Slowest & Best)"),
|
||||||
GINT_TO_POINTER (GIMP_CUBIC_INTERPOLATION),
|
GINT_TO_POINTER (GIMP_INTERPOLATION_CUBIC),
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -126,15 +126,15 @@ transform_options_init (TransformOptions *options,
|
||||||
GINT_TO_POINTER (options->interpolation),
|
GINT_TO_POINTER (options->interpolation),
|
||||||
|
|
||||||
_("None (Fastest)"),
|
_("None (Fastest)"),
|
||||||
GINT_TO_POINTER (GIMP_NEAREST_NEIGHBOR_INTERPOLATION),
|
GINT_TO_POINTER (GIMP_INTERPOLATION_NONE),
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
_("Linear"),
|
_("Linear"),
|
||||||
GINT_TO_POINTER (GIMP_LINEAR_INTERPOLATION),
|
GINT_TO_POINTER (GIMP_INTERPOLATION_LINEAR),
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
_("Cubic (Slowest & Best)"),
|
_("Cubic (Slowest & Best)"),
|
||||||
GINT_TO_POINTER (GIMP_CUBIC_INTERPOLATION),
|
GINT_TO_POINTER (GIMP_INTERPOLATION_CUBIC),
|
||||||
NULL,
|
NULL,
|
||||||
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -167,13 +167,6 @@ typedef enum
|
||||||
GIMP_INDEXEDA_IMAGE
|
GIMP_INDEXEDA_IMAGE
|
||||||
} GimpImageType;
|
} GimpImageType;
|
||||||
|
|
||||||
typedef enum
|
|
||||||
{
|
|
||||||
GIMP_LINEAR_INTERPOLATION,
|
|
||||||
GIMP_CUBIC_INTERPOLATION,
|
|
||||||
GIMP_NEAREST_NEIGHBOR_INTERPOLATION
|
|
||||||
} GimpInterpolationType;
|
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
GIMP_NORMAL_MODE,
|
GIMP_NORMAL_MODE,
|
||||||
|
|
|
@ -115,10 +115,6 @@ init_generated_constants (void)
|
||||||
setvar (cintern ("INDEXED-IMAGE"), flocons (4), NIL);
|
setvar (cintern ("INDEXED-IMAGE"), flocons (4), NIL);
|
||||||
setvar (cintern ("INDEXEDA-IMAGE"), flocons (5), NIL);
|
setvar (cintern ("INDEXEDA-IMAGE"), flocons (5), NIL);
|
||||||
|
|
||||||
setvar (cintern ("LINEAR-INTERPOLATION"), flocons (0), NIL);
|
|
||||||
setvar (cintern ("CUBIC-INTERPOLATION"), flocons (1), NIL);
|
|
||||||
setvar (cintern ("NEAREST-NEIGHBOR-INTERPOLATION"), flocons (2), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("NORMAL-MODE"), flocons (0), NIL);
|
setvar (cintern ("NORMAL-MODE"), flocons (0), NIL);
|
||||||
setvar (cintern ("DISSOLVE-MODE"), flocons (1), NIL);
|
setvar (cintern ("DISSOLVE-MODE"), flocons (1), NIL);
|
||||||
setvar (cintern ("BEHIND-MODE"), flocons (2), NIL);
|
setvar (cintern ("BEHIND-MODE"), flocons (2), NIL);
|
||||||
|
|
|
@ -107,15 +107,6 @@ package Gimp::CodeGen::enums;
|
||||||
GIMP_STACK_TRACE_QUERY => '1',
|
GIMP_STACK_TRACE_QUERY => '1',
|
||||||
GIMP_STACK_TRACE_ALWAYS => '2' }
|
GIMP_STACK_TRACE_ALWAYS => '2' }
|
||||||
},
|
},
|
||||||
GimpInterpolationType =>
|
|
||||||
{ contig => 1,
|
|
||||||
header => 'base/base-enums.h',
|
|
||||||
symbols => [ qw(GIMP_LINEAR_INTERPOLATION GIMP_CUBIC_INTERPOLATION
|
|
||||||
GIMP_NEAREST_NEIGHBOR_INTERPOLATION) ],
|
|
||||||
mapping => { GIMP_LINEAR_INTERPOLATION => '0',
|
|
||||||
GIMP_CUBIC_INTERPOLATION => '1',
|
|
||||||
GIMP_NEAREST_NEIGHBOR_INTERPOLATION => '2' }
|
|
||||||
},
|
|
||||||
GimpLayerModeEffects =>
|
GimpLayerModeEffects =>
|
||||||
{ contig => 1,
|
{ contig => 1,
|
||||||
header => 'base/base-enums.h',
|
header => 'base/base-enums.h',
|
||||||
|
|
|
@ -146,7 +146,7 @@ HELP
|
||||||
if (interpolation)
|
if (interpolation)
|
||||||
interpolation_type = gimp->config->interpolation_type;
|
interpolation_type = gimp->config->interpolation_type;
|
||||||
else
|
else
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
|
|
||||||
/* Perspective the selection */
|
/* Perspective the selection */
|
||||||
success = gimp_drawable_transform_affine (drawable,
|
success = gimp_drawable_transform_affine (drawable,
|
||||||
|
@ -202,7 +202,7 @@ HELP
|
||||||
if (interpolation)
|
if (interpolation)
|
||||||
interpolation_type = gimp->config->interpolation_type;
|
interpolation_type = gimp->config->interpolation_type;
|
||||||
else
|
else
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
|
|
||||||
/* Rotate the selection */
|
/* Rotate the selection */
|
||||||
success = gimp_drawable_transform_affine (drawable,
|
success = gimp_drawable_transform_affine (drawable,
|
||||||
|
@ -273,7 +273,7 @@ HELP
|
||||||
if (interpolation)
|
if (interpolation)
|
||||||
interpolation_type = gimp->config->interpolation_type;
|
interpolation_type = gimp->config->interpolation_type;
|
||||||
else
|
else
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
|
|
||||||
/* Scale the selection */
|
/* Scale the selection */
|
||||||
success = gimp_drawable_transform_affine (drawable,
|
success = gimp_drawable_transform_affine (drawable,
|
||||||
|
@ -344,7 +344,7 @@ HELP
|
||||||
if (interpolation)
|
if (interpolation)
|
||||||
interpolation_type = gimp->config->interpolation_type;
|
interpolation_type = gimp->config->interpolation_type;
|
||||||
else
|
else
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
|
|
||||||
/* Shear the selection */
|
/* Shear the selection */
|
||||||
success = gimp_drawable_transform_affine (drawable,
|
success = gimp_drawable_transform_affine (drawable,
|
||||||
|
@ -415,7 +415,7 @@ HELP
|
||||||
if (interpolation)
|
if (interpolation)
|
||||||
interpolation_type = gimp->config->interpolation_type;
|
interpolation_type = gimp->config->interpolation_type;
|
||||||
else
|
else
|
||||||
interpolation_type = GIMP_NEAREST_NEIGHBOR_INTERPOLATION;
|
interpolation_type = GIMP_INTERPOLATION_NONE;
|
||||||
|
|
||||||
/* Transform the selection */
|
/* Transform the selection */
|
||||||
success = gimp_drawable_transform_affine (drawable,
|
success = gimp_drawable_transform_affine (drawable,
|
||||||
|
|
Loading…
Reference in New Issue