Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002336graphvizOutput Generationpublic2013-08-24 06:232013-09-06 17:50
Reporterryandesign 
Assigned Toerg 
PrioritynormalSeveritynormalReproducibilityalways
StatusresolvedResolutionfixed 
Platformx86_64OSOS XOS Version10.8.4
Summary0002336: gradient Y-coordinate in xdot not correct
DescriptionWhen rendering xdot output for a graph using gradients, the Y-coordinate is inverted.

In the attached graph, there is a single node which should have a gradient fill from white at the bottom to black at the top.

Using the normal Graphviz coordinate system where (0,0) is in the lower left, the bounding box is drawn by the xdot command "P 4 54 36 0 36 0 0 54 0", so the top is at 36 and the bottom is at 0.

But the gradient fill is specified by the xdot command "C 42 -[27 -0 27 -36 2 0 7 -#ffffff 1 7 -#000000]", so the gradient starts at white at coordinate (27,-0) and ends at black at coordinate (27,-36) -- off the bottom of the canvas!

The correct gradient fill specification would be "C 40 -[27 0 27 36 2 0 7 -#ffffff 1 7 -#000000]".

So far in my tests, I can just flip the sign of the Y-coordinate.

In inverted-Y mode ("dot -y") the gradient is specified by "C 41 -[27 36 27 72 2 0 7 -#ffffff 1 7 -#000000]" so I can make that work by subtracting the Y-coordinates from the height.

Since this bug was released in a stable version of Graphviz 2.32.0, you might consider increasing the xdotversion to 1.4.1 when fixing this bug, so that xdot renderers can detect the buggy version 1.4 and translate the coordinates in that case.
Steps To Reproducedot -Txdot gradient3.gv > gradient3.gv.xdot
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENT
VERSION2.33.20130822.0447
Attached Files? file icon gradient3.gv [^] (93 bytes) 2013-08-24 06:23
? file icon gradient3.gv.xdot [^] (375 bytes) 2013-08-24 06:23

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2013-08-24 06:23 ryandesign New Issue
2013-08-24 06:23 ryandesign File Added: gradient3.gv
2013-08-24 06:23 ryandesign File Added: gradient3.gv.xdot
2013-09-06 17:50 erg Assigned To => erg
2013-09-06 17:50 erg Status new => resolved
2013-09-06 17:50 erg Resolution open => fixed


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker