[gimp] app: crop GimpImageMap's operation to the selection bounds
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: crop GimpImageMap's operation to the selection bounds
- Date: Fri, 31 May 2013 07:38:39 +0000 (UTC)
commit 304e2975ae66d4f08d7db2debae7c5d27d8a357f
Author: Michael Natterer <mitch gimp org>
Date: Fri May 31 09:05:26 2013 +0200
app: crop GimpImageMap's operation to the selection bounds
so ops are finally working on the right area
(check e.g. Filters/Decor/Vignette).
app/core/gimpimagemap.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimpimagemap.c b/app/core/gimpimagemap.c
index 9855caa..914d4e8 100644
--- a/app/core/gimpimagemap.c
+++ b/app/core/gimpimagemap.c
@@ -71,6 +71,7 @@ struct _GimpImageMap
GimpFilter *filter;
GeglNode *translate;
+ GeglNode *crop;
GimpApplicator *applicator;
};
@@ -280,6 +281,9 @@ gimp_image_map_apply (GimpImageMap *image_map,
image_map->translate = gegl_node_new_child (filter_node,
"operation", "gegl:translate",
NULL);
+ image_map->crop = gegl_node_new_child (filter_node,
+ "operation", "gegl:crop",
+ NULL);
input = gegl_node_get_input_proxy (filter_node, "input");
@@ -291,6 +295,7 @@ gimp_image_map_apply (GimpImageMap *image_map,
*/
gegl_node_link_many (input,
image_map->translate,
+ image_map->crop,
image_map->operation,
NULL);
@@ -308,6 +313,7 @@ gimp_image_map_apply (GimpImageMap *image_map,
gegl_node_link_many (input,
image_map->translate,
+ image_map->crop,
over,
NULL);
@@ -322,9 +328,10 @@ gimp_image_map_apply (GimpImageMap *image_map,
*/
gegl_node_link_many (input,
image_map->translate,
+ image_map->crop,
NULL);
- filter_output = image_map->translate;
+ filter_output = image_map->crop;
}
gegl_node_connect_to (filter_output, "output",
@@ -342,6 +349,11 @@ gimp_image_map_apply (GimpImageMap *image_map,
"y", (gdouble) -image_map->filter_area.y,
NULL);
+ gegl_node_set (image_map->crop,
+ "width", (gdouble) image_map->filter_area.width,
+ "height", (gdouble) image_map->filter_area.height,
+ NULL);
+
gimp_applicator_set_apply_offset (image_map->applicator,
image_map->filter_area.x,
image_map->filter_area.y);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]