Commit fb74b9e8 authored by Michael Natterer's avatar Michael Natterer 😴

app: chnage gimp_gegl_create_apply_opacity_node()'s mask offset

to be the offset *of* the mask, not the offset *into* the mask, also
reorder parameters.
parent 5ad9b6fd
......@@ -245,9 +245,10 @@ gimp_drawable_bucket_fill_internal (GimpDrawable *drawable,
break;
}
apply_opacity = gimp_gegl_create_apply_opacity_node (mask_buffer, 1.0,
mask_offset_x,
mask_offset_y);
apply_opacity = gimp_gegl_create_apply_opacity_node (mask_buffer,
-mask_offset_x,
-mask_offset_y,
1.0);
gimp_apply_operation (buffer, NULL, NULL,
apply_opacity, 1.0,
......
......@@ -380,8 +380,7 @@ gimp_drawable_stroke_scan_convert (GimpDrawable *drawable,
break;
}
apply_opacity = gimp_gegl_create_apply_opacity_node (mask_buffer, 1.0,
0, 0);
apply_opacity = gimp_gegl_create_apply_opacity_node (mask_buffer, 0, 0, 1.0);
gimp_apply_operation (base_buffer, NULL, NULL,
apply_opacity, 1.0,
......
......@@ -1574,8 +1574,8 @@ gimp_layer_apply_mask (GimpLayer *layer,
mask_buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (mask));
dest_buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (layer));
apply_opacity = gimp_gegl_create_apply_opacity_node (mask_buffer, 1.0,
0, 0);
apply_opacity = gimp_gegl_create_apply_opacity_node (mask_buffer, 0, 0,
1.0);
gimp_drawable_apply_operation_to_buffer (GIMP_DRAWABLE (layer), NULL, NULL,
apply_opacity, TRUE, dest_buffer);
......
......@@ -732,9 +732,10 @@ gimp_selection_extract (GimpSelection *selection,
mask_buffer = gimp_drawable_get_buffer (GIMP_DRAWABLE (selection));
apply_opacity = gimp_gegl_create_apply_opacity_node (mask_buffer, 1.0,
x1 + off_x,
y1 + off_y);
apply_opacity = gimp_gegl_create_apply_opacity_node (mask_buffer,
- (off_x + x1),
- (off_y + y1),
1.0);
gimp_apply_operation (dest_buffer, NULL, NULL,
apply_opacity, TRUE,
......
......@@ -68,10 +68,9 @@ gimp_gegl_create_flatten_node (const GimpRGB *background)
GeglNode *
gimp_gegl_create_apply_opacity_node (GeglBuffer *mask,
gdouble opacity,
/* offsets *into* the mask */
gint mask_offset_x,
gint mask_offset_y)
gint mask_offset_y,
gdouble opacity)
{
GeglNode *node;
GeglNode *input;
......@@ -92,8 +91,8 @@ gimp_gegl_create_apply_opacity_node (GeglBuffer *mask,
NULL);
mask_source = gimp_gegl_add_buffer_source (node, mask,
-mask_offset_x,
-mask_offset_y);
mask_offset_x,
mask_offset_y);
gegl_node_connect_to (input, "output",
opacity_node, "input");
......
......@@ -24,10 +24,9 @@
GeglNode * gimp_gegl_create_flatten_node (const GimpRGB *background);
GeglNode * gimp_gegl_create_apply_opacity_node (GeglBuffer *mask,
gdouble opacity,
/* offsets *into* the mask */
gint mask_offset_x,
gint mask_offset_y);
gint mask_offset_y,
gdouble opacity);
GeglNode * gimp_gegl_create_apply_buffer_node (GeglBuffer *buffer,
gint buffer_offset_x,
gint buffer_offset_y,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment