gegl_dot_node_to_png produce wrong output with subgraph
@MichaelMure
Submitted by Michael Muré Link to original bug (#655186)
Description
Created attachment 192540 Before the change
This is the dot file I get when using gegl_dot_to_png on a graph that contain a subgraph:
digraph gegl { graph [ rankdir = "BT" fontsize = "10" ];
subgraph cluster_GEGL0x9e25000 { graph [ label="GEGL 0x9e25000" fontsize="10" ranksep="0.3" nodesep="0.3"]; node [ fontsize="10" ];
op_0x9e251f8 [fontsize="10" label="{{}|gimp:tilemanager-sink 0x9e251f8 |linear=TRUE | {`<input>`input}}"shape="record"];
subgraph cluster_GraphNode_0x92f13480x92f1348 { graph [ label="GraphNode_0x92f1348 0x92f1348" fontsize="10" ranksep="0.3" nodesep="0.3"]; node [ fontsize="10" ];
op_0x92f1738 [fontsize="10" label="{{`<output>`output}|gegl:warp 0x92f1738 |strength=1,000000 | size=40,000000 | hardness=0,500000 | behavior=Move pixels | {`<input>`input}}"shape="record"];
op_0x92f15e8 [fontsize="10" label="{{`<output>`output}|gegl:map-relative 0x92f15e8 |scaling=1,000000 | sampler-type=GEGL_SAMPLER_CUBIC | {`<aux>`aux|`<input>`input}}"shape="record"];
op_0x92f1540 [fontsize="10" label="{{`<output>`output}|gegl:buffer-source 0x92f1540 |{}}"shape="record"];
op_0x92f1498 [fontsize="10" label="{{`<output>`output}|gegl:nop 'proxynop-output' 0x92f1498 |{`<input>`input}}"shape="record"];
op_0x92f13f0 [fontsize="10" label="{{`<output>`output}|gegl:nop 'proxynop-input' 0x92f13f0 |{`<input>`input}}"shape="record"];
op_0x92f1738:output -> op_0x92f15e8:aux;
op_0x92f15e8:output -> op_0x92f1498:input;
op_0x92f1540:output -> op_0x92f1738:input;
op_0x92f1498:output -> op_0x9e251f8:input;
op_0x92f13f0:output -> op_0x92f15e8:input;
}
op_0x92f1348 [fontsize="10" label="{{`<output>`output}|GraphNode 0x92f1348 |{`<input>`input}}"shape="record"];
op_0x9e25150 [fontsize="10" label="{{`<output>`output}|gegl:translate 0x9e25150 |origin-x=0,000000 | origin-y=0,000000 | filter=linear | hard-edges=FALSE | lanczos-width=3 | x=0,000000 | y=0,000000 | {`<input>`input}}"shape="record"];
op_0x9e250a8 [fontsize="10" label="{{`<output>`output}|gimp:tilemanager-source 0x9e250a8 |linear=TRUE | {}}"shape="record"];
op_0x9e25150:output -> op_0x92f13f0:input;
op_0x9e250a8:output -> op_0x9e25150:input;
}
}
The problem is that the output connection of the Gegl subgraph is inside the dot subgraph. The result is that the png result show the node connected to this connection inside the subgraph, while it should be outside (before.png).
Moving the connection outside the dot subgraph solve the problem (after.png):
digraph gegl { graph [ rankdir = "BT" fontsize = "10" ];
subgraph cluster_GEGL0x9e25000 { graph [ label="GEGL 0x9e25000" fontsize="10" ranksep="0.3" nodesep="0.3"]; node [ fontsize="10" ];
op_0x9e251f8 [fontsize="10" label="{{}|gimp:tilemanager-sink 0x9e251f8 |linear=TRUE | {`<input>`input}}"shape="record"];
subgraph cluster_GraphNode_0x92f13480x92f1348 { graph [ label="GraphNode_0x92f1348 0x92f1348" fontsize="10" ranksep="0.3" nodesep="0.3"]; node [ fontsize="10" ];
op_0x92f1738 [fontsize="10" label="{{`<output>`output}|gegl:warp 0x92f1738 |strength=1,000000 | size=40,000000 | hardness=0,500000 | behavior=Move pixels | {`<input>`input}}"shape="record"];
op_0x92f15e8 [fontsize="10" label="{{`<output>`output}|gegl:map-relative 0x92f15e8 |scaling=1,000000 | sampler-type=GEGL_SAMPLER_CUBIC | {`<aux>`aux|`<input>`input}}"shape="record"];
op_0x92f1540 [fontsize="10" label="{{`<output>`output}|gegl:buffer-source 0x92f1540 |{}}"shape="record"];
op_0x92f1498 [fontsize="10" label="{{`<output>`output}|gegl:nop 'proxynop-output' 0x92f1498 |{`<input>`input}}"shape="record"];
op_0x92f13f0 [fontsize="10" label="{{`<output>`output}|gegl:nop 'proxynop-input' 0x92f13f0 |{`<input>`input}}"shape="record"];
op_0x92f1738:output -> op_0x92f15e8:aux;
op_0x92f15e8:output -> op_0x92f1498:input;
op_0x92f1540:output -> op_0x92f1738:input;
op_0x92f13f0:output -> op_0x92f15e8:input;
}
op_0x92f1348 [fontsize="10" label="{{`<output>`output}|GraphNode 0x92f1348 |{`<input>`input}}"shape="record"];
op_0x9e25150 [fontsize="10" label="{{`<output>`output}|gegl:translate 0x9e25150 |origin-x=0,000000 | origin-y=0,000000 | filter=linear | hard-edges=FALSE | lanczos-width=3 | x=0,000000 | y=0,000000 | {`<input>`input}}"shape="record"];
op_0x9e250a8 [fontsize="10" label="{{`<output>`output}|gimp:tilemanager-source 0x9e250a8 |linear=TRUE | {}}"shape="record"];
op_0x9e25150:output -> op_0x92f13f0:input;
op_0x9e250a8:output -> op_0x9e25150:input;
op_0x92f1498:output -> op_0x9e251f8:input;
}
}
Attachment 192540, "Before the change":
Version: git master
Edited by lillolollo