Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

graphics.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/basic.h>
35 #include <map>
36 #include <typeinfo>
37 #include <ogdf/basic/Logger.h>
38 
39 
40 namespace ogdf {
41 
43 
46 enum class StrokeType : unsigned char {
47  None,
48  Solid,
49  Dash,
50  Dot,
51  Dashdot,
52  Dashdotdot
53 };
54 
56 OGDF_EXPORT std::ostream &operator<<(std::ostream &os, const StrokeType &st);
57 
59 
63 
65 
69 
71 
75 
76 
78 
81 enum class StrokeLineCap : unsigned char{
82  Butt,
83  Round,
84  Square
85 };
86 
87 
89 
92 enum class StrokeLineJoin : unsigned char {
93  Miter,
94  Round,
95  Bevel
96 };
97 
98 
100 
103 enum class FillPattern {
104  None,
105  Solid,
106  Dense1,
107  Dense2,
108  Dense3,
109  Dense4,
110  Dense5,
111  Dense6,
112  Dense7,
113  Horizontal,
114  Vertical,
115  Cross,
119 };
120 
122 
124 
128 
130 
134 
136 OGDF_EXPORT std::ostream &operator<<(std::ostream &os, const FillPattern &fp);
137 
139 
143 
144 
146 
149 enum class Shape {
150  Rect,
151  RoundedRect,
152  Ellipse,
153  Triangle,
154  Pentagon,
155  Hexagon,
156  Octagon,
157  Rhomb,
158  Trapeze,
159  Parallelogram,
160  InvTriangle,
161  InvTrapeze,
163  Image
164 };
165 
167 
171 
173 
177 
179 OGDF_EXPORT std::ostream &operator<<(std::ostream &os, const FillPattern &fp);
180 
181 
183 
186 enum class EdgeArrow {
187  None,
188  Last,
189  First,
190  Both,
191  Undefined
192 };
193 
195 OGDF_EXPORT std::ostream &operator<<(std::ostream &os, const EdgeArrow &ea);
196 
198 
206  uint8_t m_red, m_green, m_blue, m_alpha;
207 
208 public:
210  enum class Name {
211  Aliceblue,
212  Antiquewhite,
213  Aqua,
214  Aquamarine,
215  Azure,
216  Beige,
217  Bisque,
218  Black,
219  Blanchedalmond,
220  Blue,
221  Blueviolet,
222  Brown,
223  Burlywood,
224  Cadetblue,
225  Chartreuse,
226  Chocolate,
227  Coral,
228  Cornflowerblue,
229  Cornsilk,
230  Crimson,
231  Cyan,
232  Darkblue,
233  Darkcyan,
234  Darkgoldenrod,
235  Darkgray,
236  Darkgreen,
237  Darkgrey,
238  Darkkhaki,
239  Darkmagenta,
240  Darkolivegreen,
241  Darkorange,
242  Darkorchid,
243  Darkred,
244  Darksalmon,
245  Darkseagreen,
246  Darkslateblue,
247  Darkslategray,
248  Darkslategrey,
249  Darkturquoise,
250  Darkviolet,
251  Deeppink,
252  Deepskyblue,
253  Dimgray,
254  Dimgrey,
255  Dodgerblue,
256  Firebrick,
257  Floralwhite,
258  Forestgreen,
259  Fuchsia,
260  Gainsboro,
261  Ghostwhite,
262  Gold,
263  Goldenrod,
264  Gray,
265  Green,
266  Greenyellow,
267  Grey,
268  Honeydew,
269  Hotpink,
270  Indianred,
271  Indigo,
272  Ivory,
273  Khaki,
274  Lavender,
275  Lavenderblush,
276  Lawngreen,
277  Lemonchiffon,
278  Lightblue,
279  Lightcoral,
280  Lightcyan,
281  Lightgoldenrodyellow,
282  Lightgray,
283  Lightgreen,
284  Lightgrey,
285  Lightpink,
286  Lightsalmon,
287  Lightseagreen,
288  Lightskyblue,
289  Lightslategray,
290  Lightslategrey,
291  Lightsteelblue,
292  Lightyellow,
293  Lime,
294  Limegreen,
295  Linen,
296  Magenta,
297  Maroon,
298  Mediumaquamarine,
299  Mediumblue,
300  Mediumorchid,
301  Mediumpurple,
302  Mediumseagreen,
303  Mediumslateblue,
304  Mediumspringgreen,
305  Mediumturquoise,
306  Mediumvioletred,
307  Midnightblue,
308  Mintcream,
309  Mistyrose,
310  Moccasin,
311  Navajowhite,
312  Navy,
313  Oldlace,
314  Olive,
315  Olivedrab,
316  Orange,
317  Orangered,
318  Orchid,
319  Palegoldenrod,
320  Palegreen,
321  Paleturquoise,
322  Palevioletred,
323  Papayawhip,
324  Peachpuff,
325  Peru,
326  Pink,
327  Plum,
328  Powderblue,
329  Purple,
330  Red,
331  Rosybrown,
332  Royalblue,
333  Saddlebrown,
334  Salmon,
335  Sandybrown,
336  Seagreen,
337  Seashell,
338  Sienna,
339  Silver,
340  Skyblue,
341  Slateblue,
342  Slategray,
343  Slategrey,
344  Snow,
345  Springgreen,
346  Steelblue,
347  Tan,
348  Teal,
349  Thistle,
350  Tomato,
351  Turquoise,
352  Violet,
353  Wheat,
354  White,
355  Whitesmoke,
356  Yellow,
357  Yellowgreen
358  };
359 
361  Color() : m_red(0), m_green(0), m_blue(0), m_alpha(255) { }
362 
364  Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) : m_red(r), m_green(g), m_blue(b), m_alpha(a) { }
365 
367  Color(int r, int g, int b, int a = 255) : m_red((uint8_t)r), m_green((uint8_t)g), m_blue((uint8_t)b), m_alpha((uint8_t)a) { }
368 
370  Color(Color::Name name);
371 
373  Color(const string &str) { fromString(str); }
374 
376  Color(const char *str) { fromString(string(str)); }
377 
379  uint8_t red() const { return m_red; }
380 
382  uint8_t green() const { return m_green; }
383 
385  uint8_t blue() const { return m_blue; }
386 
388  uint8_t alpha() const { return m_alpha; }
389 
391  void red(uint8_t r) { m_red = r; }
392 
394  void green(uint8_t g) { m_green = g; }
395 
397  void blue(uint8_t b) { m_blue = b; }
398 
400  void alpha(uint8_t a) { m_alpha = a; }
401 
403 
408  string toString() const;
409 
411  bool fromString(const string &str);
412 
414  bool operator==(const Color &c) const {
415  return m_red == c.m_red && m_green == c.m_green && m_blue == c.m_blue && m_alpha == c.m_alpha;
416  }
417 
419  bool operator!=(const Color &c) const {
420  return !operator==(c);
421  }
422 
424  friend std::ostream &operator<<(std::ostream &os, const Color &c) {
425  return os << c.toString();
426  }
427 };
428 
429 
431 
436  float m_width;
440 
441  Stroke() : m_color(Color::Name::Black), m_width(1.0f), m_type(StrokeType::Solid), m_cap(StrokeLineCap::Butt), m_join(StrokeLineJoin::Miter) { }
442  Stroke(Color c) : m_color(c), m_width(1.0f), m_type(StrokeType::Solid), m_cap(StrokeLineCap::Butt), m_join(StrokeLineJoin::Miter) { }
443 };
444 
445 
447 
454 
455  Fill() : m_color(Color::Name::White), m_bgColor(Color::Name::Black), m_pattern(FillPattern::Solid) { }
456  Fill(Color c) : m_color(c), m_bgColor(Color::Name::Black), m_pattern(FillPattern::Solid) { }
457  Fill(Color c, FillPattern pattern) : m_color(c), m_bgColor(Color::Name::Black), m_pattern(pattern) { }
458  Fill(Color c, Color bgColor, FillPattern pattern) : m_color(c), m_bgColor(bgColor), m_pattern(pattern) { }
459 };
460 
461 namespace graphics {
462  extern OGDF_EXPORT std::map<Shape, string> fromShape;
463  extern OGDF_EXPORT std::map<string, Shape> toShape;
464 
465  extern OGDF_EXPORT std::map<StrokeType, string> fromStrokeType;
466  extern OGDF_EXPORT std::map<string, StrokeType> toStrokeType;
467 
468  extern OGDF_EXPORT std::map<FillPattern, string> fromFillPattern;
469  extern OGDF_EXPORT std::map<string, FillPattern> toFillPattern;
470 
471  template<class Enum>
472  inline void init() {};
473 
474  template<class Enum>
475  inline void initSecondMap(std::map<Enum, string> &fromMap, std::map<string, Enum> &toMap) {
476  for(auto it : fromMap) {
477  toMap.emplace(it.second, it.first);
478  }
479  }
480 
481 
482  template<>
483  inline void init<StrokeType>() {
484  fromStrokeType.emplace(StrokeType::None, "None");
485  fromStrokeType.emplace(StrokeType::Solid, "Solid");
486  fromStrokeType.emplace(StrokeType::Dash, "Dash");
487  fromStrokeType.emplace(StrokeType::Dot, "Dot");
488  fromStrokeType.emplace(StrokeType::Dashdot, "Dashdot");
489  fromStrokeType.emplace(StrokeType::Dashdotdot, "Dashdotdot");
490 
491  initSecondMap<StrokeType>(fromStrokeType, toStrokeType);
492  }
493 
494  template<>
495  inline void init<FillPattern>() {
496  fromFillPattern.emplace(FillPattern::None, "None");
497  fromFillPattern.emplace(FillPattern::Solid, "Solid");
498  fromFillPattern.emplace(FillPattern::Dense1, "Dense1");
499  fromFillPattern.emplace(FillPattern::Dense2, "Dense2");
500  fromFillPattern.emplace(FillPattern::Dense3, "Dense3");
501  fromFillPattern.emplace(FillPattern::Dense4, "Dense4");
502  fromFillPattern.emplace(FillPattern::Dense5, "Dense5");
503  fromFillPattern.emplace(FillPattern::Dense6, "Dense6");
504  fromFillPattern.emplace(FillPattern::Dense7, "Dense7");
505  fromFillPattern.emplace(FillPattern::Horizontal, "Horizontal");
506  fromFillPattern.emplace(FillPattern::Vertical, "Vertical");
507  fromFillPattern.emplace(FillPattern::Cross, "Cross");
508  fromFillPattern.emplace(FillPattern::BackwardDiagonal, "BackwardDiagonal");
509  fromFillPattern.emplace(FillPattern::ForwardDiagonal, "ForwardDiagonal");
510  fromFillPattern.emplace(FillPattern::DiagonalCross, "DiagonalCross");
511 
512  initSecondMap<FillPattern>(fromFillPattern, toFillPattern);
513  }
514 
515  template<>
516  inline void init<Shape>() {
517  fromShape.emplace(Shape::Rect, "Rect");
518  fromShape.emplace(Shape::RoundedRect, "RoundedRect");
519  fromShape.emplace(Shape::Ellipse, "Ellipse");
520  fromShape.emplace(Shape::Triangle, "Triangle");
521  fromShape.emplace(Shape::Pentagon, "Pentagon");
522  fromShape.emplace(Shape::Hexagon, "Hexagon");
523  fromShape.emplace(Shape::Octagon, "Octagon");
524  fromShape.emplace(Shape::Rhomb, "Rhomb");
525  fromShape.emplace(Shape::Trapeze, "Trapeze");
526  fromShape.emplace(Shape::Parallelogram, "Parallelogram");
527  fromShape.emplace(Shape::InvTriangle, "InvTriangle");
528  fromShape.emplace(Shape::InvTrapeze, "InvTrapeze");
529  fromShape.emplace(Shape::InvParallelogram, "InvParallelogram");
530  fromShape.emplace(Shape::Image, "Image");
531 
532  initSecondMap<Shape>(fromShape, toShape);
533  toShape.emplace("rectangle", Shape::Rect);
534  toShape.emplace("box", Shape::Image);
535  }
536 
537  template<class ToClass>
538  inline std::map<string, ToClass>* getMapToEnum() {
539  std::cout << "getMapToEnum was wrongly called\n";
540  OGDF_ASSERT(false);
541  return nullptr;
542  };
543 
544  template<class FromClass>
545  inline std::map<FromClass, string>* getMapToString() {
546  FromClass fc;
547  std::cout << "getMapToString was wrongly called " << typeid(fc).name() << "\n";
548  OGDF_ASSERT(false);
549  return nullptr;
550  };
551 
552  template<>
553  inline std::map<string, FillPattern> *getMapToEnum() {
554  return &toFillPattern;
555  };
556 
557  template<>
558  inline std::map<string, Shape> *getMapToEnum() {
559  return &toShape;
560  };
561 
562  template<>
563  inline std::map<string, StrokeType> *getMapToEnum() {
564  return &toStrokeType;
565  };
566 
567  template<>
568  inline std::map<FillPattern, string> *getMapToString() {
569  return &fromFillPattern;
570  };
571 
572  template<>
573  inline std::map<Shape, string> *getMapToString() {
574  return &fromShape;
575  };
576 
577  template<>
578  inline std::map<StrokeType, string> *getMapToString() {
579  return &fromStrokeType;
580  };
581 }
582 
583 template<class FromClass>
584 inline string toString(FromClass key) {
585  auto *map = graphics::getMapToString<FromClass>();
586  if(map->empty()) {
587  graphics::init<FromClass>();
588  }
589  auto it = map->find(key);
590  OGDF_ASSERT(it != map->end());
591  return (*it).second;
592 };
593 
594 template<class ToClass>
595 inline ToClass fromString(string key) {
596  auto map = graphics::getMapToEnum<ToClass>();
597  if(map->empty()) {
598  graphics::init<ToClass>();
599  }
600  auto it = map->find(key);
601  if(it != map->end()) {
602  return (*it).second;
603  } else {
604  Logger::slout() << "Encountered invalid " << typeid((*map->begin()).second).name()
605  << ": " << key << " " << map->size() << " " << map->empty() << std::endl;
606  return static_cast<ToClass>(std::numeric_limits<int>::min());
607  }
608 };
609 }
ogdf::Color
Colors represented as RGBA values.
Definition: graphics.h:205
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::FillPattern::Dense3
@ Dense3
ogdf::StrokeType::Dashdot
@ Dashdot
line style "dash dot dash dot ..."
ogdf::Fill
Properties of fills.
Definition: graphics.h:450
ogdf::EdgeArrow::Last
@ Last
edge arrow at target node of the edge
ogdf::graphics::fromFillPattern
std::map< FillPattern, string > fromFillPattern
ogdf::stringToShape
Shape stringToShape(string s)
Converts string s to shape.
ogdf::Fill::m_pattern
FillPattern m_pattern
fill pattern
Definition: graphics.h:453
ogdf::StrokeType
StrokeType
Line types of strokes.
Definition: graphics.h:46
OGDF_ASSERT
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
Definition: basic.h:41
ogdf::Fill::Fill
Fill()
Definition: graphics.h:455
ogdf::graphics::toStrokeType
std::map< string, StrokeType > toStrokeType
ogdf::Stroke::Stroke
Stroke(Color c)
Definition: graphics.h:442
ogdf::Color::red
uint8_t red() const
Returns the red component.
Definition: graphics.h:379
ogdf::Fill::Fill
Fill(Color c)
Definition: graphics.h:456
ogdf::FillPattern::DiagonalCross
@ DiagonalCross
ogdf::FillPattern::Dense2
@ Dense2
ogdf::FillPattern::Dense1
@ Dense1
ogdf::Color::Color
Color(int r, int g, int b, int a=255)
Creates a color from given RGBA-values.
Definition: graphics.h:367
ogdf::FillPattern::Dense4
@ Dense4
ogdf::StrokeLineCap::Round
@ Round
ogdf::graphics::toFillPattern
std::map< string, FillPattern > toFillPattern
ogdf::Color::Color
Color()
Creates an opaque black color.
Definition: graphics.h:361
ogdf::operator==
bool operator==(const Tuple2< E1, E2 > &t1, const Tuple2< E1, E2 > &t2)
Equality operator for 2-tuples.
Definition: tuples.h:76
ogdf::StrokeLineJoin::Bevel
@ Bevel
ogdf::Shape::Octagon
@ Octagon
octagon
ogdf::Fill::Fill
Fill(Color c, FillPattern pattern)
Definition: graphics.h:457
ogdf::Stroke::m_color
Color m_color
stroke color
Definition: graphics.h:435
ogdf::graphics::init< StrokeType >
void init< StrokeType >()
Definition: graphics.h:483
ogdf::EdgeArrow::None
@ None
no edge arrows
ogdf::StrokeType::Dash
@ Dash
dashed line
ogdf::Fill::Fill
Fill(Color c, Color bgColor, FillPattern pattern)
Definition: graphics.h:458
ogdf::Shape::RoundedRect
@ RoundedRect
rectangle with rounded corners
ogdf::Shape::Rhomb
@ Rhomb
rhomb (=diamond)
ogdf::graphics::init< FillPattern >
void init< FillPattern >()
Definition: graphics.h:495
ogdf::graphics::toShape
std::map< string, Shape > toShape
ogdf::EdgeArrow::Undefined
@ Undefined
ogdf::graphics::init< Shape >
void init< Shape >()
Definition: graphics.h:516
ogdf::shapeToString
string shapeToString(Shape s)
Converts shape s to string.
ogdf::StrokeType::Dashdotdot
@ Dashdotdot
line style "dash dot dot dash dot dot ..."
ogdf::Shape::Trapeze
@ Trapeze
trapeze (upper side shorter)
ogdf::initFillPatternHashing
void initFillPatternHashing()
ogdf::Shape::Image
@ Image
ogdf::graphics::initSecondMap
void initSecondMap(std::map< Enum, string > &fromMap, std::map< string, Enum > &toMap)
Definition: graphics.h:475
Logger.h
Contains logging functionality.
ogdf::StrokeLineCap::Butt
@ Butt
ogdf::EdgeArrow::First
@ First
edge arrow at source node of the edge
ogdf::Stroke::m_width
float m_width
stroke width
Definition: graphics.h:436
ogdf::FillPattern::Vertical
@ Vertical
ogdf::FillPattern::Dense5
@ Dense5
ogdf::FillPattern::Cross
@ Cross
ogdf::stringToFillPattern
FillPattern stringToFillPattern(string s)
Converts string s to fill pattern.
ogdf::Color::operator==
bool operator==(const Color &c) const
Returns true iff c and this color are equal in every component.
Definition: graphics.h:414
ogdf::graphics::fromShape
std::map< Shape, string > fromShape
r
int r[]
Definition: hierarchical-ranking.cpp:8
ogdf::Fill::m_bgColor
Color m_bgColor
background color of fill pattern
Definition: graphics.h:452
ogdf::Color::green
uint8_t green() const
Returns the green component.
Definition: graphics.h:382
ogdf::FillPattern::ForwardDiagonal
@ ForwardDiagonal
ogdf::fromString
ToClass fromString(string key)
Definition: graphics.h:595
ogdf::Shape::Parallelogram
@ Parallelogram
parallelogram (slanted to the right)
ogdf::Stroke::m_join
StrokeLineJoin m_join
line-join of the stroke
Definition: graphics.h:439
ogdf::Stroke
Properties of strokes.
Definition: graphics.h:434
ogdf::Color::Name
Name
Named colors (same as SVG color keywords).
Definition: graphics.h:210
ogdf::StrokeLineJoin::Round
@ Round
ogdf::StrokeLineJoin
StrokeLineJoin
Line join types of strokes.
Definition: graphics.h:92
ogdf::Shape::InvTriangle
@ InvTriangle
isosceles triangle (base side up)
ogdf::FillPattern::None
@ None
ogdf::Color::blue
uint8_t blue() const
Returns the blue component.
Definition: graphics.h:385
ogdf::Color::alpha
void alpha(uint8_t a)
Sets the alpha channel to a.
Definition: graphics.h:400
ogdf::Color::m_green
uint8_t m_green
Definition: graphics.h:206
ogdf::operator<<
std::ostream & operator<<(std::ostream &os, const ogdf::Array< E, INDEX > &a)
Prints array a to output stream os.
Definition: Array.h:949
ogdf::Stroke::m_type
StrokeType m_type
stroke type (e.g.
Definition: graphics.h:437
ogdf::Color::green
void green(uint8_t g)
Sets the green component to g.
Definition: graphics.h:394
ogdf::Shape::Pentagon
@ Pentagon
pentagon
ogdf::Color::toString
string toString() const
Converts the color to a string and returns it.
ogdf::Shape::Ellipse
@ Ellipse
ellipse
ogdf::graphics::getMapToString
std::map< FromClass, string > * getMapToString()
Definition: graphics.h:545
ogdf::Color::Color
Color(const char *str)
Crates a color from string str.
Definition: graphics.h:376
ogdf::StrokeType::None
@ None
no line
ogdf::EdgeArrow
EdgeArrow
Types for edge arrows.
Definition: graphics.h:186
ogdf::Shape::InvTrapeze
@ InvTrapeze
inverted trapeze (upper side longer)
ogdf::Color::Color
Color(const string &str)
Crates a color from string str.
Definition: graphics.h:373
ogdf::Color::blue
void blue(uint8_t b)
Sets the blue component to b.
Definition: graphics.h:397
ogdf::Shape::InvParallelogram
@ InvParallelogram
inverted parallelogram (slanted to the left)
ogdf::Color::alpha
uint8_t alpha() const
Returns the alpha channel.
Definition: graphics.h:388
ogdf::graphics::init
void init()
Definition: graphics.h:472
ogdf::Color::m_blue
uint8_t m_blue
Definition: graphics.h:206
ogdf::toString
string toString(FromClass key)
Definition: graphics.h:584
basic.h
Basic declarations, included by all source files.
ogdf::EdgeArrow::Both
@ Both
edge arrow at target and source node of the edge
ogdf::StrokeLineJoin::Miter
@ Miter
ogdf::Color::operator!=
bool operator!=(const Color &c) const
Returns true iff c and this color differ in any component.
Definition: graphics.h:419
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
ogdf::FillPattern::Solid
@ Solid
ogdf::FillPattern::BackwardDiagonal
@ BackwardDiagonal
ogdf::Fill::m_color
Color m_color
fill color
Definition: graphics.h:451
ogdf::Color::m_red
uint8_t m_red
Definition: graphics.h:206
ogdf::Shape::Rect
@ Rect
rectangle
ogdf::strokeTypeToString
string strokeTypeToString(StrokeType st)
Converts string s to stroke type.
ogdf::Shape
Shape
Types for node shapes.
Definition: graphics.h:149
ogdf::Color::Color
Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)
Creates a color from given RGBA-values.
Definition: graphics.h:364
ogdf::fillPatternToString
string fillPatternToString(FillPattern fp)
Converts fillpattern fp to string.
ogdf::FillPattern::Horizontal
@ Horizontal
ogdf::Color::m_alpha
uint8_t m_alpha
Definition: graphics.h:206
ogdf::graphics::fromStrokeType
std::map< StrokeType, string > fromStrokeType
ogdf::StrokeType::Solid
@ Solid
solid line
ogdf::StrokeLineCap::Square
@ Square
ogdf::StrokeLineCap
StrokeLineCap
Line cap types of strokes.
Definition: graphics.h:81
ogdf::Color::operator<<
friend std::ostream & operator<<(std::ostream &os, const Color &c)
Writes the string representation of color c to output stream os.
Definition: graphics.h:424
ogdf::intToFillPattern
FillPattern intToFillPattern(int i)
Converts integer i to fill pattern.
ogdf::Stroke::Stroke
Stroke()
Definition: graphics.h:441
ogdf::Shape::Hexagon
@ Hexagon
hexagon
ogdf::FillPattern
FillPattern
Fill patterns.
Definition: graphics.h:103
ogdf::FillPattern::Dense7
@ Dense7
ogdf::Shape::Triangle
@ Triangle
isosceles triangle (base side down)
ogdf::FillPattern::Dense6
@ Dense6
ogdf::Color::red
void red(uint8_t r)
Sets the red component to r.
Definition: graphics.h:391
ogdf::intToStrokeType
StrokeType intToStrokeType(int i)
Converts integer i to stroke type.
ogdf::stringToStrokeType
StrokeType stringToStrokeType(string s)
Converts string s to stroke type.
ogdf::StrokeType::Dot
@ Dot
dotted line
ogdf::Logger::slout
static std::ostream & slout(Level level=Level::Default)
stream for logging-output (global)
Definition: Logger.h:168
ogdf::Stroke::m_cap
StrokeLineCap m_cap
line-cap of the stroke
Definition: graphics.h:438
ogdf::graphics::getMapToEnum
std::map< string, ToClass > * getMapToEnum()
Definition: graphics.h:538