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
35#include <ogdf/basic/Graph.h>
36#include <ogdf/basic/basic.h>
38
39namespace ogdf {
40class Layout;
41class PlanRep;
42
45public:
48
49
50 // calls planar UML layout algorithm. Input is a planarized representation
51 // PG of a connected component of the graph, output is a layout of the
52 // (modified) planarized representation in drawing
54
63 virtual void call(PlanRep& PG, adjEntry adjExternal, Layout& drawing) override;
64
71 double separation() const override { return m_separation; }
72
74 void separation(double sep) override { m_separation = sep; }
75
77
80 double cOverhang() const { return m_cOverhang; }
81
83 void cOverhang(double c) { m_cOverhang = c; }
84
86
89 double margin() const { return m_margin; }
90
92 void margin(double m) { m_margin = m; }
93
95 bool progressive() const { return m_progressive; }
96
98
101 void progressive(bool b) { m_progressive = b; }
102
104 bool scaling() const { return m_useScalingCompaction; }
105
107 void scaling(bool b) { m_useScalingCompaction = b; }
108
110 void bendBound(int i) {
111 if (i >= 0) {
112 m_bendBound = i;
113 }
114 }
115
117
118private:
119 // compute bounding box and move final drawing such that it is 0 aligned
120 // respecting margins
121 void computeBoundingBox(const PlanRep& PG, Layout& drawing);
122
123 // options
124
126 double m_cOverhang;
127 double m_margin;
128
131
134};
135
136}
Includes declaration of graph class.
Declaration of interface for planar layout algorithms (used in planarization approach).
Basic declarations, included by all source files.
Class for adjacency list elements.
Definition Graph_d.h:143
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition Layout.h:49
Interface for planar layout algorithms (used in the planarization approach).
The Orthogonal layout algorithm for planar graphs.
Definition OrthoLayout.h:44
void progressive(bool b)
Selects if the progressive (true) or traditional (false) orthogonalization model is used.
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:71
bool progressive() const
Returns whether the currently selected orthogonaliaztion model is progressive.
Definition OrthoLayout.h:95
double m_margin
margin around drawing
void margin(double m)
Sets the desired margin around the drawing.
Definition OrthoLayout.h:92
double margin() const
Returns the desired margin around the drawing.
Definition OrthoLayout.h:89
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:80
void cOverhang(double c)
Sets the option m_cOverhang, which specifies the minimal distance of incident edges to the corner of ...
Definition OrthoLayout.h:83
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:74
double m_cOverhang
distance to corner (relative to node size)
Planarized representations (of a connected component) of a graph.
Definition PlanRep.h:68
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.