Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 
39 namespace ogdf {
40 class Layout;
41 class PlanRep;
42 
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 { 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 
118 private:
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 
125  double m_separation;
126  double m_cOverhang;
127  double m_margin;
128 
131 
134 };
135 
136 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
Graph.h
Includes declaration of graph class.
ogdf::OrthoLayout::separation
void separation(double sep) override
Sets the minimum distance between vertices.
Definition: OrthoLayout.h:74
ogdf::OrthoLayout::cOverhang
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
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:69
ogdf::OrthoLayout::m_margin
double m_margin
margin around drawing
Definition: OrthoLayout.h:127
ogdf::OrthoLayout::m_progressive
bool m_progressive
use progressive ortho style (prefer 180 degree angles on deg-2 vertices).
Definition: OrthoLayout.h:129
ogdf::OrthoLayout::m_useScalingCompaction
bool m_useScalingCompaction
use scaling for compaction
Definition: OrthoLayout.h:132
ogdf::OrthoLayout::scaling
bool scaling() const
Returns whether scaling is used in the compaction phase.
Definition: OrthoLayout.h:104
ogdf::OrthoLayout::progressive
bool progressive() const
Returns whether the currently selected orthogonaliaztion model is progressive.
Definition: OrthoLayout.h:95
ogdf::OrthoLayout::m_separation
double m_separation
minimum distance between obkects
Definition: OrthoLayout.h:125
ogdf::OrthoLayout::cOverhang
double cOverhang() const
Returns the option m_cOverhang, which specifies the minimal distance of incident edges to the corner ...
Definition: OrthoLayout.h:80
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:142
ogdf::OrthoLayout::scaling
void scaling(bool b)
Selects if scaling is used in the compaction phase.
Definition: OrthoLayout.h:107
ogdf::OrthoLayout::bendBound
void bendBound(int i)
Set bound on the number of bends.
Definition: OrthoLayout.h:110
ogdf::Layout
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:49
ogdf::OrthoLayout::progressive
void progressive(bool b)
Selects if the progressive (true) or traditional (false) orthogonalization model is used.
Definition: OrthoLayout.h:101
ogdf::OrthoLayout::m_bendBound
int m_bendBound
bounds the number of bends per edge in ortho shaper
Definition: OrthoLayout.h:130
ogdf::LayoutPlanRepModule
Interface for planar layout algorithms (used in the planarization approach).
Definition: LayoutPlanRepModule.h:48
ogdf::OrthoLayout
The Orthogonal layout algorithm for planar graphs.
Definition: OrthoLayout.h:44
ogdf::OrthoLayout::margin
double margin() const
Returns the desired margin around the drawing.
Definition: OrthoLayout.h:89
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::OrthoLayout::m_scalingSteps
int m_scalingSteps
number of scaling steps (NOT REALLY USED!)
Definition: OrthoLayout.h:133
LayoutPlanRepModule.h
Declaration of interface for planar layout algorithms (used in planarization approach).
ogdf::OrthoLayout::m_cOverhang
double m_cOverhang
distance to corner (relative to node size)
Definition: OrthoLayout.h:126
ogdf::OrthoLayout::margin
void margin(double m)
Sets the desired margin around the drawing.
Definition: OrthoLayout.h:92