Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
ClusterOrthoLayout.h
Go to the documentation of this file.
1
33#pragma once
34
39
40namespace ogdf {
41
43
47public:
50
51
59
62 List<edge>& origEdges, Graph& originalGraph) override;
63
64 //
65 // options
66
68 virtual double separation() const override { return m_separation; }
69
71 virtual void separation(double sep) override { m_separation = sep; }
72
74 //distance between the glue point of an edge and a corner of the vertex boundary
75 double cOverhang() const { return m_cOverhang; }
76
78 void cOverhang(double c) { m_cOverhang = c; }
79
81 double margin() const { return m_margin; }
82
84 void margin(double m) { m_margin = m; }
85
87 OrthoDir preferedDir() const { return m_preferedDir; }
88
90 void preferedDir(OrthoDir dir) { m_preferedDir = dir; }
91
93 int costAssoc() const { return m_costAssoc; }
94
96 void costAssoc(int c) { m_costAssoc = c; }
97
99 int costGen() const { return m_costGen; }
100
102 void costGen(int c) { m_costGen = c; }
103
105 void optionProfile(int i) { m_optionProfile = i; }
106
108 void align(bool b) { m_align = b; }
109
111 void scaling(bool b) { m_useScalingCompaction = b; }
112
114 //Necessary to allow setting over base class pointer
115 //bit 0 = alignment
116 //bit 1 = scaling
117 //bit 2 = progressive/traditional
118 //=> 0 is standard
119 virtual void setOptions(int optionField) override {
120 m_align = (optionField & 1) != 0;
121 m_useScalingCompaction = (optionField & 2) != 0;
122 m_orthoStyle = (optionField & 4) != 0;
123 // m_orthoStyle = 0 is traditional
124 }
125
126
127private:
128 // compute bounding box and move final drawing such that it is 0 aligned
129 // respecting margins
131
132
133 // options
135 double m_cOverhang;
136 double m_margin;
141 //align merger sons on same level
142 bool m_align;
143 //settings for scaling compaction
147};
148
149}
Declares CPlanarEdgeInserter class.
Declaration of ClusterPlanRep class, allowing cluster boundary insertion and shortest path edge inser...
Declaration of interface for planar layout algorithms for UML diagrams (used in planarization approac...
Declaration of orthogonal representation of planar graphs.
Class for adjacency list elements.
Definition Graph_d.h:79
Represents a planar orthogonal drawing algorithm for c-planar, c-connected clustered graphs.
virtual void setOptions(int optionField) override
Sets generic options by setting field bits.
double m_separation
Minimum distance between edges and vertices.
void align(bool b)
Sets alignment option.
void margin(double m)
Sets the distance from the tight bounding box to the boundary of the drawing.
void preferedDir(OrthoDir dir)
Sets the preferred direction of generalizations.
int m_scalingSteps
Number of scaling steps during compaction.
void cOverhang(double c)
Sets cOverhang value.
void costGen(int c)
Sets cost of generalizations.
int costGen() const
Returns cost of generalizations.
void computeBoundingBox(const ClusterPlanRep &PG, Layout &drawing)
ClusterOrthoLayout()
Initializes an instance of class ClusterOrthoLayout.
virtual void call(ClusterPlanRep &PG, adjEntry adjExternal, Layout &drawing, List< edge > &origEdges, Graph &originalGraph) override
Call method for non c-planar graphs.
bool m_align
Horizontal alignment option.
double m_margin
Distance between bounding box and drawing boundary.
int m_costAssoc
Compaction cost of association type edges.
int costAssoc() const
Returns cost of associations which is used in the compactions step.
OrthoDir m_preferedDir
Preferred direction of generalizations (obsolete).
bool m_useScalingCompaction
Switches scaling improvement during compaction.
void call(ClusterPlanRep &PG, adjEntry adjExternal, Layout &drawing)
Calls planar UML layout algorithm.
int m_costGen
Compaction cost of generalizations type edges.
double cOverhang() const
Returns cOverhang, where cOverhang * separation defines the minimum.
double margin() const
Returns the distance from the tight bounding box to the boundary of the drawing.
void scaling(bool b)
Sets scaling option for compaction step.
void costAssoc(int c)
Sets cost of associations which is used in the compactions step.
int m_orthoStyle
Type of style (traditional/progressive) used for shape step.
virtual double separation() const override
Returns the minimum distance between edges and vertices.
OrthoDir preferedDir() const
Returns the preferred direction of generalizations.
virtual void separation(double sep) override
Sets the minimum distance between edges and vertices.
double m_cOverhang
Factor for minimum distance between vertex corner an adjacent edges.
void optionProfile(int i)
Sets the option profile, thereby fixing a set of drawing options.
Planarized representations for clustered graphs.
Data type for general directed graphs (adjacency list representation).
Definition Graph_d.h:521
Interface for planar cluster layout algorithms.
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition Layout.h:46
Doubly linked lists (maintaining the length of the list).
Definition List.h:1435
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.
OrthoDir
Definition OrthoRep.h:50