Declares class GraphIO which provides access to all graph read and write functionality.
Representation of clusters in a clustered graph.
Stores additional attributes of a clustered graph (like layout information).
Colors represented as RGBA values.
Class for the representation of edges.
Stores additional attributes of a graph (like layout information).
Class for the representation of nodes.
LengthUnit
Units of length available in LaTeX.
@ EM
roughly the width of an 'M' (uppercase) in the current font (it depends on the font used)
@ EX
roughly the height of an 'x' (lowercase) in the current font (it depends on the font used)
@ MU
math unit equal to 1/18 em, where em is taken from the math symbols family
bool isCoveredBy(const DPoint &p, node v) const
Check whether a point (e.g.
std::string getEdgeArrows(edge e) const
Get the arrows of an edge in TikZ syntax.
std::string getNodeStyle(node v) const
Get the style of a node in TikZ syntax.
bool draw(std::ostream &os)
Output the member graph to an output stream in LaTeX+TikZ format.
const GraphAttributes & m_attr
attributes of the graph to be visualized
void drawAllEdges(std::ostream &os)
Draws a sequence of lines for each edge in the graph.
std::string getLineStyle(StrokeType strokeType, double strokeWidth, Color strokeColor) const
Convert an ogdf::StrokeType, strokeWidth and ogdf::Color to a a line style string in TikZ syntax.
std::vector< std::string > m_edgeStyles
to avoid as much redundancy as possible, any occurring edge style will be predefined and reused
std::string getEdgeStyle(edge e) const
Get the style of an edge in TikZ syntax.
TikzWriter(const ClusterGraphAttributes &attr, LengthUnit unit=LengthUnit::MM)
Construct a new writer for drawing cluster graphs using graph attributes.
std::string getNodeLabel(node v) const
Get the label of a node in TikZ syntax.
void drawNode(std::ostream &os, node v, bool uniformStyle, bool uniformWidth, bool uniformHeight)
Draws a node using its shape, size and style properties.
std::string getEdgeLabel(edge e, const DPoint &previousPoint, const DPoint &labelPoint) const
Get the label of an edge in TikZ syntax, positioned as a node on the edge path.
std::vector< std::string > m_nodeStyles
to avoid as much redundancy as possible, any occurring node style will be predefined and reused
double calcArrowSize() const
Calculates the arrow size to be used for TikZ arrows.
std::string getNodeShape(node v) const
Get the shape of a node in TikZ syntax.
void drawCluster(std::ostream &os, cluster c)
Draws a cluster as a rectangle, using its size and style properties.
TikzWriter(const GraphAttributes &attr, LengthUnit unit=LengthUnit::MM)
Construct a new writer for drawing graphs using graph attributes.
void drawAllNodes(std::ostream &os, bool uniformStyle, bool uniformWidth, bool uniformHeight)
Draws each node of the graph.
static std::string getColorString(Color c)
Convert an ogdf::Color to a string in TikZ syntax.
std::string texLength(double f) const
Mainly avoid scientific notation (not handled by LaTeX) and add length unit mm.
void drawAllClusters(std::ostream &os)
Draws a rectangle for each cluster in the ogdf::ClusterGraph.
std::string getClusterStyle(cluster c) const
Get the style of a cluster in TikZ syntax.
void drawEdge(std::ostream &os, edge e)
Draws a sequence of lines for each edge in the graph.
void wrapHeaderFooter(std::ostream &os, std::string tikzPic, bool uniformStyle, bool uniformWidth, bool uniformHeight) const
Wrap LaTeX/TikZ header/footer around a tikzpicture and write to output stream.
LengthUnit m_unit
The LaTeX unit to use for all ocurring lengths.
double getTextWidth(node v) const
Get the total width the node text may occupy.
const ClusterGraphAttributes * m_clsAttr
attributes of the cluster graph (nullptr if no cluster graph given)
StrokeType
Line types of strokes.
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.