Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
LayoutStandards.h
Go to the documentation of this file.
1
33#pragma once
34
35#include <ogdf/basic/graphics.h>
36
37namespace ogdf {
38
40
44 static double s_defNodeWidth;
45 static double s_defNodeHeight;
49
52
55
56 static double s_defNodeSeparation;
57 static double s_defCCSeparation;
58
59public:
65
67 static double defaultNodeWidth() { return s_defNodeWidth; }
68
70
73 static void setDefaultNodeWidth(double w) {
74 if (w > 0.0) {
75 s_defNodeWidth = w;
76 }
77 }
78
80 static double defaultNodeHeight() { return s_defNodeHeight; }
81
83
86 static void setDefaultNodeHeight(double h) {
87 if (h > 0.0) {
88 s_defNodeHeight = h;
89 }
90 }
91
93 static Shape defaultNodeShape() { return s_defNodeShape; }
94
96 static void setDefaultNodeShape(Shape s) { s_defNodeShape = s; }
97
99 static Stroke defaultNodeStroke() { return s_defNodeStroke; }
100
102 static Color defaultNodeStrokeColor() { return s_defNodeStroke.m_color; }
103
105 static float defaultNodeStrokeWidth() { return s_defNodeStroke.m_width; }
106
108 static void setDefaultNodeStroke(Stroke stroke) { s_defNodeStroke = stroke; }
109
111 static Fill defaultNodeFill() { return s_defNodeFill; }
112
114 static Color defaultNodeFillColor() { return s_defNodeFill.m_color; }
115
117 static void setDefaultNodeFill(Fill fill) { s_defNodeFill = fill; }
118
120
125
127 static Stroke defaultEdgeStroke() { return s_defEdgeStroke; }
128
130 static Color defaultEdgeStrokeColor() { return s_defEdgeStroke.m_color; }
131
133 static float defaultEdgeStrokeWidth() { return s_defEdgeStroke.m_width; }
134
136 static void setDefaultEdgeStroke(Stroke stroke) { s_defEdgeStroke = stroke; }
137
139 static EdgeArrow defaultEdgeArrow() { return s_defEdgeArrow; }
140
142 static void setDefaultEdgeArrow(EdgeArrow arrow) { s_defEdgeArrow = arrow; }
143
145
150
152 static Stroke defaultClusterStroke() { return s_defClusterStroke; }
153
155 static Color defaultClusterStrokeColor() { return s_defClusterStroke.m_color; }
156
158 static float defaultClusterStrokeWidth() { return s_defClusterStroke.m_width; }
159
161 static void setDefaultClusterStroke(Stroke stroke) { s_defClusterStroke = stroke; }
162
164 static Fill defaultClusterFill() { return s_defClusterFill; }
165
167 static Color defaultClusterFillColor() { return s_defClusterFill.m_color; }
168
170 static void setDefaultClusterFill(Fill fill) { s_defClusterFill = fill; }
171
173
178
180 static double defaultNodeSeparation() { return s_defNodeSeparation; }
181
183
186 static void setDefaultNodeSeparation(double d) {
187 if (d > 0.0) {
188 s_defNodeSeparation = d;
189 }
190 }
191
193 static double defaultCCSeparation() { return s_defCCSeparation; }
194
196
199 static void setDefaultCCSeparation(double d) {
200 if (d > 0.0) {
201 s_defCCSeparation = d;
202 }
203 }
204
206};
207
208}
Colors represented as RGBA values.
Definition graphics.h:160
Standard values for graphical attributes and layouts.
static void setDefaultNodeStroke(Stroke stroke)
Sets the global default stroke for nodes to stroke.
static Color defaultClusterStrokeColor()
Returns the global default stroke color for clusters.
static void setDefaultNodeShape(Shape s)
Sets the global default shape for nodes to s.
static Stroke s_defClusterStroke
the default cluster stroke.
static double defaultNodeSeparation()
Returns the global default node separation.
static Stroke s_defEdgeStroke
the default stroke of an edge.
static Fill defaultClusterFill()
Returns the global default fill for clusters.
static void setDefaultNodeFill(Fill fill)
Sets the global default fill for nodes to fill.
static float defaultEdgeStrokeWidth()
Returns the global default stroke width for edges.
static void setDefaultNodeHeight(double h)
Sets the global default height for nodes to h.
static void setDefaultNodeSeparation(double d)
Sets the global default node separation to d.
static void setDefaultCCSeparation(double d)
Sets the global default separation between connected components to d.
static Stroke s_defNodeStroke
the default stroke of a node.
static float defaultNodeStrokeWidth()
Returns the global default stroke width for nodes.
static EdgeArrow defaultEdgeArrow()
Returns the global default arrow type for edges.
static Shape s_defNodeShape
the default shape of a node.
static double s_defNodeSeparation
the default node separation (for layout algorithms) (must be positive).
static Color defaultNodeStrokeColor()
Returns the global default stroke color for nodes.
static void setDefaultNodeWidth(double w)
Sets the global default width for nodes to w.
static Color defaultClusterFillColor()
Returns the global default fill color for clusters.
static Shape defaultNodeShape()
Returns the global default shape for nodes.
static Fill defaultNodeFill()
Returns the global default fill for nodes.
static float defaultClusterStrokeWidth()
Returns the global default stroke width for clusters.
static Fill s_defNodeFill
the default fill of a node.
static double s_defNodeHeight
the default height of a node (must be positive).
static void setDefaultClusterStroke(Stroke stroke)
Sets the global default stroke for cluster to stroke.
static Color defaultNodeFillColor()
Returns the global default fill color for nodes.
static Stroke defaultEdgeStroke()
Returns the global default stroke for edges.
static double defaultNodeWidth()
Returns the global default width for nodes.
static double defaultNodeHeight()
Returns the global default height for nodes.
static Color defaultEdgeStrokeColor()
Returns the global default stroke color for edges.
static Stroke defaultClusterStroke()
Returns the global default stroke for clusters.
static Stroke defaultNodeStroke()
Returns the global default stroke for nodes.
static void setDefaultClusterFill(Fill fill)
Sets the global default fill for clusters to fill.
static void setDefaultEdgeStroke(Stroke stroke)
Sets the global default stroke for edges to stroke.
static double s_defCCSeparation
the default separation between connected components (for layout algorithms) (must be positive).
static void setDefaultEdgeArrow(EdgeArrow arrow)
Sets the global default arrow type for edges to arrow.
static EdgeArrow s_defEdgeArrow
the default arrow type of an edge .
static Fill s_defClusterFill
the default cluster fill.
static double s_defNodeWidth
the default width of a node (must be positive).
static double defaultCCSeparation()
Returns the global default separation between connected components.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition config.h:101
Declaration of basic types for graphics.
Shape
Types for node shapes.
Definition graphics.h:116
EdgeArrow
Types for edge arrows.
Definition graphics.h:141
static MultilevelBuilder * getDoubleFactoredZeroAdjustedMerger()
The namespace for all OGDF objects.
Properties of fills.
Definition graphics.h:418
Color m_color
fill color
Definition graphics.h:419
Properties of strokes.
Definition graphics.h:392
float m_width
stroke width
Definition graphics.h:394
Color m_color
stroke color
Definition graphics.h:393