[gegl] pack: take offsets of input buffers into account



commit 5d8490c791931bdbe78c577652279a6589a9f64c
Author: Øyvind Kolås <pippin gimp org>
Date:   Thu May 21 01:09:05 2020 +0200

    pack: take offsets of input buffers into account

 operations/common/pack.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/operations/common/pack.c b/operations/common/pack.c
index bee5e8fdc..d7df6ab04 100644
--- a/operations/common/pack.c
+++ b/operations/common/pack.c
@@ -38,6 +38,8 @@ property_enum (orientation, _("Orientation"), GeglOrientation, gegl_orientation,
 
 typedef struct
 {
+  GeglNode *reset_origin_input;
+  GeglNode *reset_origin_aux;
   GeglNode *over;
   GeglNode *translate;
   int in_width;
@@ -131,8 +133,8 @@ update_graph (GeglOperation *operation)
   GeglNode *aux    = gegl_node_get_input_proxy  (gegl, "aux");
   GeglNode *output = gegl_node_get_output_proxy (gegl, "output");
 
-  gegl_node_link_many (input, state->over, output, NULL);
-  gegl_node_link_many (aux, state->translate, NULL);
+  gegl_node_link_many (input, state->reset_origin_input, state->over, output, NULL);
+  gegl_node_link_many (aux, state->reset_origin_aux, state->translate, NULL);
 
   gegl_node_connect_from (state->over, "aux",
                           state->translate,  "output");
@@ -148,6 +150,8 @@ attach (GeglOperation *operation)
 
   state->over = gegl_node_new_child (gegl, "operation", "gegl:over", NULL);
   state->translate = gegl_node_new_child (gegl, "operation", "gegl:translate", NULL);
+  state->reset_origin_input = gegl_node_new_child (gegl, "operation", "gegl:reset-origin", NULL);
+  state->reset_origin_aux = gegl_node_new_child (gegl, "operation", "gegl:reset-origin", NULL);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]