summaryrefslogtreecommitdiffstats
path: root/src/dot.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dot.h')
-rw-r--r--src/dot.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/dot.h b/src/dot.h
index dce1a3a..ab6a316 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -42,6 +42,12 @@ class DotRunnerQueue;
enum GraphOutputFormat { GOF_BITMAP, GOF_EPS };
enum EmbeddedOutputFormat { EOF_Html, EOF_LaTeX, EOF_Rtf, EOF_DocBook };
+// the graphicx LaTeX has a limitation of maximum size of 16384
+// To be on the save side we take it a little bit smaller i.e. 150 inch * 72 dpi
+// It is anyway hard to view these size of images
+#define MAX_LATEX_GRAPH_INCH 150
+#define MAX_LATEX_GRAPH_SIZE (MAX_LATEX_GRAPH_INCH * 72)
+
/** Attributes of an edge of a dot graph */
struct EdgeInfo
{
@@ -338,11 +344,12 @@ class DotGroupCollaboration
class DotConstString
{
public:
- DotConstString() { m_str=0; }
- ~DotConstString() { delete[] m_str; }
- DotConstString(const QCString &s) : m_str(0) { set(s); }
- DotConstString(const DotConstString &s) : m_str(0) { set(s.data()); }
+ DotConstString() { m_str=0; m_pdfstr=0;}
+ ~DotConstString() { delete[] m_str; delete[] m_pdfstr;}
+ DotConstString(const QCString &s, const QCString &p = NULL) : m_str(0), m_pdfstr(0) { set(s); setpdf(p);}
+ DotConstString(const DotConstString &s) : m_str(0), m_pdfstr(0) { set(s.data()); }
const char *data() const { return m_str; }
+ const char *pdfData() const { return m_pdfstr; }
bool isEmpty() const { return m_str==0 || m_str[0]=='\0'; }
void set(const QCString &s)
{
@@ -354,9 +361,20 @@ class DotConstString
qstrcpy(m_str,s.data());
}
}
+ void setpdf(const QCString &p)
+ {
+ delete[] m_pdfstr;
+ m_pdfstr=0;
+ if (!p.isEmpty())
+ {
+ m_pdfstr=new char[p.length()+1];
+ qstrcpy(m_pdfstr,p.data());
+ }
+ }
private:
DotConstString &operator=(const DotConstString &);
char *m_str;
+ char *m_pdfstr;
};
/** Helper class to run dot from doxygen.
@@ -377,7 +395,7 @@ class DotRunner
/** Adds an additional job to the run.
* Performing multiple jobs one file can be faster.
*/
- void addJob(const char *format,const char *output);
+ void addJob(const char *format,const char *output, const char *base = NULL);
void addPostProcessing(const char *cmd,const char *args);