15 Jun 2005 05:56
[PATCH] Word wrapping long class names in DOT diagrams
David Wilson <davidw <at> technisyst.com.au>
2005-06-15 03:56:29 GMT
2005-06-15 03:56:29 GMT
I have noticed that when using the doxygen-generated inheritance diagrams and collaboration diagrams, class names are always drawn on a single line. This can lead to needlessly large diagrams (4000+ pixels wide) if you have a C++ class with several template arguments, for example. The following patch to doxygen 1.4.3 solves this problem for many of the cases I tried, by trying to word-wrap the class name once it exceeds 30 characters. Line breaks are inserted after space or comma. The same line-breaking method will also be used for arrow labels. One inheritance graph (for a template class instantiated with 8 template parameters) went from 4010 to 979 pixels width after this patch and is much more readable. Also, this patch corrects a small bug with collaboration diagrams. When multiple member variables have the same type, this was showing up in the collaboration diagram as "m_one\nm_two\nm_three" next to the dashed purple arrow, rather than showing "m_one", "m_two", "m_three" on separate lines. Regards Dave diff -ur doxygen-1.4.3.orig/src/dot.cpp doxygen-1.4.3/src/dot.cpp --- doxygen-1.4.3.orig/src/dot.cpp 2005-04-18 02:55:55.000000000 +1000 +++ doxygen-1.4.3/src/dot.cpp 2005-06-14 12:41:17.000000000 +1000 <at> <at> -561,15 +561,27 <at> <at>(Continue reading)
RSS Feed