app: Generic cage cleanup

This commit is contained in:
Alexia Death 2010-11-02 21:28:01 +02:00
parent f09f6dae06
commit 1ae2ad8566
3 changed files with 7 additions and 12 deletions

View File

@ -61,7 +61,9 @@ static void gimp_cage_config_set_property (GObject *obj
static void gimp_cage_config_compute_scaling_factor (GimpCageConfig *gcc);
static void gimp_cage_config_compute_edge_normal (GimpCageConfig *gcc);
/* FIXME: to debug only */
/*#define DEBUG_CAGE */
#ifdef DEBUG_CAGE
static void
print_cage (GimpCageConfig *gcc)
{
@ -78,7 +80,7 @@ print_cage (GimpCageConfig *gcc)
printf("bounding box: x: %d y: %d width: %d height: %d\n", bounding_box.x, bounding_box.y, bounding_box.width, bounding_box.height);
printf("done\n");
}
#endif
static void
gimp_cage_config_class_init (GimpCageConfigClass *klass)
@ -122,7 +124,6 @@ gimp_cage_config_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
/* GimpCageConfig *gcc = GIMP_CAGE_CONFIG (object); */
switch (property_id)
{
@ -139,7 +140,6 @@ gimp_cage_config_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
/* GimpCageConfig *gcc = GIMP_CAGE_CONFIG (object); */
switch (property_id)
{
@ -330,11 +330,6 @@ gimp_cage_config_reverse_cage_if_needed (GimpCageConfig *gcc)
if (sum > 0)
{
gimp_cage_config_reverse_cage (gcc);
printf("reverse the cage !\n");
}
else
{
printf("Cage OK !\n");
}
}
@ -358,7 +353,9 @@ gimp_cage_config_compute_scaling_factor (GimpCageConfig *gcc)
gcc->scaling_factor[i] = length_d / length;
}
#ifdef DEBUG_CAGE
print_cage (gcc);
#endif
}
static void

View File

@ -218,8 +218,6 @@ gimp_operation_cage_transform_process (GeglOperation *operation,
plain_color.x = (gint) config->cage_vertices[0].x;
plain_color.y = (gint) config->cage_vertices[0].y;
printf ("Color fill picked from (%f, %f)\n", plain_color.x, plain_color.y);
while (gegl_buffer_iterator_next (it))
{
/* iterate inside the roi */

View File

@ -157,7 +157,7 @@ gimp_cage_options_gui (GimpToolOptions *tool_options)
button = gimp_prop_check_button_new (config, "fill-plain-color",
_("Fill in background"));
_("Fill from first point"));
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);