summaryrefslogtreecommitdiffstats
path: root/src/diagram.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2000-07-30 13:58:29 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2000-07-30 13:58:29 (GMT)
commit7ce8e31b7d4f831949f7061ef2808c867da4edd1 (patch)
tree2d71d4688e381dc8e0c968d120b25fdd0763c27e /src/diagram.cpp
parent422c14b6f19d70c78762ea571031f142acf9a972 (diff)
downloadDoxygen-7ce8e31b7d4f831949f7061ef2808c867da4edd1.zip
Doxygen-7ce8e31b7d4f831949f7061ef2808c867da4edd1.tar.gz
Doxygen-7ce8e31b7d4f831949f7061ef2808c867da4edd1.tar.bz2
Release-1.2.0-20000730
Diffstat (limited to 'src/diagram.cpp')
-rw-r--r--src/diagram.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/diagram.cpp b/src/diagram.cpp
index 80e6d10..3f6dd61 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -985,8 +985,6 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
output << ":\\begin{figure}[H]\n"
"\\begin{center}\n"
"\\leavevmode\n";
- //output << "\\setlength{\\epsfysize}{" << realHeight << "cm}\n";
- //output << "\\epsfbox{" << fileName << ".eps}\n"
output << "\\includegraphics[height=" << realHeight << "cm]{"
<< fileName << "}" << endl;
output << "\\end{center}\n"
@@ -994,7 +992,9 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
//printf("writeFigure rows=%d cols=%d\n",rows,cols);
- QFile f1((QCString)path+"/"+fileName+".eps");
+ QCString epsBaseName=(QCString)path+"/"+fileName;
+ QCString epsName=epsBaseName+".eps";
+ QFile f1(epsName.data());
if (!f1.open(IO_WriteOnly))
{
err("Could not open file %s for writing\n",convertToQCString(f1.name()).data());
@@ -1227,6 +1227,19 @@ void ClassDiagram::writeFigure(QTextStream &output,const char *path,
t << "\n% ----- relations -----\n\n";
base->drawConnectors(t,0,TRUE,FALSE,baseRows,superRows,0,0);
super->drawConnectors(t,0,FALSE,FALSE,baseRows,superRows,0,0);
+
+ f1.close();
+ if (Config::usePDFLatexFlag)
+ {
+ QCString epstopdfCmd(4096);
+ epstopdfCmd.sprintf("epstopdf \"%s.eps\" -outfile=\"%s.pdf\"",
+ epsBaseName.data(),epsBaseName.data());
+ if (iSystem(epstopdfCmd)!=0)
+ {
+ err("Error: Problems running epstopdf. Check your TeX installation!\n");
+ return;
+ }
+ }
}