diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-07-15 20:10:02 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-07-15 20:10:02 (GMT) |
commit | b860a5cc743f3297002876b58d4db5e504f4294d (patch) | |
tree | b9a5247ad8e1b7ecda53346aa9e29e3e10167e5b /src/dot.cpp | |
parent | bcbf69496a8e7e703ecf4fb6e5de264f86ebea84 (diff) | |
download | Doxygen-b860a5cc743f3297002876b58d4db5e504f4294d.zip Doxygen-b860a5cc743f3297002876b58d4db5e504f4294d.tar.gz Doxygen-b860a5cc743f3297002876b58d4db5e504f4294d.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); } |