GNOME Bugzilla – Bug 618632
PATCH: Collaboration diagramm exceeds the page border in LaTeX generated pdf files
Last modified: 2010-06-15 11:22:25 UTC
Overview: --------- Collaboration diagramms which have both a width larger than maxWidth AND an height larger than maxHeight exceed the page border if width/maxWidth is less than height/maxHeight. Patch: ------ in src/dot.cpp:2020 in function QCString DotClassGraph::writeGraph(...) instead of: if (width>maxWidth) { out << "\\includegraphics[width=" << maxWidth << "pt]"; } else if (height>maxHeight) { out << "\\includegraphics[height=" << maxHeight << "pt]"; } else { out << "\\includegraphics[width=" << width << "pt]"; } write this: if ( (width>maxWidth) || (height>maxHeight) ) { if ( (float)width/(float)maxWidth > (float)height/(float)maxHeight ) { out << "\\includegraphics[width=" << maxWidth << "pt]"; } else { out << "\\includegraphics[height=" << maxHeight << "pt]"; } } else { out << "\\includegraphics[width=" << width << "pt]"; }
Thanks for the patch. I'm currently reworking dot.cpp, and I'll include your patch while I'm at it.
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.7.0. Please verify if this is indeed the case. Reopen the bug if you think it is not fixed and please include any additional information that you think can be relevant.