Skip Menu |

This queue is for tickets about the Tk-GraphViz CPAN distribution.

Report information
The Basics
Id: 79377
Status: resolved
Priority: 0/
Queue: Tk-GraphViz

People
Owner: Nobody in particular
Requestors: geoff_hart [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: graphs with arcs, distorted
Once I added "$mw->update;" (see bug 64089), I could see my graphs, however, many of the edges were drawn incorrectly. I found this line: sub _parseEdgePos { my ($self, $pos) = @_; # Note: Arrows can be at the start and end, i.e. # pos = s,410,104 e,558,59 417,98 ... # (See example graph 'graphs/directed/ldbxtried.dot') # hash of start/end coords # Example: e => [ 12, 3 ], s = [ 1, 3 ] my %startEnd; # Process all start/end points (could be none, 1, or 2) while ( $pos =~ s/^([se])\s*\,\s*(\d+)\s*\,\s*(\d+)\s+// ) { <<== bad The problem is the x,y coordinates are not always integers. Changing to: while ( $pos =~ s/^([se])\s*\,\s*([\d.]+)\s*\,\s*([\d.]+)\s+// ) { Resolves that problem. I'm still having other problems (the update issue, createBindings doesn't seem to work, ...), but this tool seems to valuable to let it rot like this. Will invest some more time...
Subject: GraphViz.pm

Message body is not shown because it is too large.

Thanks! This has been applied as https://github.com/graphviz-perl/Tk-GraphViz/commit/a8c2ae72f931d7aebba5ee86db1a648f2013c4d1 as part of generally bringing the code back to being able to understand DOT's output.