summaryrefslogtreecommitdiffstats
path: root/src/dot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dot.cpp')
-rw-r--r--src/dot.cpp46
1 files changed, 28 insertions, 18 deletions
diff --git a/src/dot.cpp b/src/dot.cpp
index 1182e8d..e5825af 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -659,7 +659,8 @@ static bool writeSVGFigureLink(FTextStream &out,const QCString &relPath,
// support the PNG format, we need to check the result.
static void checkDotResult(const QCString &imgName)
{
- if (Config_getEnum("DOT_IMAGE_FORMAT")=="png")
+ QCString imgExt = getDotImageExtension();
+ if (imgExt=="png")
{
FILE *f = portable_fopen(imgName,"rb");
if (f)
@@ -2273,7 +2274,8 @@ void DotGfxHierarchyTable::createGraph(DotNode *n,FTextStream &out,
{
QDir d(path);
QCString baseName;
- QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgExt = getDotImageExtension();
+ QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
baseName.sprintf("inherit_graph_%d",id);
QCString imgName = baseName+"."+ imgExt;
QCString mapName = baseName+".map";
@@ -2323,7 +2325,7 @@ void DotGfxHierarchyTable::createGraph(DotNode *n,FTextStream &out,
resetReNumbering();
DotRunner *dotRun = new DotRunner(dotName,d.absPath().data(),TRUE,absImgName);
- dotRun->addJob(imgExt,absImgName);
+ dotRun->addJob(imgFmt,absImgName);
dotRun->addJob(MAP_CMD,absMapName);
DotManager::instance()->addRun(dotRun);
}
@@ -3128,7 +3130,8 @@ QCString DotClassGraph::writeGraph(FTextStream &out,
baseName = convertNameToFile(diskName());
// derive target file names from baseName
- QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgExt = getDotImageExtension();
+ QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
QCString absBaseName = d.absPath().utf8()+"/"+baseName;
QCString absDotName = absBaseName+".dot";
QCString absMapName = absBaseName+".map";
@@ -3156,7 +3159,7 @@ QCString DotClassGraph::writeGraph(FTextStream &out,
{
DotRunner *dotRun = new DotRunner(absDotName,
d.absPath().data(),TRUE,absImgName);
- dotRun->addJob(imgExt,absImgName);
+ dotRun->addJob(imgFmt,absImgName);
if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName);
DotManager::instance()->addRun(dotRun);
@@ -3484,7 +3487,8 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out,
QCString mapName=escapeCharsInString(m_startNode->m_label,FALSE);
if (m_inverse) mapName+="dep";
- QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgExt = getDotImageExtension();
+ QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
QCString absBaseName = d.absPath().utf8()+"/"+baseName;
QCString absDotName = absBaseName+".dot";
QCString absMapName = absBaseName+".map";
@@ -3512,7 +3516,7 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out,
{
// run dot to create a bitmap image
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName);
- dotRun->addJob(imgExt,absImgName);
+ dotRun->addJob(imgFmt,absImgName);
if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName);
DotManager::instance()->addRun(dotRun);
}
@@ -3796,7 +3800,8 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat graphForma
QCString baseName = m_diskName + (m_inverse ? "_icgraph" : "_cgraph");
QCString mapName = baseName;
- QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgExt = getDotImageExtension();
+ QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
QCString absBaseName = d.absPath().utf8()+"/"+baseName;
QCString absDotName = absBaseName+".dot";
QCString absMapName = absBaseName+".map";
@@ -3824,7 +3829,7 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat graphForma
{
// run dot to create a bitmap image
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName);
- dotRun->addJob(imgExt,absImgName);
+ dotRun->addJob(imgFmt,absImgName);
if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName);
DotManager::instance()->addRun(dotRun);
@@ -3950,7 +3955,8 @@ QCString DotDirDeps::writeGraph(FTextStream &out,
QCString baseName=m_dir->getOutputFileBase()+"_dep";
QCString mapName=escapeCharsInString(baseName,FALSE);
- QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgExt = getDotImageExtension();
+ QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
QCString absBaseName = d.absPath().utf8()+"/"+baseName;
QCString absDotName = absBaseName+".dot";
QCString absMapName = absBaseName+".map";
@@ -3988,7 +3994,7 @@ QCString DotDirDeps::writeGraph(FTextStream &out,
{
// run dot to create a bitmap image
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName);
- dotRun->addJob(imgExt,absImgName);
+ dotRun->addJob(imgFmt,absImgName);
if (generateImageMap) dotRun->addJob(MAP_CMD,absMapName);
DotManager::instance()->addRun(dotRun);
}
@@ -4113,7 +4119,8 @@ void generateGraphLegend(const char *path)
MD5SigToString(md5_sig,sigStr.rawData(),33);
QCString absBaseName = (QCString)path+"/graph_legend";
QCString absDotName = absBaseName+".dot";
- QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgExt = getDotImageExtension();
+ QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
QCString imgName = "graph_legend."+imgExt;
QCString absImgName = absBaseName+"."+imgExt;
if (checkAndUpdateMd5Signature(absBaseName,sigStr) ||
@@ -4133,7 +4140,7 @@ void generateGraphLegend(const char *path)
// run dot to generate the a bitmap image from the graph
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),TRUE,absImgName);
- dotRun->addJob(imgExt,absImgName);
+ dotRun->addJob(imgFmt,absImgName);
DotManager::instance()->addRun(dotRun);
}
else
@@ -4161,14 +4168,15 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
err("Output dir %s does not exist!\n",outDir); exit(1);
}
- QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgExt = getDotImageExtension();
+ QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
QCString imgName = (QCString)outFile+"."+imgExt;
QCString absImgName = d.absPath().utf8()+"/"+imgName;
QCString absOutFile = d.absPath().utf8()+"/"+outFile;
DotRunner dotRun(inFile,d.absPath().data(),FALSE,absImgName);
if (format==GOF_BITMAP)
- dotRun.addJob(imgExt,absImgName);
+ dotRun.addJob(imgFmt,absImgName);
else // format==GOF_EPS
{
if (Config_getBool("USE_PDFLATEX"))
@@ -4216,7 +4224,8 @@ void writeDotImageMapFromFile(FTextStream &t,
}
QCString mapName = baseName+".map";
- QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgExt = getDotImageExtension();
+ QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
QCString imgName = baseName+"."+imgExt;
QCString absOutFile = d.absPath().utf8()+"/"+mapName;
@@ -4511,7 +4520,8 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t,
QCString sigStr(33);
MD5Buffer((const unsigned char *)theGraph.data(),theGraph.length(),md5_sig);
MD5SigToString(md5_sig,sigStr.rawData(),33);
- QCString imgExt = Config_getEnum("DOT_IMAGE_FORMAT");
+ QCString imgExt = getDotImageExtension();
+ QCString imgFmt = Config_getEnum("DOT_IMAGE_FORMAT");
QCString baseName = m_diskName;
QCString imgName = baseName+"."+imgExt;
QCString absPath = d.absPath().data();
@@ -4541,7 +4551,7 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t,
if (graphFormat==GOF_BITMAP) // run dot to create a bitmap image
{
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE);
- dotRun->addJob(imgExt,absImgName);
+ dotRun->addJob(imgFmt,absImgName);
if (writeImageMap) dotRun->addJob(MAP_CMD,absMapName);
DotManager::instance()->addRun(dotRun);