Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

SimpleCCPacker.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 #include <ogdf/basic/basic.h>
36 #include <ogdf/basic/geometry.h>
37 
38 #include <memory>
39 
40 namespace ogdf {
41 class GraphAttributes;
42 
44 
49 public:
51  explicit SimpleCCPacker(LayoutModule* pSubLayoutModule = nullptr)
52  : m_pSubLayoutModule(pSubLayoutModule) {
53  m_leftMargin = 10.0;
54  m_rightMargin = 10.0;
55  m_bottomMargin = 10.0;
56  m_topMargin = 10.0;
57  }
58 
59  void setMargins(double left, double top, double right, double bottom) {
60  m_leftMargin = left;
61  m_rightMargin = right;
62  m_bottomMargin = bottom;
63  m_topMargin = top;
64  }
65 
66  virtual void call(GraphAttributes& GA) override;
67 
68 protected:
69  double m_leftMargin;
70  double m_rightMargin;
72  double m_topMargin;
73 
74  std::unique_ptr<LayoutModule> m_pSubLayoutModule;
75 
76  void computeBoundingBox(const GraphAttributes& graphAttributes, DPoint& min_coord,
77  DPoint& max_coord);
78 };
79 
80 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:72
ogdf::GenericPoint< double >
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
ogdf::SimpleCCPacker::SimpleCCPacker
SimpleCCPacker(LayoutModule *pSubLayoutModule=nullptr)
Constructor.
Definition: SimpleCCPacker.h:51
LayoutModule.h
Declaration of interface for layout algorithms (class LayoutModule)
ogdf::SimpleCCPacker::m_pSubLayoutModule
std::unique_ptr< LayoutModule > m_pSubLayoutModule
Definition: SimpleCCPacker.h:74
ogdf::SimpleCCPacker::m_bottomMargin
double m_bottomMargin
Definition: SimpleCCPacker.h:71
ogdf::SimpleCCPacker::m_leftMargin
double m_leftMargin
Definition: SimpleCCPacker.h:69
ogdf::SimpleCCPacker::setMargins
void setMargins(double left, double top, double right, double bottom)
Definition: SimpleCCPacker.h:59
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::SimpleCCPacker
Splits and packs the components of a Graph.
Definition: SimpleCCPacker.h:48
ogdf::SimpleCCPacker::m_rightMargin
double m_rightMargin
Definition: SimpleCCPacker.h:70
ogdf::SimpleCCPacker::m_topMargin
double m_topMargin
Definition: SimpleCCPacker.h:72
ogdf::LayoutModule
Interface of general layout algorithms.
Definition: LayoutModule.h:45