Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

OrthoLayout.h
Go to the documentation of this file.
1 
33 #pragma once
34 
37 
38 namespace ogdf {
39 
42 {
43 public:
45  OrthoLayout();
46 
47 
48  // calls planar UML layout algorithm. Input is a planarized representation
49  // PG of a connected component of the graph, output is a layout of the
50  // (modified) planarized representation in drawing
52 
61  virtual void call(PlanRep &PG, adjEntry adjExternal, Layout &drawing) override;
62 
68  double separation() const override {
70  return m_separation;
71  }
72 
74  void separation(double sep) override {
75  m_separation = sep;
76  }
77 
79 
82  double cOverhang() const {
83  return m_cOverhang;
84  }
85 
87  void cOverhang(double c) {
88  m_cOverhang = c;
89  }
90 
92 
95  double margin() const {
96  return m_margin;
97  }
98 
100  void margin(double m) {
101  m_margin = m;
102  }
103 
105  bool progressive() const { return m_progressive; }
106 
108 
111  void progressive(bool b) { m_progressive = b; }
112 
114  bool scaling() const { return m_useScalingCompaction; }
115 
117  void scaling(bool b) { m_useScalingCompaction = b; }
118 
120  void bendBound(int i) {
121  if(i >= 0) m_bendBound = i;
122  }
123 
125 
126 private:
127  // compute bounding box and move final drawing such that it is 0 aligned
128  // respecting margins
129  void computeBoundingBox(const PlanRep &PG, Layout &drawing);
130 
131  // options
132 
133  double m_separation;
134  double m_cOverhang;
135  double m_margin;
136 
139 
142 };
143 
144 }
The Orthogonal layout algorithm for planar graphs.
Definition: OrthoLayout.h:41
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Declaration of orthogonal representation of planar graphs.
double m_cOverhang
distance to corner (relative to node size)
Definition: OrthoLayout.h:134
void margin(double m)
Sets the desired margin around the drawing.
Definition: OrthoLayout.h:100
bool progressive() const
Returns whether the currently selected orthogonaliaztion model is progressive.
Definition: OrthoLayout.h:105
bool scaling() const
Returns whether scaling is used in the compaction phase.
Definition: OrthoLayout.h:114
void cOverhang(double c)
Sets the option m_cOverhang, which specifies the minimal distance of incident edges to the corner of ...
Definition: OrthoLayout.h:87
Interface for planar layout algorithms (used in the planarization approach).
void progressive(bool b)
Selects if the progressive (true) or traditional (false) orthogonalization model is used...
Definition: OrthoLayout.h:111
double m_separation
minimum distance between obkects
Definition: OrthoLayout.h:133
int m_scalingSteps
number of scaling steps (NOT REALLY USED!)
Definition: OrthoLayout.h:141
void separation(double sep) override
Sets the minimum distance between vertices.
Definition: OrthoLayout.h:74
double cOverhang() const
Returns the option m_cOverhang, which specifies the minimal distance of incident edges to the corner ...
Definition: OrthoLayout.h:82
double margin() const
Returns the desired margin around the drawing.
Definition: OrthoLayout.h:95
bool m_useScalingCompaction
use scaling for compaction
Definition: OrthoLayout.h:140
void bendBound(int i)
Set bound on the number of bends.
Definition: OrthoLayout.h:120
The namespace for all OGDF objects.
double m_margin
margin around drawing
Definition: OrthoLayout.h:135
bool m_progressive
use progressive ortho style (prefer 180 degree angles on deg-2 vertices).
Definition: OrthoLayout.h:137
Class for adjacency list elements.
Definition: Graph_d.h:79
void scaling(bool b)
Selects if scaling is used in the compaction phase.
Definition: OrthoLayout.h:117
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:59
Declaration of interface for planar layout algorithms (used in planarization approach).
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:46
int m_bendBound
bounds the number of bends per edge in ortho shaper
Definition: OrthoLayout.h:138