Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

OrthoLayout.h
Go to the documentation of this file.
1 
33 #pragma once
34 
37 
38 
39 namespace ogdf {
40 
41 
44 {
45 public:
47  OrthoLayout();
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 
70  double separation() const override {
72  return m_separation;
73  }
74 
76  void separation(double sep) override {
77  m_separation = sep;
78  }
79 
81 
84  double cOverhang() const {
85  return m_cOverhang;
86  }
87 
89  void cOverhang(double c) {
90  m_cOverhang = c;
91  }
92 
94 
97  double margin() const {
98  return m_margin;
99  }
100 
102  void margin(double m) {
103  m_margin = m;
104  }
105 
107  bool progressive() const { return m_progressive; }
108 
110 
113  void progressive(bool b) { m_progressive = b; }
114 
116  bool scaling() const { return m_useScalingCompaction; }
117 
119  void scaling(bool b) { m_useScalingCompaction = b; }
120 
122  void bendBound(int i) {
123  if(i >= 0) m_bendBound = i;
124  }
125 
127 
128 private:
129  // compute bounding box and move final drawing such that it is 0 aligned
130  // respecting margins
131  void computeBoundingBox(const PlanRep &PG, Layout &drawing);
132 
133  // options
134 
135  double m_separation;
136  double m_cOverhang;
137  double m_margin;
138 
141 
144 };
145 
146 
147 } // end namespace ogdf
The Orthogonal layout algorithm for planar graphs.
Definition: OrthoLayout.h:43
#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:136
void margin(double m)
Sets the desired margin around the drawing.
Definition: OrthoLayout.h:102
bool progressive() const
Returns whether the currently selected orthogonaliaztion model is progressive.
Definition: OrthoLayout.h:107
bool scaling() const
Returns whether scaling is used in the compaction phase.
Definition: OrthoLayout.h:116
void cOverhang(double c)
Sets the option m_cOverhang, which specifies the minimal distance of incident edges to the corner of ...
Definition: OrthoLayout.h:89
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:113
double m_separation
minimum distance between obkects
Definition: OrthoLayout.h:135
int m_scalingSteps
number of scaling steps (NOT REALLY USED!)
Definition: OrthoLayout.h:143
void separation(double sep) override
Sets the minimum distance between vertices.
Definition: OrthoLayout.h:76
double cOverhang() const
Returns the option m_cOverhang, which specifies the minimal distance of incident edges to the corner ...
Definition: OrthoLayout.h:84
double margin() const
Returns the desired margin around the drawing.
Definition: OrthoLayout.h:97
bool m_useScalingCompaction
use scaling for compaction
Definition: OrthoLayout.h:142
void bendBound(int i)
Set bound on the number of bends.
Definition: OrthoLayout.h:122
The namespace for all OGDF objects.
double m_margin
margin around drawing
Definition: OrthoLayout.h:137
bool m_progressive
use progressive ortho style (prefer 180 degree angles on deg-2 vertices).
Definition: OrthoLayout.h:139
Class for adjacency list elements.
Definition: Graph_d.h:78
void scaling(bool b)
Selects if scaling is used in the compaction phase.
Definition: OrthoLayout.h:119
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:60
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:140