Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

SimpleCCPacker.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 
36 #include <memory>
37 
38 namespace ogdf {
39 
41 
46 public:
48  explicit SimpleCCPacker(LayoutModule* pSubLayoutModule = nullptr)
49  : m_pSubLayoutModule(pSubLayoutModule) {
50  m_leftMargin = 10.0;
51  m_rightMargin = 10.0;
52  m_bottomMargin = 10.0;
53  m_topMargin = 10.0;
54  }
55 
56  void setMargins(double left, double top, double right, double bottom) {
57  m_leftMargin = left;
58  m_rightMargin = right;
59  m_bottomMargin = bottom;
60  m_topMargin = top;
61  }
62 
63  virtual void call(GraphAttributes& GA) override;
64 
65 protected:
66  double m_leftMargin;
67  double m_rightMargin;
69  double m_topMargin;
70 
71  std::unique_ptr<LayoutModule> m_pSubLayoutModule;
72 
73  void computeBoundingBox(const GraphAttributes& graphAttributes, DPoint& min_coord,
74  DPoint& max_coord);
75 };
76 
77 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:66
ogdf::GenericPoint< double >
ogdf::SimpleCCPacker::SimpleCCPacker
SimpleCCPacker(LayoutModule *pSubLayoutModule=nullptr)
Constructor.
Definition: SimpleCCPacker.h:48
LayoutModule.h
Declaration of interface for layout algorithms (class LayoutModule)
ogdf::SimpleCCPacker::m_pSubLayoutModule
std::unique_ptr< LayoutModule > m_pSubLayoutModule
Definition: SimpleCCPacker.h:71
ogdf::SimpleCCPacker::m_bottomMargin
double m_bottomMargin
Definition: SimpleCCPacker.h:68
ogdf::SimpleCCPacker::m_leftMargin
double m_leftMargin
Definition: SimpleCCPacker.h:66
ogdf::SimpleCCPacker::setMargins
void setMargins(double left, double top, double right, double bottom)
Definition: SimpleCCPacker.h:56
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:45
ogdf::SimpleCCPacker::m_rightMargin
double m_rightMargin
Definition: SimpleCCPacker.h:67
ogdf::SimpleCCPacker::m_topMargin
double m_topMargin
Definition: SimpleCCPacker.h:69
ogdf::LayoutModule
Interface of general layout algorithms.
Definition: LayoutModule.h:44