gimp r24819 - in trunk: . app/core



Author: mitch
Date: Wed Feb  6 11:02:31 2008
New Revision: 24819
URL: http://svn.gnome.org/viewvc/gimp?rev=24819&view=rev

Log:
2008-02-06  Michael Natterer  <mitch gimp org>

	* app/core/gimpimagemap.c (gimp_image_map_apply): when using a
	source operation, blend its output over the original image using
	"over" instead of simply replacing the original image.



Modified:
   trunk/ChangeLog
   trunk/app/core/gimpimagemap.c

Modified: trunk/app/core/gimpimagemap.c
==============================================================================
--- trunk/app/core/gimpimagemap.c	(original)
+++ trunk/app/core/gimpimagemap.c	Wed Feb  6 11:02:31 2008
@@ -434,20 +434,15 @@
         {
           image_map->gegl = gegl_node_new ();
 
-          if (gegl_node_get_pad (image_map->operation, "input"))
-            {
-              g_printerr ("%s: found input property\n", G_STRFUNC);
+          image_map->input =
+            gegl_node_new_child (image_map->gegl,
+                                 "operation", "gimp-tilemanager-source",
+                                 NULL);
 
-              image_map->input =
-                gegl_node_new_child (image_map->gegl,
-                                     "operation", "gimp-tilemanager-source",
-                                     NULL);
-
-              image_map->shift =
-                gegl_node_new_child (image_map->gegl,
-                                     "operation", "shift",
-                                     NULL);
-            }
+          image_map->shift =
+            gegl_node_new_child (image_map->gegl,
+                                 "operation", "shift",
+                                 NULL);
 
           gegl_node_add_child (image_map->gegl, image_map->operation);
 
@@ -470,7 +465,7 @@
             g_object_unref (sink_operation);
           }
 
-          if (image_map->input)
+          if (gegl_node_get_pad (image_map->operation, "input"))
             {
               gegl_node_link_many (image_map->input,
                                    image_map->shift,
@@ -480,24 +475,30 @@
             }
           else
             {
-              gegl_node_link_many (image_map->operation,
+              GeglNode *over = gegl_node_new_child (image_map->gegl,
+                                                    "operation", "over",
+                                                    NULL);
+
+              gegl_node_link_many (image_map->input,
+                                   image_map->shift,
+                                   over,
                                    image_map->output,
                                    NULL);
+
+              gegl_node_connect_to (image_map->operation, "output",
+                                    over, "aux");
             }
         }
 
-      if (image_map->input)
-        {
-          gegl_node_set (image_map->input,
-                         "tile-manager", image_map->undo_tiles,
-                         "linear",       TRUE,
-                         NULL);
-
-          gegl_node_set (image_map->shift,
-                         "x", (gdouble) rect.x,
-                         "y", (gdouble) rect.y,
-                         NULL);
-        }
+      gegl_node_set (image_map->input,
+                     "tile-manager", image_map->undo_tiles,
+                     "linear",       TRUE,
+                     NULL);
+
+      gegl_node_set (image_map->shift,
+                     "x", (gdouble) rect.x,
+                     "y", (gdouble) rect.y,
+                     NULL);
 
       gegl_node_set (image_map->output,
                      "tile-manager", gimp_drawable_get_shadow_tiles (image_map->drawable),



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