[Doxygen-develop] Possible bug in writeDotImageMapFromFile()
Brought to you by:
dimitri
From: Stormont, B. <BSt...@ze...> - 2015-03-09 18:21:27
|
Hi, 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 { //writeSVGFigureLink(t,relPath,inFile,inFile+".svg"); //DotFilePatcher patcher(inFile+".svg"); QCString svgName=outDir+"/"+baseName+".svg"; writeSVGFigureLink(t,relPath,baseName,svgName); DotFilePatcher patcher(svgName); patcher.addSVGConversion(relPath,TRUE,context,TRUE,graphId); patcher.run(); } 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. Thanks, Brian ________________________________ - CONFIDENTIAL- 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. |