mirror of https://github.com/GNOME/gimp.git
added new "supersample" property to GimpTransformOptions and added
2004-03-13 Raphael Quinet <quinet@gamers.org> * app/tools/gimptransformoptions.[ch]: added new "supersample" property to GimpTransformOptions and added corresponding check button in the option dialog for the transform tools. * app/core/gimpdrawable-transform.[ch], * app/core/gimpdrawable.c, * app/tools/gimptransformtool.c: new "gboolean supersample" parameter added to gimp_drawable_transform_tiles_affine() and gimp_drawable_transform_affine(). * tools/pdbgen/pdb/transform_tools.pdb: ditto. For the PDB calls, the supersample parameter is set to FALSE for "rotate" and "shear" and set to TRUE for "perspective", "scale" and "transform_2d". * app/pdb/transform_tools_cmds.c: regenerated. The new "supersample" option lets the user decide if the transformations should use supersampling (RECURSION_LEVEL 3) or not. This fixes both bug #136702 and bug #109817. Hopefully for good, this time.
This commit is contained in:
parent
40825ad048
commit
59dfdac9b1
23
ChangeLog
23
ChangeLog
|
@ -1,3 +1,26 @@
|
|||
2004-03-13 Raphaël Quinet <quinet@gamers.org>
|
||||
|
||||
* app/tools/gimptransformoptions.[ch]: added new "supersample"
|
||||
property to GimpTransformOptions and added corresponding check
|
||||
button in the option dialog for the transform tools.
|
||||
|
||||
* app/core/gimpdrawable-transform.[ch],
|
||||
* app/core/gimpdrawable.c,
|
||||
* app/tools/gimptransformtool.c: new "gboolean supersample"
|
||||
parameter added to gimp_drawable_transform_tiles_affine() and
|
||||
gimp_drawable_transform_affine().
|
||||
|
||||
* tools/pdbgen/pdb/transform_tools.pdb: ditto. For the PDB calls,
|
||||
the supersample parameter is set to FALSE for "rotate" and "shear"
|
||||
and set to TRUE for "perspective", "scale" and "transform_2d".
|
||||
|
||||
* app/pdb/transform_tools_cmds.c: regenerated.
|
||||
|
||||
The new "supersample" option lets the user decide if the
|
||||
transformations should use supersampling (RECURSION_LEVEL 3) or
|
||||
not. This fixes both bug #136702 and bug #109817. Hopefully for
|
||||
good, this time.
|
||||
|
||||
2004-03-13 Raphaël Quinet <quinet@gamers.org>
|
||||
|
||||
* app/tools/gimptexttool.c (gimp_text_tool_set_layer): added
|
||||
|
|
|
@ -55,8 +55,7 @@
|
|||
|
||||
/* recursion level should be a usersettable parameter,
|
||||
3 seems to be a reasonable default */
|
||||
/* temporarily set to 0 - http://bugzilla.gnome.org/show_bug.cgi?id=136702 */
|
||||
#define RECURSION_LEVEL 0
|
||||
#define RECURSION_LEVEL 3
|
||||
|
||||
|
||||
/* forward function prototypes */
|
||||
|
@ -104,6 +103,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
|||
const GimpMatrix3 *matrix,
|
||||
GimpTransformDirection direction,
|
||||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
|
@ -373,7 +373,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
|||
{
|
||||
guchar color[MAX_CHANNELS];
|
||||
|
||||
if (RECURSION_LEVEL &&
|
||||
if (supersample &&
|
||||
supersample_dtest (u[1], v[1], u[2], v[2],
|
||||
u[3], v[3], u[4], v[4]))
|
||||
{
|
||||
|
@ -807,6 +807,7 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
|
|||
const GimpMatrix3 *matrix,
|
||||
GimpTransformDirection direction,
|
||||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gboolean clip_result)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
|
@ -841,6 +842,7 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
|
|||
matrix,
|
||||
GIMP_TRANSFORM_FORWARD,
|
||||
interpolation_type,
|
||||
supersample,
|
||||
FALSE,
|
||||
NULL, NULL);
|
||||
|
||||
|
|
|
@ -55,8 +55,7 @@
|
|||
|
||||
/* recursion level should be a usersettable parameter,
|
||||
3 seems to be a reasonable default */
|
||||
/* temporarily set to 0 - http://bugzilla.gnome.org/show_bug.cgi?id=136702 */
|
||||
#define RECURSION_LEVEL 0
|
||||
#define RECURSION_LEVEL 3
|
||||
|
||||
|
||||
/* forward function prototypes */
|
||||
|
@ -104,6 +103,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
|||
const GimpMatrix3 *matrix,
|
||||
GimpTransformDirection direction,
|
||||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
|
@ -373,7 +373,7 @@ gimp_drawable_transform_tiles_affine (GimpDrawable *drawable,
|
|||
{
|
||||
guchar color[MAX_CHANNELS];
|
||||
|
||||
if (RECURSION_LEVEL &&
|
||||
if (supersample &&
|
||||
supersample_dtest (u[1], v[1], u[2], v[2],
|
||||
u[3], v[3], u[4], v[4]))
|
||||
{
|
||||
|
@ -807,6 +807,7 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
|
|||
const GimpMatrix3 *matrix,
|
||||
GimpTransformDirection direction,
|
||||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gboolean clip_result)
|
||||
{
|
||||
GimpImage *gimage;
|
||||
|
@ -841,6 +842,7 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
|
|||
matrix,
|
||||
GIMP_TRANSFORM_FORWARD,
|
||||
interpolation_type,
|
||||
supersample,
|
||||
FALSE,
|
||||
NULL, NULL);
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ TileManager * gimp_drawable_transform_tiles_affine (GimpDrawable *draw
|
|||
const GimpMatrix3 *matrix,
|
||||
GimpTransformDirection direction,
|
||||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
|
@ -57,6 +58,7 @@ gboolean gimp_drawable_transform_affine (GimpDrawable *draw
|
|||
const GimpMatrix3 *matrix,
|
||||
GimpTransformDirection direction,
|
||||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gboolean clip_result);
|
||||
gboolean gimp_drawable_transform_flip (GimpDrawable *drawable,
|
||||
GimpOrientationType flip_type);
|
||||
|
|
|
@ -96,6 +96,7 @@ static void gimp_drawable_transform (GimpItem *item,
|
|||
const GimpMatrix3 *matrix,
|
||||
GimpTransformDirection direction,
|
||||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data);
|
||||
|
@ -527,6 +528,7 @@ gimp_drawable_transform (GimpItem *item,
|
|||
const GimpMatrix3 *matrix,
|
||||
GimpTransformDirection direction,
|
||||
GimpInterpolationType interpolation_type,
|
||||
gboolean supersample,
|
||||
gboolean clip_result,
|
||||
GimpProgressFunc progress_callback,
|
||||
gpointer progress_data)
|
||||
|
@ -547,6 +549,7 @@ gimp_drawable_transform (GimpItem *item,
|
|||
drawable->tiles,
|
||||
matrix, direction,
|
||||
interpolation_type,
|
||||
supersample,
|
||||
clip_result,
|
||||
progress_callback,
|
||||
progress_data);
|
||||
|
|
|
@ -187,7 +187,8 @@ perspective_invoker (Gimp *gimp,
|
|||
/* Perspective the selection */
|
||||
success = gimp_drawable_transform_affine (drawable,
|
||||
&matrix, GIMP_TRANSFORM_FORWARD,
|
||||
interpolation_type, FALSE);
|
||||
interpolation_type, TRUE,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -320,7 +321,8 @@ rotate_invoker (Gimp *gimp,
|
|||
/* Rotate the selection */
|
||||
success = gimp_drawable_transform_affine (drawable,
|
||||
&matrix, GIMP_TRANSFORM_FORWARD,
|
||||
interpolation_type, FALSE);
|
||||
interpolation_type, FALSE,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -428,7 +430,8 @@ scale_invoker (Gimp *gimp,
|
|||
/* Scale the selection */
|
||||
success = gimp_drawable_transform_affine (drawable,
|
||||
&matrix, GIMP_TRANSFORM_FORWARD,
|
||||
interpolation_type, FALSE);
|
||||
interpolation_type, TRUE,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -547,7 +550,8 @@ shear_invoker (Gimp *gimp,
|
|||
/* Shear the selection */
|
||||
success = gimp_drawable_transform_affine (drawable,
|
||||
&matrix, GIMP_TRANSFORM_FORWARD,
|
||||
interpolation_type, FALSE);
|
||||
interpolation_type, FALSE,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -668,7 +672,8 @@ transform_2d_invoker (Gimp *gimp,
|
|||
/* Transform the selection */
|
||||
success = gimp_drawable_transform_affine (drawable,
|
||||
&matrix, GIMP_TRANSFORM_FORWARD,
|
||||
interpolation_type, FALSE);
|
||||
interpolation_type, TRUE,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ enum
|
|||
PROP_TYPE,
|
||||
PROP_DIRECTION,
|
||||
PROP_INTERPOLATION,
|
||||
PROP_SUPERSAMPLE,
|
||||
PROP_CLIP,
|
||||
PROP_GRID_TYPE,
|
||||
PROP_GRID_SIZE,
|
||||
|
@ -137,6 +138,10 @@ gimp_transform_options_class_init (GimpTransformOptionsClass *klass)
|
|||
GIMP_TYPE_INTERPOLATION_TYPE,
|
||||
GIMP_INTERPOLATION_LINEAR,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_SUPERSAMPLE,
|
||||
"supersample", NULL,
|
||||
FALSE,
|
||||
0);
|
||||
GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_CLIP,
|
||||
"clip", NULL,
|
||||
FALSE,
|
||||
|
@ -186,6 +191,9 @@ gimp_transform_options_set_property (GObject *object,
|
|||
case PROP_INTERPOLATION:
|
||||
options->interpolation = g_value_get_enum (value);
|
||||
break;
|
||||
case PROP_SUPERSAMPLE:
|
||||
options->supersample = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_CLIP:
|
||||
options->clip = g_value_get_boolean (value);
|
||||
break;
|
||||
|
@ -228,6 +236,9 @@ gimp_transform_options_get_property (GObject *object,
|
|||
case PROP_INTERPOLATION:
|
||||
g_value_set_enum (value, options->interpolation);
|
||||
break;
|
||||
case PROP_SUPERSAMPLE:
|
||||
g_value_set_boolean (value, options->supersample);
|
||||
break;
|
||||
case PROP_CLIP:
|
||||
g_value_set_boolean (value, options->clip);
|
||||
break;
|
||||
|
@ -315,6 +326,12 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
|
|||
gtk_box_pack_start (GTK_BOX (hbox), optionmenu, FALSE, FALSE, 0);
|
||||
gtk_widget_show (optionmenu);
|
||||
|
||||
/* the supersample toggle button */
|
||||
button = gimp_prop_check_button_new (config, "supersample",
|
||||
_("Supersample"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
gtk_widget_show (button);
|
||||
|
||||
/* the clip resulting image toggle button */
|
||||
button = gimp_prop_check_button_new (config, "clip", _("Clip Result"));
|
||||
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
|
||||
|
|
|
@ -41,6 +41,7 @@ struct _GimpTransformOptions
|
|||
GimpTransformType type;
|
||||
GimpTransformDirection direction;
|
||||
GimpInterpolationType interpolation;
|
||||
gboolean supersample;
|
||||
gboolean clip;
|
||||
GimpTransformGridType grid_type;
|
||||
gint grid_size;
|
||||
|
|
|
@ -848,6 +848,7 @@ gimp_transform_tool_real_transform (GimpTransformTool *tr_tool,
|
|||
&tr_tool->transform,
|
||||
options->direction,
|
||||
options->interpolation,
|
||||
options->supersample,
|
||||
clip_result,
|
||||
progress ?
|
||||
gimp_progress_update_and_flush :
|
||||
|
|
|
@ -152,7 +152,8 @@ HELP
|
|||
/* Perspective the selection */
|
||||
success = gimp_drawable_transform_affine (drawable,
|
||||
&matrix, GIMP_TRANSFORM_FORWARD,
|
||||
interpolation_type, FALSE);
|
||||
interpolation_type, TRUE,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
CODE
|
||||
|
@ -211,7 +212,8 @@ HELP
|
|||
/* Rotate the selection */
|
||||
success = gimp_drawable_transform_affine (drawable,
|
||||
&matrix, GIMP_TRANSFORM_FORWARD,
|
||||
interpolation_type, FALSE);
|
||||
interpolation_type, FALSE,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
CODE
|
||||
|
@ -284,7 +286,8 @@ HELP
|
|||
/* Scale the selection */
|
||||
success = gimp_drawable_transform_affine (drawable,
|
||||
&matrix, GIMP_TRANSFORM_FORWARD,
|
||||
interpolation_type, FALSE);
|
||||
interpolation_type, TRUE,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
CODE
|
||||
|
@ -350,7 +353,8 @@ HELP
|
|||
/* Shear the selection */
|
||||
success = gimp_drawable_transform_affine (drawable,
|
||||
&matrix, GIMP_TRANSFORM_FORWARD,
|
||||
interpolation_type, FALSE);
|
||||
interpolation_type, FALSE,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
CODE
|
||||
|
@ -425,7 +429,8 @@ HELP
|
|||
/* Transform the selection */
|
||||
success = gimp_drawable_transform_affine (drawable,
|
||||
&matrix, GIMP_TRANSFORM_FORWARD,
|
||||
interpolation_type, FALSE);
|
||||
interpolation_type, TRUE,
|
||||
FALSE);
|
||||
}
|
||||
}
|
||||
CODE
|
||||
|
|
Loading…
Reference in New Issue