diff options
author | albert-github <albert.tests@gmail.com> | 2018-04-26 13:15:23 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-04-26 13:15:23 (GMT) |
commit | 49079853fc4670c11b46e12eba7cb519608be8b0 (patch) | |
tree | d77a97380ebd683065035be53d4268fbe047e2d7 /src/dot.h | |
parent | e75de3722b98115f27483aeacb3b2b1dbe7114a3 (diff) | |
download | Doxygen-49079853fc4670c11b46e12eba7cb519608be8b0.zip Doxygen-49079853fc4670c11b46e12eba7cb519608be8b0.tar.gz Doxygen-49079853fc4670c11b46e12eba7cb519608be8b0.tar.bz2 |
Large CALL / CALLER graphs cannot be processed in LaTeX
When generating CAL or CALLER graphs thy can become quite large (and unreadable) and it won't be possible to process them into a PDF due to a limitation of TeX.
When it is determined that the resulting image is to large a scale down is done to around 150" (still unreadable) but it can be processed, this scaling done is done by means of the `dot` program.
(Note: the scaling to 550 points for the output occurs on the original image in the TeX processing and Tex cannot read the image).
Diffstat (limited to 'src/dot.h')
-rw-r--r-- | src/dot.h | 28 |
1 files changed, 23 insertions, 5 deletions
@@ -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); |