PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Images » Image_GraphViz » Bug #4924

Links in record type nodes do not work

Details

Submitted2005-07-26 18:19 UTC
Frompear at benbeaumont dot com
Assignedsebastian
StatusClosed
PackageImage_GraphViz
PHP Version4.3.4
OSDebian
Roadmaps(Not assigned)

Comments

[2005-07-26 18:19 UTC] pear at benbeaumont dot com

Description:
------------
If we put links in a record type node for an edge to link to, it doesn't work (e.g.:
$graph->addNode(
'struct1',
array(
'label' => '<f0> left|<f1> mid\ dle|<f2> right',
'shape' => 'record'
)
);

#this is taken from an example at http://www.graphviz.org/cvs/doc/info/shapes.html

This is because the output has \" in, when I removed them from lines 407,435 and 460, then it seems to work.

Test script:
---------------
<?php
$graph = new Image_GraphViz();

##example from graphviz.org @ http://www.graphviz.org/cvs/doc/info/shapes.html

$graph->addNode(
'struct1',
array(
'label' => '<f0> left|<f1> mid\ dle|<f2> right',
'shape' => 'record'
)
);
$graph->addNode(
'struct2',
array(
'label' => '<f0> one|<f1> two',
'shape' => 'record'
)
);
$graph->addNode(
'struct3',
array(
'label' => 'hello\nworld |{ b |{c|<here> d|e}| f}| g | h',
'shape' => 'record'
)
);
$graph->addEdge(
array(
'struct1:f1' => 'struct2:f0'
)
);
$graph->addEdge(
array(
'struct1:f2' => 'struct3:here'
)
);

#echo $graph->Parse();
$graph->image('jpg');
?>

Expected result:
----------------
Should have 3 record objects with links from within the objects to each other (e.g. from 'MId dle' to 'one' and 'right' to 'd') -- see the link to see the example.

Actual result:
--------------
There are more groups where the link names have been created as seperate nodes.