[gegl/soc-2012-editor: 13/36] Will also add an output pad to the node graphic if the operation has one
- From: Isaac Wagner <isaacbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/soc-2012-editor: 13/36] Will also add an output pad to the node graphic if the operation has one
- Date: Thu, 5 Jul 2012 21:57:18 +0000 (UTC)
commit f82375e0a8252e1194bee92b2e5cdbd7167adbc4
Author: Isaac Wagner <isaacbw src gnome org>
Date: Wed Jun 13 16:29:18 2012 -0400
Will also add an output pad to the node graphic if the operation has one
bin/editor/gegl-editor-layer.c | 12 +++++++++++-
bin/editor/gegl-editor.c | 5 +++++
2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/bin/editor/gegl-editor-layer.c b/bin/editor/gegl-editor-layer.c
index 5363a1f..d2c06ea 100644
--- a/bin/editor/gegl-editor-layer.c
+++ b/bin/editor/gegl-editor-layer.c
@@ -22,5 +22,15 @@ layer_add_gegl_node(GeglEditorLayer* layer, GeglNode* node)
{
inputs[i] = gegl_pad_get_name(pads->data);
}
- gegl_editor_add_node(layer->editor, gegl_node_get_operation(node), num_inputs, inputs, 0, NULL);
+
+ if(gegl_node_get_pad(node, "output") == NULL)
+ {
+ gegl_editor_add_node(layer->editor, gegl_node_get_operation(node), num_inputs, inputs, 0, NULL);
+ }
+ else
+ {
+ gchar* output = "output";
+ gchar** outputs[1] = {output};
+ gegl_editor_add_node(layer->editor, gegl_node_get_operation(node), num_inputs, inputs, 1, outputs);
+ }
}
diff --git a/bin/editor/gegl-editor.c b/bin/editor/gegl-editor.c
index 34b5534..34b9044 100644
--- a/bin/editor/gegl-editor.c
+++ b/bin/editor/gegl-editor.c
@@ -40,6 +40,11 @@ main (gint argc,
GeglNode *display = gegl_node_create_child (gegl, "gegl:display");
layer_add_gegl_node(layer, display);
+ GeglNode *over = gegl_node_new_child (gegl,
+ "operation", "gegl:over",
+ NULL);
+ layer_add_gegl_node(layer, over);
+
gtk_main();
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]