[gegl/soc-2012-editor] 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] Will also add an output pad to the node graphic if the operation has one
- Date: Wed, 13 Jun 2012 20:29:47 +0000 (UTC)
commit 81c6e4fcaee421afbb53b50954cd477ea03d57a8
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]