diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2002-07-15 20:10:02 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2002-07-15 20:10:02 (GMT) |
commit | a2bf2ebcf009a45c53748f0c7f9182c017c0bcd9 (patch) | |
tree | b9a5247ad8e1b7ecda53346aa9e29e3e10167e5b /src/dot.cpp | |
parent | 457ca5c291eddeb1a4cd667e20cd8d7dfc1d7f2e (diff) | |
download | Doxygen-a2bf2ebcf009a45c53748f0c7f9182c017c0bcd9.zip Doxygen-a2bf2ebcf009a45c53748f0c7f9182c017c0bcd9.tar.gz Doxygen-a2bf2ebcf009a45c53748f0c7f9182c017c0bcd9.tar.bz2 |
Release-1.2.17
Diffstat (limited to 'src/dot.cpp')
-rw-r--r-- | src/dot.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/dot.cpp b/src/dot.cpp index f3533b5..a5ad72b 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -1745,9 +1745,32 @@ void generateGraphLegend(const char *path) } -void writeDotGraphFromFile(const char *inFile,const char *outFile, - GraphOutputFormat format) +void writeDotGraphFromFile(const char *inFile,const char *outDir, + const char *outFile,GraphOutputFormat format) { + QCString absOutFile = outDir; +#ifdef _WIN32 + absOutFile+='\\'; +#else + absOutFile+='/'; +#endif + absOutFile+=outFile; + + // chdir to the output dir, so dot can find the font file. + QCString oldDir = convertToQCString(QDir::currentDirPath()); + // go to the html output directory (i.e. path) + QDir::setCurrent(outDir); + + //{ // copy input file to output dir. + // QFile inf(inFile,IO_ReadOnly); + // QFileInfo infinfo(inf); + // uint s = infinfo.size(); + // QByteArray a(s); + // inf.readBlock(a.data(),s); + // QFile outf(outDir,IO_WriteOnly); + // outf.writeBlock(a.data(),s); + //} + QCString dotArgs(4096); QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT"); QCString imgName = (QCString)outFile+"."+imgExt; @@ -1779,5 +1802,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outFile, } if (format==BITMAP) checkDotResult(imgName); + + QDir::setCurrent(oldDir); } |