mirror of https://github.com/GNOME/gimp.git
change name of gimp cage gegl op to gimp internal op.
This commit is contained in:
parent
023aa06883
commit
3d79167074
|
@ -59,9 +59,9 @@ gimp_operation_cage_coef_calc_class_init (GimpOperationCageCoefCalcClass *klass)
|
|||
GeglOperationClass *operation_class = GEGL_OPERATION_CLASS (klass);
|
||||
|
||||
/* FIXME: wrong categories and name, to appears in the gegl tool */
|
||||
operation_class->name = "gegl:cage_coef_calc";
|
||||
operation_class->categories = "color";
|
||||
operation_class->description = "GIMP cage transform";
|
||||
operation_class->name = "gimp:cage_coef_calc";
|
||||
operation_class->categories = "transform";
|
||||
operation_class->description = "GIMP cage transform coefficient calc";
|
||||
|
||||
operation_class->prepare = gimp_operation_cage_coef_calc_prepare;
|
||||
operation_class->get_bounding_box = gimp_operation_cage_coef_calc_get_bounding_box;
|
||||
|
|
|
@ -86,8 +86,8 @@ gimp_operation_cage_transform_class_init (GimpOperationCageTransformClass *klass
|
|||
object_class->finalize = gimp_operation_cage_transform_finalize;
|
||||
|
||||
/* FIXME: wrong categories and name, to appears in the gegl tool */
|
||||
operation_class->name = "gegl:cage_transform";
|
||||
operation_class->categories = "color";
|
||||
operation_class->name = "gimp:cage_transform";
|
||||
operation_class->categories = "transform";
|
||||
operation_class->description = "GIMP cage reverse transform";
|
||||
|
||||
operation_class->prepare = gimp_operation_cage_transform_prepare;
|
||||
|
@ -292,12 +292,12 @@ gimp_operation_cage_transform_interpolate_source_coords_recurs (GimpOperationCag
|
|||
if (p2_d.y > roi->height) return;
|
||||
if (p3_d.y > roi->height) return;
|
||||
|
||||
if (p1_d.x < 0) return;
|
||||
if (p2_d.x < 0) return;
|
||||
if (p3_d.x < 0) return;
|
||||
if (p1_d.y < 0) return;
|
||||
if (p2_d.y < 0) return;
|
||||
if (p3_d.y < 0) return;
|
||||
if (p1_d.x <= 0) return;
|
||||
if (p2_d.x <= 0) return;
|
||||
if (p3_d.x <= 0) return;
|
||||
if (p1_d.y <= 0) return;
|
||||
if (p2_d.y <= 0) return;
|
||||
if (p3_d.y <= 0) return;
|
||||
|
||||
xmin = xmax = p1_d.x;
|
||||
ymin = ymax = p1_d.y;
|
||||
|
@ -427,7 +427,6 @@ gimp_operation_cage_transform_interpolate_source_coords_recurs (GimpOperationCag
|
|||
coords);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static GimpCoords
|
||||
|
@ -457,28 +456,14 @@ gimp_cage_transform_compute_destination (GimpCageConfig *config,
|
|||
|
||||
for(i = 0; i < cvn; i++)
|
||||
{
|
||||
|
||||
if (!isnan(coef[i]))
|
||||
{
|
||||
pos_x += coef[i] * config->cage_vertices_d[i].x;
|
||||
pos_y += coef[i] * config->cage_vertices_d[i].y;
|
||||
}
|
||||
|
||||
g_assert (!isnan(pos_x));
|
||||
g_assert (!isnan(pos_y));
|
||||
pos_x += coef[i] * config->cage_vertices_d[i].x;
|
||||
pos_y += coef[i] * config->cage_vertices_d[i].y;
|
||||
}
|
||||
|
||||
for(i = 0; i < cvn; i++)
|
||||
{
|
||||
|
||||
if (!isnan(coef[i]))
|
||||
{
|
||||
pos_x += coef[i + cvn] * config->scaling_factor[i] * gimp_cage_config_get_edge_normal (config, i).x;
|
||||
pos_y += coef[i + cvn] * config->scaling_factor[i] * gimp_cage_config_get_edge_normal (config, i).y;
|
||||
}
|
||||
|
||||
g_assert (!isnan(pos_x));
|
||||
g_assert (!isnan(pos_y));
|
||||
}
|
||||
|
||||
result.x = pos_x;
|
||||
|
|
|
@ -50,12 +50,12 @@ static void gimp_cage_options_set_property (GObject *object,
|
|||
guint property_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
||||
static void gimp_cage_options_get_property (GObject *object,
|
||||
guint property_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec);
|
||||
|
||||
|
||||
G_DEFINE_TYPE (GimpCageOptions, gimp_cage_options,
|
||||
GIMP_TYPE_TRANSFORM_OPTIONS)
|
||||
|
||||
|
@ -80,7 +80,7 @@ gimp_cage_options_class_init (GimpCageOptionsClass *klass)
|
|||
static void
|
||||
gimp_cage_options_init (GimpCageOptions *options)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -583,7 +583,7 @@ gimp_cage_tool_compute_coef (GimpCageTool *ct,
|
|||
gegl = gegl_node_new ();
|
||||
|
||||
input = gegl_node_new_child (gegl,
|
||||
"operation", "gegl:cage_coef_calc",
|
||||
"operation", "gimp:cage_coef_calc",
|
||||
"config", ct->config,
|
||||
NULL);
|
||||
|
||||
|
@ -671,7 +671,7 @@ gimp_cage_tool_process (GimpCageTool *ct,
|
|||
NULL);
|
||||
|
||||
cage = gegl_node_new_child (gegl,
|
||||
"operation", "gegl:cage_transform",
|
||||
"operation", "gimp:cage_transform",
|
||||
"config", ct->config,
|
||||
NULL);
|
||||
|
||||
|
@ -752,7 +752,7 @@ gimp_cage_tool_prepare_preview (GimpCageTool *ct,
|
|||
NULL);
|
||||
|
||||
cage = gegl_node_new_child (gegl,
|
||||
"operation", "gegl:cage",
|
||||
"operation", "gimp:cage_preview",
|
||||
"config", ct->config,
|
||||
NULL);
|
||||
|
||||
|
|
Loading…
Reference in New Issue