Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

LayoutStandards.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/graphics.h>
36 
37 
38 namespace ogdf {
39 
41 
45 
46  static double s_defNodeWidth;
47  static double s_defNodeHeight;
51 
54 
57 
58  static double s_defNodeSeparation;
59  static double s_defCCSeparation;
60 
61 public:
62 
68 
70  static double defaultNodeWidth() { return s_defNodeWidth; }
72 
75  static void setDefaultNodeWidth(double w) {
76  if(w > 0.0)
77  s_defNodeWidth = w;
78  }
79 
81  static double defaultNodeHeight() { return s_defNodeHeight; }
83 
86  static void setDefaultNodeHeight(double h) {
87  if(h > 0.0)
88  s_defNodeHeight = h;
89  }
90 
92  static Shape defaultNodeShape() { return s_defNodeShape; }
94  static void setDefaultNodeShape(Shape s) { s_defNodeShape = s; }
95 
97  static Stroke defaultNodeStroke() { return s_defNodeStroke; }
99  static Color defaultNodeStrokeColor() { return s_defNodeStroke.m_color; }
101  static float defaultNodeStrokeWidth() { return s_defNodeStroke.m_width; }
103  static void setDefaultNodeStroke(Stroke stroke) { s_defNodeStroke = stroke; }
104 
106  static Fill defaultNodeFill() { return s_defNodeFill; }
108  static Color defaultNodeFillColor() { return s_defNodeFill.m_color; }
110  static void setDefaultNodeFill(Fill fill) { s_defNodeFill = fill; }
111 
113 
118 
120  static Stroke defaultEdgeStroke() { return s_defEdgeStroke; }
122  static Color defaultEdgeStrokeColor() { return s_defEdgeStroke.m_color; }
124  static float defaultEdgeStrokeWidth() { return s_defEdgeStroke.m_width; }
126  static void setDefaultEdgeStroke(Stroke stroke) { s_defEdgeStroke = stroke; }
127 
129  static EdgeArrow defaultEdgeArrow() { return s_defEdgeArrow; }
131  static void setDefaultEdgeArrow(EdgeArrow arrow) { s_defEdgeArrow = arrow; }
132 
134 
139 
141  static Stroke defaultClusterStroke() { return s_defClusterStroke; }
143  static Color defaultClusterStrokeColor() { return s_defClusterStroke.m_color; }
145  static float defaultClusterStrokeWidth() { return s_defClusterStroke.m_width; }
147  static void setDefaultClusterStroke(Stroke stroke) { s_defClusterStroke = stroke; }
148 
150  static Fill defaultClusterFill() { return s_defClusterFill; }
152  static Color defaultClusterFillColor() { return s_defClusterFill.m_color; }
154  static void setDefaultClusterFill(Fill fill) { s_defClusterFill = fill; }
155 
157 
162 
164  static double defaultNodeSeparation() { return s_defNodeSeparation; }
166 
169  static void setDefaultNodeSeparation(double d) {
170  if(d > 0.0)
171  s_defNodeSeparation = d;
172  }
173 
175  static double defaultCCSeparation() { return s_defCCSeparation; }
177 
180  static void setDefaultCCSeparation(double d) {
181  if(d > 0.0)
182  s_defCCSeparation = d;
183  }
184 
186 };
187 
188 } // end namespace ogdf
static double defaultNodeWidth()
Returns the global default width for nodes.
static float defaultNodeStrokeWidth()
Returns the global default stroke width for nodes.
static void setDefaultNodeWidth(double w)
Sets the global default width for nodes to w.
static void setDefaultNodeFill(Fill fill)
Sets the global default fill for nodes to fill.
static double s_defNodeHeight
the default height of a node (must be positive).
static Color defaultNodeFillColor()
Returns the global default fill color for nodes.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
static float defaultEdgeStrokeWidth()
Returns the global default stroke width for edges.
static void setDefaultClusterFill(Fill fill)
Sets the global default fill for clusters to fill.
static Stroke s_defNodeStroke
the default stroke of a node.
static double defaultCCSeparation()
Returns the global default separation between connected components.
static Stroke defaultEdgeStroke()
Returns the global default stroke for edges.
static Shape s_defNodeShape
the default shape of a node.
static void setDefaultNodeShape(Shape s)
Sets the global default shape for nodes to s.
Color m_color
fill color
Definition: graphics.h:407
static double s_defCCSeparation
the default separation between connected components (for layout algorithms) (must be positive)...
EdgeArrow
Types for edge arrows.
Definition: graphics.h:142
static void setDefaultClusterStroke(Stroke stroke)
Sets the global default stroke for cluster to stroke.
static void setDefaultEdgeArrow(EdgeArrow arrow)
Sets the global default arrow type for edges to arrow.
static Fill s_defClusterFill
the default cluster fill.
float m_width
stroke width
Definition: graphics.h:392
static void setDefaultNodeStroke(Stroke stroke)
Sets the global default stroke for nodes to stroke.
Properties of strokes.
Definition: graphics.h:390
static EdgeArrow defaultEdgeArrow()
Returns the global default arrow type for edges.
static void setDefaultEdgeStroke(Stroke stroke)
Sets the global default stroke for edges to stroke.
Shape
Types for node shapes.
Definition: graphics.h:120
static void setDefaultNodeHeight(double h)
Sets the global default height for nodes to h.
Colors represented as RGBA values.
Definition: graphics.h:161
Standard values for graphical attributes and layouts.
static void setDefaultCCSeparation(double d)
Sets the global default separation between connected components to d.
static Color defaultClusterFillColor()
Returns the global default fill color for clusters.
static double s_defNodeWidth
the default width of a node (must be positive).
static EdgeArrow s_defEdgeArrow
the default arrow type of an edge .
static Stroke s_defEdgeStroke
the default stroke of an edge.
static Fill defaultClusterFill()
Returns the global default fill for clusters.
static double defaultNodeSeparation()
Returns the global default node separation.
static double defaultNodeHeight()
Returns the global default height for nodes.
static Color defaultEdgeStrokeColor()
Returns the global default stroke color for edges.
static Fill defaultNodeFill()
Returns the global default fill for nodes.
static float defaultClusterStrokeWidth()
Returns the global default stroke width for clusters.
static Stroke defaultClusterStroke()
Returns the global default stroke for clusters.
static Stroke defaultNodeStroke()
Returns the global default stroke for nodes.
The namespace for all OGDF objects.
static Color defaultClusterStrokeColor()
Returns the global default stroke color for clusters.
static Stroke s_defClusterStroke
the default cluster stroke.
Color m_color
stroke color
Definition: graphics.h:391
Properties of fills.
Definition: graphics.h:406
static void setDefaultNodeSeparation(double d)
Sets the global default node separation to d.
Declaration of basic types for graphics.
static Shape defaultNodeShape()
Returns the global default shape for nodes.
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 Fill s_defNodeFill
the default fill of a node.