Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
OrthoLayout.h
Go to the documentation of this file.
1
33#pragma once
34
37
38namespace ogdf {
39
42public:
45
46
47 // calls planar UML layout algorithm. Input is a planarized representation
48 // PG of a connected component of the graph, output is a layout of the
49 // (modified) planarized representation in drawing
51
60 virtual void call(PlanRep& PG, adjEntry adjExternal, Layout& drawing) override;
61
68 double separation() const override { return m_separation; }
69
71 void separation(double sep) override { m_separation = sep; }
72
74
77 double cOverhang() const { return m_cOverhang; }
78
80 void cOverhang(double c) { m_cOverhang = c; }
81
83
86 double margin() const { return m_margin; }
87
89 void margin(double m) { m_margin = m; }
90
92 bool progressive() const { return m_progressive; }
93
95
98 void progressive(bool b) { m_progressive = b; }
99
101 bool scaling() const { return m_useScalingCompaction; }
102
104 void scaling(bool b) { m_useScalingCompaction = b; }
105
107 void bendBound(int i) {
108 if (i >= 0) {
109 m_bendBound = i;
110 }
111 }
112
114
115private:
116 // compute bounding box and move final drawing such that it is 0 aligned
117 // respecting margins
119
120 // options
121
123 double m_cOverhang;
124 double m_margin;
125
128
131};
132
133}
Declaration of interface for planar layout algorithms (used in planarization approach).
Declaration of orthogonal representation of planar graphs.
Class for adjacency list elements.
Definition Graph_d.h:79
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition Layout.h:46
Interface for planar layout algorithms (used in the planarization approach).
The Orthogonal layout algorithm for planar graphs.
Definition OrthoLayout.h:41
void progressive(bool b)
Selects if the progressive (true) or traditional (false) orthogonalization model is used.
Definition OrthoLayout.h:98
void computeBoundingBox(const PlanRep &PG, Layout &drawing)
bool scaling() const
Returns whether scaling is used in the compaction phase.
double separation() const override
Returns the minimum distance between edges and vertices.
Definition OrthoLayout.h:68
bool progressive() const
Returns whether the currently selected orthogonaliaztion model is progressive.
Definition OrthoLayout.h:92
double m_margin
margin around drawing
void margin(double m)
Sets the desired margin around the drawing.
Definition OrthoLayout.h:89
double margin() const
Returns the desired margin around the drawing.
Definition OrthoLayout.h:86
void bendBound(int i)
Set bound on the number of bends.
virtual void call(PlanRep &PG, adjEntry adjExternal, Layout &drawing) override
Calls the layout algorithm for planarized representation PG.
int m_bendBound
bounds the number of bends per edge in ortho shaper
double m_separation
minimum distance between obkects
double cOverhang() const
Returns the option m_cOverhang, which specifies the minimal distance of incident edges to the corner ...
Definition OrthoLayout.h:77
void cOverhang(double c)
Sets the option m_cOverhang, which specifies the minimal distance of incident edges to the corner of ...
Definition OrthoLayout.h:80
int m_scalingSteps
number of scaling steps (NOT REALLY USED!)
bool m_progressive
use progressive ortho style (prefer 180 degree angles on deg-2 vertices).
void scaling(bool b)
Selects if scaling is used in the compaction phase.
bool m_useScalingCompaction
use scaling for compaction
OrthoLayout()
Creates an instance of Orthogonal layout and sets options to default values.
void separation(double sep) override
Sets the minimum distance between vertices.
Definition OrthoLayout.h:71
double m_cOverhang
distance to corner (relative to node size)
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:57
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.