RSS/Atom feed Twitter
Site is read-only, email is disabled

Using Gegl from gui

This discussion is connected to the gegl-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

Using Gegl from gui Matúš Fedorko 18 Sep 14:06
  Using Gegl from gui Nicolas Robidoux 18 Sep 14:45
   Using Gegl from gui Victor Oliveira 18 Sep 16:46
  Using Gegl from gui Daniel Sabo 18 Sep 17:54
Matúš Fedorko
2013-09-18 14:06:27 UTC (about 11 years ago)

Using Gegl from gui

Hi,

I would like to ask, whether there exist any examples of using Gegl from gui ?
All I found so far were one purpose command line applications, that built up a single Gegl graph, without needing to alter it at a later time.

What is the preferred approach ? 1) To assemble the graph (add/remove/modify its nodes) on the fly and at the time
the rendering output is needed only call the `gegl_node_process` function (or similar) ?
2) Or to defer assembling the graph to the point in time when the rendering output
is needed (thus constructing the graph and calling `gegl_node_process` both at the same time) ?

To make my question clearer let's say that in gui I have a button to blend all layers
to canvas and buttons to add/remove layer and a button to change layer's opacity.
Now, should I defer assembling the graph to the point in time when the blend button is
pressed or should I build it on the fly as the other buttons are pressed and at the time the blend button is pressed, I would only call `gegl_node_process`
(or similar) on already created graph ?

Thanks in advance for all your answers.

Nicolas Robidoux
2013-09-18 14:45:19 UTC (about 11 years ago)

Using Gegl from gui

GIMP :)

Victor Oliveira
2013-09-18 16:46:05 UTC (about 11 years ago)

Using Gegl from gui

A (much) more simple example (by Jon Nordby) is https://git.gnome.org/browse/gegl-qt/.

On Wed, Sep 18, 2013 at 7:45 AM, Nicolas Robidoux wrote:

GIMP :)

_______________________________________________ gegl-developer-list mailing list
gegl-developer-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gegl-developer-list

Daniel Sabo
2013-09-18 17:54:54 UTC (about 11 years ago)

Using Gegl from gui

Generally it's easier to rebuild the graph rather than taking it apart to make changes. If you have layers made of several nodes you can use proxy pads to keep track of those subgraphs and still be able to discard the main graph.

Gimp generally operates by building and retaining a graph for each layer with a proxy output node, then reassembling the layer stack only if you move things around. Adjusting the opacity or changing the layer mode will modify properties of the existing nodes and not rebuild the graph.

My GEGL app, all the graph related things happen in drawcanvas.py:_build_output_graph() and layers.py: https://bitbucket.org/DanielSabo/thedraw

The layers code in this jumps though a lot of hoops to avoid using no-ops for reasons that were fixed in GEGL 0.3, if I was to write it now I would use no-ops like gimp does instead of all the weak refs.