Possible bug in writeDotImageMapFromFile()

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Possible bug in writeDotImageMapFromFile()

Stormont, Brian

While using the \dot and \dotfile commands, I ran across a potential bug in writeDotImageMapFromFile() in dot.cpp.  The following is a snippet of the existing code:

  if (imgExt=="svg") // vector graphics



    //DotFilePatcher patcher(inFile+".svg");

    QCString svgName=outDir+"/"+baseName+".svg";


    DotFilePatcher patcher(svgName);




Note that the SVG file link is created *before* the SVG file is patched with the svgpan.js support.   As a result, for any \dot or \dotfile that has a resulting large size, the iframe link generated by writeSVGFigureLink() will be forced to the actual dimensions of the SVG (potentially thousands of pixels wide), so the svgpan.js will not provide any useful functionality and viewing the resulting embedded SVG is unwieldy.

Moving the writeSVGFigureLink() to *after* the call to patcher.run() produces better HTML results where the embedded SVG is put in an HTML iframe with "width=100%" rather than the original SVG width, however I wasn't sure if doing so would have any adverse effects.



This email and any files transmitted with it are confidential, and may also be legally privileged. If you are not the intended recipient, you may not review, use, copy, or distribute this message. If you receive this email in error, please notify the sender immediately by reply email and then delete this email.

Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
Doxygen-develop mailing list
[hidden email]