Number: 27
Title: top line of box missing in gif
Submitter: Petr Prikryl
Date: Tue Jun 12 05:44:52 2001
Subsys: Dot
Version: 1.7.6 beta 1
System: x86-Other-Windows NT 4.0
Severity: minor
Problem:
The 1.7.6 beta 1 Windows version of dot produces box of the node without the top line when the gif is used as output format and the height argument is used.

The input was generated by the Doxygen tool (www.doxygen.org).

Some of the generated arguments were removed to insulate one problem. When the height argument is removed, the output is O.K. When the height is set to 0.25, the output is also O.K. When the height is set to 0.23, the output is even stranger. Only the part of the top line is drawn. It looks as if the line endings were not aligned perfectly horizontally and the result was cut somehow. Possibly rounding errors?

I did observe similar behaviour also in 1.5 version, but I did not try to insulate the problem.

The example was stored in a.dot and the dot was run this way:

dot -Tgif a.dot -o a.gif
Input:

digraph inheritance
{
  rankdir=LR;
  Node145 [shape="box",label="CDirectorManagerImpl",
           fontsize=10,height=0.2];
}
Output file: b27.gif
Comments:
Anyway, thanks for the great dot.

Petr
Fix:
-- ellson -- The first problem was that the default: 'graph [margin="0.5,0.5"]' was not being properly supported in the bitmap output formats. A fix for this problem is now in CVS.

The problem with the slightly rotated line is I'm sure a rounding problem. The box shape is drawn by the generic polygon shape code, and rotated 90deg because of the rank=LR. I suspect that the rotation is causing the problem. I don't plan to do anything more about this on the grounds it should be less noticeable now that the margins are fixed.

Please note that the default margin size of 0.5 inches is probably more than you want for a diagram embedded in a web page. You can override the default by adding something like: graph [margin="0.2,0.1"] to the top of your .dot files.

-- ellson -- -- PRIKRYLP@skil.cz -- I did observe the warning when using the new Aladding Free Public Licence Ghostscript version 7.0. The message was reported via a message box window inside GSview version 4.0. After ignoring it, everything went O.K.

I am not sure how exactly the AFPL Ghostscript version is related to the GNU Ghostscript version. If I remember well, the warning messages about Document Structuring Conventions appeared also in earlier versions. But I also remember, that they were not reported in more earlier versions (sorry for my English ;-). I fixed the rounding problem. Boxes should be straight now. Fixes are in CVS.
Owner: ellson
Status: Fixed