Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

GraphAttributes.h
Go to the documentation of this file.
1 
36 #pragma once
37 
38 #include <ogdf/basic/NodeArray.h>
39 #include <ogdf/basic/EdgeArray.h>
40 #include <ogdf/basic/geometry.h>
42 #include <ogdf/basic/exceptions.h>
43 
44 
45 namespace ogdf {
46 
48 
68 
69 protected:
70  const Graph *m_pGraph;
71 
72  bool m_directed;
73 
74  // graphical representation of nodes
88 
89  // other node attributes
93 
94  // graphical representation of edges
99 
100  // other edge attributes
105 
107 
108 public:
109 
113 
116  static const long nodeGraphics;
117 
119  static const long edgeGraphics;
120 
122  static const long edgeIntWeight;
123 
125  static const long edgeDoubleWeight;
126 
128  static const long edgeLabel;
129 
131  static const long nodeLabel;
132 
134  static const long edgeType;
135 
137  static const long nodeType;
138 
140  static const long nodeId;
141 
143  static const long edgeArrow;
144 
146  static const long edgeStyle;
147 
150  static const long nodeStyle;
151 
153  static const long nodeTemplate;
154 
157  static const long edgeSubGraphs;
158 
160  static const long nodeWeight;
161 
163  static const long threeD;
164 
166  static const long nodeLabelPosition;
167 
169  static const long all;
170 
172 
176 
179 
182  GraphAttributes();
183 
185 
189  explicit GraphAttributes(const Graph &G, long attr = nodeGraphics | edgeGraphics);
190 
192  GraphAttributes(const GraphAttributes&) = default;
193 
195  GraphAttributes& operator=(const GraphAttributes&) = default;
196 
197  virtual ~GraphAttributes() {
198  }
199 
201  long attributes() const {
202  return m_attributes;
203  }
204 
206  inline bool has(long attr) const {
207  return (m_attributes & attr) == attr;
208  }
209 
211 
218  virtual void init(const Graph &G, long attr);
219 
222  void init(long attr);
223 
225  void addAttributes(long attr);
226 
228  void destroyAttributes(long attr);
229 
231  const Graph& constGraph() const {
232  return *m_pGraph;
233  }
234 
236 
239 
242  bool directed() const {
243  return m_directed;
244  }
245 
247  bool &directed() {
248  return m_directed;
249  }
250 
252 
255 
258 
261  double x(node v) const {
262  OGDF_ASSERT(has(nodeGraphics));
263  return m_x[v];
264  }
265 
266 
268 
271  double &x(node v) {
272  OGDF_ASSERT(has(nodeGraphics));
273  return m_x[v];
274  }
275 
276 
278 
281  double y(node v) const {
282  OGDF_ASSERT(has(nodeGraphics));
283  return m_y[v];
284  }
285 
286 
288 
291  double &y(node v) {
292  OGDF_ASSERT(has(nodeGraphics));
293  return m_y[v];
294  }
295 
296 
298 
301  double z(node v) const {
302  OGDF_ASSERT(has(threeD));
303  return m_z[v];
304  }
305 
306 
308 
311  double &z(node v) {
312  OGDF_ASSERT(has(threeD));
313  return m_z[v];
314  }
315 
316 
318 
321  double xLabel(node v) const {
322  OGDF_ASSERT(has(nodeLabelPosition));
323  return m_nodeLabelPosX[v];
324  }
325 
327 
330  double &xLabel(node v) {
331  OGDF_ASSERT(has(nodeLabelPosition));
332  return m_nodeLabelPosX[v];
333  }
334 
335 
337 
340  double yLabel(node v) const {
341  OGDF_ASSERT(has(nodeLabelPosition));
342  return m_nodeLabelPosY[v];
343  }
344 
346 
349  double &yLabel(node v) {
350  OGDF_ASSERT(has(nodeLabelPosition));
351  return m_nodeLabelPosY[v];
352  }
353 
354 
356 
359  double zLabel(node v) const {
360  OGDF_ASSERT(has(nodeLabelPosition));
361  OGDF_ASSERT(has(threeD));
362  return m_nodeLabelPosZ[v];
363  }
364 
366 
369  double &zLabel(node v) {
370  OGDF_ASSERT(has(nodeLabelPosition));
371  OGDF_ASSERT(has(threeD));
372  return m_nodeLabelPosZ[v];
373  }
374 
375 
377 
380  double width(node v) const {
381  OGDF_ASSERT(has(nodeGraphics));
382  return m_width[v];
383  }
384 
386 
389  double &width(node v) {
390  OGDF_ASSERT(has(nodeGraphics));
391  return m_width[v];
392  }
393 
394 
396 
399  const NodeArray<double> &width() const {
400  OGDF_ASSERT(has(nodeGraphics));
401  return m_width;
402  }
403 
405 
409  OGDF_ASSERT(has(nodeGraphics));
410  return m_width;
411  }
412 
413 
415 
418  double height(node v) const {
419  OGDF_ASSERT(has(nodeGraphics));
420  return m_height[v];
421  }
422 
424 
427  double &height(node v) {
428  OGDF_ASSERT(has(nodeGraphics));
429  return m_height[v];
430  }
431 
432 
434 
437  const NodeArray<double> &height() const {
438  OGDF_ASSERT(has(nodeGraphics));
439  return m_height;
440  }
441 
443 
447  OGDF_ASSERT(has(nodeGraphics));
448  return m_height;
449  }
450 
451 
453 
456  Shape shape(node v) const {
457  OGDF_ASSERT(has(nodeGraphics));
458  return m_nodeShape[v];
459  }
460 
462 
466  OGDF_ASSERT(has(nodeGraphics));
467  return m_nodeShape[v];
468  }
469 
470 
472 
476  OGDF_ASSERT(has(nodeStyle));
477  return m_nodeStroke[v].m_type;
478  }
479 
481 
485  OGDF_ASSERT(has(nodeStyle));
486  return m_nodeStroke[v].m_type;
487  }
488 
489 
491 
494  const Color &strokeColor(node v) const {
495  OGDF_ASSERT(has(nodeStyle));
496  return m_nodeStroke[v].m_color;
497  }
498 
500 
504  OGDF_ASSERT(has(nodeStyle));
505  return m_nodeStroke[v].m_color;
506  }
507 
508 
510 
513  float strokeWidth(node v) const {
514  OGDF_ASSERT(has(nodeStyle));
515  return m_nodeStroke[v].m_width;
516  }
517 
519 
522  float &strokeWidth(node v) {
523  OGDF_ASSERT(has(nodeStyle));
524  return m_nodeStroke[v].m_width;
525  }
526 
528 
532  OGDF_ASSERT(has(nodeStyle));
533  return m_nodeFill[v].m_pattern;
534  }
535 
537 
541  OGDF_ASSERT(has(nodeStyle));
542  return m_nodeFill[v].m_pattern;
543  }
544 
546 
549  const Color &fillColor(node v) const {
550  OGDF_ASSERT(has(nodeStyle));
551  return m_nodeFill[v].m_color;
552  }
553 
555 
559  OGDF_ASSERT(has(nodeStyle));
560  return m_nodeFill[v].m_color;
561  }
562 
563 
565 
568  const Color &fillBgColor(node v) const {
569  OGDF_ASSERT(has(nodeStyle));
570  return m_nodeFill[v].m_bgColor;
571  }
572 
574 
578  OGDF_ASSERT(has(nodeStyle));
579  return m_nodeFill[v].m_bgColor;
580  }
581 
582 
584 
587  const string &label(node v) const {
588  OGDF_ASSERT(has(nodeLabel));
589  return m_nodeLabel[v];
590  }
591 
593 
596  string &label(node v) {
597  OGDF_ASSERT(has(nodeLabel));
598  return m_nodeLabel[v];
599  }
600 
601 
603 
606  const string &templateNode(node v) const {
607  OGDF_ASSERT(has(nodeTemplate));
608  return m_nodeTemplate[v];
609  }
610 
612 
615  string &templateNode(node v) {
616  OGDF_ASSERT(has(nodeTemplate));
617  return m_nodeTemplate[v];
618  }
619 
620 
622 
625  int weight(node v) const {
626  OGDF_ASSERT(has(nodeWeight));
627  return m_nodeIntWeight[v];
628  }
629 
631 
634  int &weight(node v) {
635  OGDF_ASSERT(has(nodeWeight));
636  return m_nodeIntWeight[v];
637  }
638 
639 
641 
645  OGDF_ASSERT(has(nodeType));
646  return m_vType.valid() ? m_vType[v] : Graph::NodeType::vertex;
647  }
648 
650 
654  OGDF_ASSERT(has(nodeType));
655  return m_vType[v];
656  }
657 
658 
660 
663  int idNode(node v) const {
664  OGDF_ASSERT(has(nodeId));
665  return m_nodeId[v];
666  }
667 
669 
672  int &idNode(node v) {
673  OGDF_ASSERT(has(nodeId));
674  return m_nodeId[v];
675  }
676 
678 
681 
683 
685 
693  const DPolyline &bends(edge e) const {
694  OGDF_ASSERT(has(edgeGraphics));
695  return m_bends[e];
696  }
697 
699 
705  OGDF_ASSERT(has(edgeGraphics));
706  return m_bends[e];
707  }
708 
709 
711 
715  OGDF_ASSERT(has(edgeArrow));
716  return m_edgeArrow[e];
717  }
718 
720 
724  OGDF_ASSERT(has(edgeArrow));
725  return m_edgeArrow[e];
726  }
727 
728 
730 
734  OGDF_ASSERT(has(edgeStyle));
735  return m_edgeStroke[e].m_type;
736  }
737 
739 
743  OGDF_ASSERT(has(edgeStyle));
744  return m_edgeStroke[e].m_type;
745  }
746 
747 
749 
752  const Color &strokeColor(edge e) const {
753  OGDF_ASSERT(has(edgeStyle));
754  return m_edgeStroke[e].m_color;
755  }
756 
758 
762  OGDF_ASSERT(has(edgeStyle));
763  return m_edgeStroke[e].m_color;
764  }
765 
766 
768 
771  float strokeWidth(edge e) const {
772  OGDF_ASSERT(has(edgeStyle));
773  return m_edgeStroke[e].m_width;
774  }
775 
777 
780  float &strokeWidth(edge e) {
781  OGDF_ASSERT(has(edgeStyle));
782  return m_edgeStroke[e].m_width;
783  }
784 
785 
787 
790  const string &label(edge e) const {
791  OGDF_ASSERT(has(edgeLabel));
792  return m_edgeLabel[e];
793  }
794 
796 
799  string &label(edge e) {
800  OGDF_ASSERT(has(edgeLabel));
801  return m_edgeLabel[e];
802  }
803 
804 
806 
809  int intWeight(edge e) const {
810  OGDF_ASSERT(has(edgeIntWeight));
811  return m_intWeight[e];
812  }
813 
815 
818  int &intWeight(edge e) {
819  OGDF_ASSERT(has(edgeIntWeight));
820  return m_intWeight[e];
821  }
822 
823 
825 
828  double doubleWeight(edge e) const {
829  OGDF_ASSERT(has(edgeDoubleWeight));
830  return m_doubleWeight[e];
831  }
832 
834 
837  double &doubleWeight(edge e) {
838  OGDF_ASSERT(has(edgeDoubleWeight));
839  return m_doubleWeight[e];
840  }
841 
842 
844 
848  OGDF_ASSERT(has(edgeType));
849  return m_eType.valid() ? m_eType[e] : Graph::EdgeType::association;
850  }
851 
853 
857  OGDF_ASSERT(has(edgeType));
858  return m_eType[e];
859  }
860 
861 
863 
866  uint32_t subGraphBits(edge e) const {
867  OGDF_ASSERT(has(edgeSubGraphs));
868  return m_subGraph[e];
869  }
870 
872 
875  uint32_t &subGraphBits(edge e) {
876  OGDF_ASSERT(has(edgeSubGraphs));
877  return m_subGraph[e];
878  }
879 
880 
882 
885  bool inSubGraph(edge e, int n) const {
886  OGDF_ASSERT(has(edgeSubGraphs));
887  OGDF_ASSERT(n>=0);
888  OGDF_ASSERT(n<32);
889  return (m_subGraph[e] & (1 << n)) != 0;
890  }
891 
892 
894 
897  void addSubGraph(edge e, int n) {
898  OGDF_ASSERT(has(edgeSubGraphs));
899  OGDF_ASSERT(n>=0);
900  OGDF_ASSERT(n<32);
901  m_subGraph[e] |= (1 << n);
902  }
903 
904 
906 
909  void removeSubGraph(edge e, int n) {
910  OGDF_ASSERT(has(edgeSubGraphs));
911  OGDF_ASSERT(n>=0);
912  OGDF_ASSERT(n<32);
913  m_subGraph[e] &= ~(1 << n);
914  }
915 
917 
920 
923 
932  virtual void scale(double sx, double sy, bool scaleNodes = true);
933 
935 
943  virtual void scale(double s, bool scaleNodes = true) { scale(s, s, scaleNodes); }
944 
946 
950  virtual void translate(double dx, double dy);
951 
953  virtual void translateToNonNeg();
954 
956 
960  virtual void flipVertical() { flipVertical(boundingBox()); }
961 
963 
967  virtual void flipVertical(const DRect &box);
968 
970 
974  virtual void flipHorizontal() { flipHorizontal(boundingBox()); }
975 
977 
981  virtual void flipHorizontal(const DRect &box);
982 
984 
994  virtual void scaleAndTranslate(double sx, double sy, double dx, double dy, bool scaleNodes = true);
995 
997 
1006  virtual void scaleAndTranslate(double s, double dx, double dy, bool scaleNodes = true) {
1007  scaleAndTranslate(s, s, dx, dy, scaleNodes);
1008  }
1009 
1011  virtual void rotateRight90();
1012 
1014  virtual void rotateLeft90();
1015 
1017 
1020 
1023  inline DPoint point(node v) const { return DPoint(m_x[v], m_y[v]); }
1024 
1026 
1038  void transferToOriginal(GraphAttributes &origAttr) const;
1039 
1041 
1054  void transferToCopy(GraphAttributes &copyAttr) const;
1055 
1057 
1060  virtual DRect boundingBox() const;
1061 
1063 
1068  template<class Rectangle = DRect>
1069  void nodeBoundingBoxes(NodeArray<Rectangle> &boundingBoxes) const {
1070  for (node v : constGraph().nodes) {
1071  double vHalfWidth = width(v) / 2.0;
1072  double vHalfHeight = height(v) / 2.0;
1073  boundingBoxes[v] = Rectangle(x(v) - vHalfWidth, y(v) - vHalfHeight,
1074  x(v) + vHalfWidth, y(v) + vHalfHeight);
1075  }
1076  }
1077 
1079 
1082  void setAllWidth(double w);
1083 
1085 
1088  void setAllHeight(double h);
1089 
1091 
1094  void clearAllBends();
1095 
1097 
1106  void removeUnnecessaryBendsHV();
1107 
1109 
1120  void addNodeCenter2Bends(int mode = 1);
1121 
1123 
1131  bool isAssociationClass(node v) const {
1133  }
1134 
1136 
1144  int hierarchyList(List<List<node>*> &list) const;
1145 
1147 
1155  int hierarchyList(List<List<edge>*> &list) const;
1156 
1158 
1159 private:
1161  void copyNodeAttributes(GraphAttributes &toAttr, node vFrom, node vTo, long attrs) const;
1162 
1164  void copyEdgeAttributes(GraphAttributes &toAttr, edge eFrom, edge eTo, long attrs) const;
1165 };
1166 
1167 }
bool & directed()
Returns if the graph is directed.
EdgeArrow & arrowType(edge e)
Returns the arrow type of edge e.
Color & strokeColor(edge e)
Returns the stroke color of edge e.
double width(node v) const
Returns the width of the bounding box of node v.
double & zLabel(node v)
Returns the label z-coordinate of node v.
int & idNode(node v)
Returns the user ID of node v.
uint32_t & subGraphBits(edge e)
Returns the edgesubgraph value of an edge e.
EdgeArray< Stroke > m_edgeStroke
stroke of an edge
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:492
NodeArray< double > m_width
width of a node&#39;s bounding box
const Color & fillColor(node v) const
Returns the fill color of node v.
StrokeType & strokeType(edge e)
Returns the stroke type of edge e.
FillPattern fillPattern(node v) const
Returns the fill pattern of node v.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
GenericPoint< double > DPoint
Representing two-dimensional point with real coordinates.
Definition: geometry.h:244
bool has(long attr) const
Returns true iff all attributes in attr are available.
static const long edgeLabel
Corresponds to edge attribute label(edge).
NodeArray< double > m_z
z-coordinate of a node
bool m_directed
whether or not the graph is directed
virtual void scale(double s, bool scaleNodes=true)
Scales the layout by s.
const Color & strokeColor(node v) const
Returns the stroke color of node v.
Rectangles with real coordinates.
Definition: geometry.h:815
static const long edgeIntWeight
Corresponds to edge attribute intWeight(edge).
const Graph * m_pGraph
associated graph
virtual void flipVertical()
Flips the layout vertically within its bounding box.
static const long nodeId
Corresponds to node attribute idNode(node).
StrokeType & strokeType(node v)
Returns the stroke type of node v.
double & z(node v)
Returns the z-coordinate of node v.
Graph::NodeType & type(node v)
Returns the type of node v.
EdgeArray< Graph::EdgeType > m_eType
type of an edge (association or generalization)
double & xLabel(node v)
Returns the label x-coordinate of node v.
static const long nodeTemplate
Corresponds to node attribute templateNode(node).
Declares class LayoutStandards which specifies default / standard values used in graph layouts...
string & label(edge e)
Returns the label of edge e.
Dynamic arrays indexed with edges.
Definition: EdgeArray.h:112
bool directed() const
Returns if the graph is directed.
int weight(node v) const
Returns the weight of node v.
void init()
Definition: graphics.h:472
FillPattern
Fill patterns.
Definition: graphics.h:103
bool valid() const
Returns true iff the array is associated with a graph.
Definition: EdgeArray.h:161
EdgeArrow
Types for edge arrows.
Definition: graphics.h:186
bool isAssociationClass(node v) const
Returns true iff v represents an association class.
string & label(node v)
Returns the label of node v.
const DPolyline & bends(edge e) const
Returns the list of bend points of edge e.
static const long nodeStyle
Corresponds to node attributes strokeColor(node), strokeType(node), strokeWidth(node), fillPattern(node), fillColor(node), and fillBgColor(node).
EdgeArray< uint32_t > m_subGraph
is element of subgraphs given by bitvector
Color & strokeColor(node v)
Returns the stroke color of node v.
void nodeBoundingBoxes(NodeArray< Rectangle > &boundingBoxes) const
Computes the bounding rectangle for each node.
NodeArray< Stroke > m_nodeStroke
stroke of a node
double height(node v) const
Returns the height of the bounding box of node v.
double & y(node v)
Returns the y-coordinate of node v.
void removeSubGraph(edge e, int n)
Removes edge e from basic graph n.
double xLabel(node v) const
Returns the label x-coordinate of node v.
const string & label(edge e) const
Returns the label of edge e.
EdgeArray< EdgeArrow > m_edgeArrow
arrow type of an edge
static const long nodeLabelPosition
Corresponds to node attributes xLabel(node), yLabel(node), and zLabel(node).
bool inSubGraph(edge e, int n) const
Checks whether edge e belongs to basic graph n.
double y(node v) const
Returns the y-coordinate of node v.
string & templateNode(node v)
Returns the template name of node v.
Shape
Types for node shapes.
Definition: graphics.h:149
NodeArray< double > m_nodeLabelPosZ
z-coordinate of a node label
NodeArray< string > m_nodeLabel
label of a node
long m_attributes
bit vector of currently used attributes
virtual void flipHorizontal()
Flips the layout horizontally within its bounding box.
Declaration and implementation of EdgeArray class.
const string & label(node v) const
Returns the label of node v.
static const long all
Enables all available flags.
Graph::EdgeType type(edge e) const
Returns the type of edge e.
NodeArray< Graph::NodeType > m_vType
type (vertex, dummy, generalizationMerger)
NodeArray< double > & height()
Returns a reference to the node array m_height.
static const long nodeLabel
Corresponds to node attribute label(node).
static const long nodeWeight
Corresponds to node attribute weight(node).
NodeArray< int > m_nodeId
user ID of a node
EdgeType
The type of edges (only used in derived classes).
Definition: Graph_d.h:538
DPolyline & bends(edge e)
Returns the list of bend points of edge e.
static const long edgeDoubleWeight
Corresponds to edge attribute doubleWeight(edge).
Colors represented as RGBA values.
Definition: graphics.h:205
Stores additional attributes of a graph (like layout information).
int intWeight(edge e) const
Returns the (integer) weight of edge e.
float & strokeWidth(edge e)
Returns the stroke width of edge e.
double & height(node v)
Returns the height of the bounding box of node v.
DPoint point(node v) const
Returns a DPoint corresponding to the x- and y-coordinates of v.
NodeArray< string > m_nodeTemplate
name of template of a node
Doubly linked lists (maintaining the length of the list).
Definition: List.h:40
Definition of exception classes.
NodeArray< int > m_nodeIntWeight
(integer) weight of a node
virtual void scaleAndTranslate(double s, double dx, double dy, bool scaleNodes=true)
Scales the layout by s and then translates it by (dx,dy).
NodeArray< double > m_nodeLabelPosX
x-coordinate of a node label
int & intWeight(edge e)
Returns the (integer) weight of edge e.
const string & templateNode(node v) const
Returns the template name of node v.
Class for the representation of edges.
Definition: Graph_d.h:292
double z(node v) const
Returns the z-coordinate of node v.
static const long threeD
Corresponds to node attribute z(node). Note that all methods work on 2D coordinates only...
int & weight(node v)
Returns the weight of node v.
double x(node v) const
Returns the x-coordinate of node v.
long attributes() const
Returns currently accessible attributes.
Class for the representation of nodes.
Definition: Graph_d.h:169
bool valid() const
Returns true iff the array is associated with a graph.
Definition: NodeArray.h:157
NodeArray< double > m_x
x-coordinate of a node
const Graph & constGraph() const
Returns a reference to the associated graph.
Declaration and implementation of NodeArray class.
Polylines with PointType points.
Definition: geometry.h:263
static const long edgeGraphics
Corresponds to edge attribute bends(edge).
float strokeWidth(edge e) const
Returns the stroke width of edge e.
double zLabel(node v) const
Returns the label z-coordinate of node v.
const Color & fillBgColor(node v) const
Returns the background color of fill patterns for node v.
NodeArray< Shape > m_nodeShape
shape of a node
NodeArray< double > m_height
height of a nodes&#39;s bounding box
double & x(node v)
Returns the x-coordinate of node v.
StrokeType strokeType(node v) const
Returns the stroke type of node v.
EdgeArray< double > m_doubleWeight
(real number) weight of an edge
Graph::EdgeType & type(edge e)
Returns the type of edge e.
static const long nodeType
Corresponds to node attribute type(node).
Color & fillColor(node v)
Returns the fill color of node v.
double yLabel(node v) const
Returns the label y-coordinate of node v.
StrokeType strokeType(edge e) const
Returns the stroke type of edge e.
const NodeArray< double > & height() const
Returns a reference to the node array m_height.
Graph::NodeType type(node v) const
Returns the type of node v.
int idNode(node v) const
Returns the user ID of node v.
StrokeType
Line types of strokes.
Definition: graphics.h:46
double & width(node v)
Returns the width of the bounding box of node v.
const Color & strokeColor(edge e) const
Returns the stroke color of edge e.
EdgeArray< int > m_intWeight
(integer) weight of an edge
static const long edgeArrow
Corresponds to edge attribute arrowType(edge).
static const long edgeSubGraphs
Corresponds to edge attributes modified by addSubGraph(edge, int), inSubGraph(edge, int) const, and removeSubGraph(edge, int).
double doubleWeight(edge e) const
Returns the (real number) weight of edge e.
The namespace for all OGDF objects.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment, DPolygon, DRect, DIntersectableRect.
float strokeWidth(node v) const
Returns the stroke width of node v.
NodeArray< double > m_nodeLabelPosY
y-coordinate of a node label
NodeArray< Fill > m_nodeFill
fill of a node
NodeType
The type of nodes.
Definition: Graph_d.h:545
static const long edgeType
Corresponds to edge attribute type(edge).
double & yLabel(node v)
Returns the label y-coordinate of node v.
uint32_t subGraphBits(edge e) const
Returns the edgesubgraph value of an edge e.
float & strokeWidth(node v)
Returns the stroke width of node v.
EdgeArrow arrowType(edge e) const
Returns the arrow type of edge e.
NodeArray< double > m_y
y-coordinate of a node
Color & fillBgColor(node v)
Returns the background color of fill patterns for node v.
FillPattern & fillPattern(node v)
Returns the fill pattern of node v.
double & doubleWeight(edge e)
Returns the (real number) weight of edge e.
void addSubGraph(edge e, int n)
Adds edge e to basic graph n.
Shape shape(node v) const
Returns the shape type of node v.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Definition: basic.h:41
EdgeArray< DPolyline > m_bends
list of bend points of an edge
NodeArray< double > & width()
Returns a reference to the node array #m_width.
EdgeArray< string > m_edgeLabel
label of an edge
static const long nodeGraphics
Corresponds to node attributes x(node), y(node), width(node), height(node), and shape(node).
Shape & shape(node v)
Returns the shape type of node v.
const NodeArray< double > & width() const
Returns a reference to the node array m_width.
static const long edgeStyle
Corresponds to edge attributes strokeColor(edge), strokeType(edge), and strokeWidth(edge).