libsbml-draw
tikz.h
Go to the documentation of this file.
1 /* MIT License
2  */
3 
4 //== FILEDOC =========================================================================
5 
14 //== BEGINNING OF CODE ===============================================================
15 
16 #ifndef __SBNW_DRAW_TIKZ_H_
17 #define __SBNW_DRAW_TIKZ_H_
18 
19 //== INCLUDES ========================================================================
20 
21 #include "SagittariusCore.h"
22 #include "box.h"
23 #include "canvas.h"
24 #include "network.h"
25 #include "layout.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 _GraphfabExport const char* gf_renderTikZ(gf_layoutInfo* l);
36 
41 _GraphfabExport int gf_renderTikZFile(gf_layoutInfo* l, const char* filename);
42 
43 #ifdef __cplusplus
44 }//extern "C"
45 #endif
46 
47 //-- C++ code --
48 # ifdef __cplusplus
49 
50 # include <iostream>
51 
52 namespace LibsbmlDraw {
53 
54  class _GraphfabExport TikZRenderer {
55  public:
56  TikZRenderer(Box extents, Real widthcm, Real heightcm);
57 
58  std::string str(Network* net, Canvas* can);
59 
60  std::string process(Point p) const;
61 
62  std::string formatNodeText(const std::string& text) const;
63 
64  protected:
65  Box extents_;
66  Real widthcm_, heightcm_;
67  };
68 
69  _GraphfabExport std::ostream& operator<<(std::ostream& o, const TikZRenderer& r);
70 
71 }
72 
73 # endif
74 
75 #endif
_GraphfabExport int gf_renderTikZFile(gf_layoutInfo *l, const char *filename)
Render the model as a TikZ image.
Definition: tikz.cpp:34
SAGITTARIUS_REAL Real
Make Real visible to C. Consider letting Real lie in top namespace.
Definition: SagittariusCommon.h:112
Canvas for drawing diagram, dimensions.
A box.
The network model.
First file included.
Type which holds layout info.
Definition: layout.h:114
SBML layout interface in C.
_GraphfabExport const char * gf_renderTikZ(gf_layoutInfo *l)
Render the model as a TikZ image.
Definition: tikz.cpp:14