Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

OrthoLayout.h
Go to the documentation of this file.
1 
33 #pragma once
34 
37 
38 namespace ogdf {
39 
42 public:
44  OrthoLayout();
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 
67  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 
115 private:
116  // compute bounding box and move final drawing such that it is 0 aligned
117  // respecting margins
118  void computeBoundingBox(const PlanRep& PG, Layout& drawing);
119 
120  // options
121 
122  double m_separation;
123  double m_cOverhang;
124  double m_margin;
125 
128 
131 };
132 
133 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::OrthoLayout::separation
void separation(double sep) override
Sets the minimum distance between vertices.
Definition: OrthoLayout.h:71
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:80
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:57
ogdf::OrthoLayout::m_margin
double m_margin
margin around drawing
Definition: OrthoLayout.h:124
ogdf::OrthoLayout::m_progressive
bool m_progressive
use progressive ortho style (prefer 180 degree angles on deg-2 vertices).
Definition: OrthoLayout.h:126
ogdf::OrthoLayout::m_useScalingCompaction
bool m_useScalingCompaction
use scaling for compaction
Definition: OrthoLayout.h:129
ogdf::OrthoLayout::scaling
bool scaling() const
Returns whether scaling is used in the compaction phase.
Definition: OrthoLayout.h:101
ogdf::OrthoLayout::progressive
bool progressive() const
Returns whether the currently selected orthogonaliaztion model is progressive.
Definition: OrthoLayout.h:92
ogdf::OrthoLayout::m_separation
double m_separation
minimum distance between obkects
Definition: OrthoLayout.h:122
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:77
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:135
ogdf::OrthoLayout::scaling
void scaling(bool b)
Selects if scaling is used in the compaction phase.
Definition: OrthoLayout.h:104
ogdf::OrthoLayout::bendBound
void bendBound(int i)
Set bound on the number of bends.
Definition: OrthoLayout.h:107
ogdf::Layout
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:46
ogdf::OrthoLayout::progressive
void progressive(bool b)
Selects if the progressive (true) or traditional (false) orthogonalization model is used.
Definition: OrthoLayout.h:98
OrthoRep.h
Declaration of orthogonal representation of planar graphs.
ogdf::OrthoLayout::m_bendBound
int m_bendBound
bounds the number of bends per edge in ortho shaper
Definition: OrthoLayout.h:127
ogdf::LayoutPlanRepModule
Interface for planar layout algorithms (used in the planarization approach).
Definition: LayoutPlanRepModule.h:45
ogdf::OrthoLayout
The Orthogonal layout algorithm for planar graphs.
Definition: OrthoLayout.h:41
ogdf::OrthoLayout::margin
double margin() const
Returns the desired margin around the drawing.
Definition: OrthoLayout.h:86
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:130
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:123
ogdf::OrthoLayout::margin
void margin(double m)
Sets the desired margin around the drawing.
Definition: OrthoLayout.h:89