Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

SimpleCCPacker.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <memory>
36 
37 namespace ogdf {
38 
40 
45 {
46 public:
48  explicit SimpleCCPacker(LayoutModule* pSubLayoutModule = nullptr) : m_pSubLayoutModule(pSubLayoutModule)
49  {
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  {
58  m_leftMargin = left;
59  m_rightMargin = right;
60  m_bottomMargin = bottom;
61  m_topMargin = top;
62  }
63 
64  virtual void call(GraphAttributes& GA) override;
65 
66 protected:
67  double m_leftMargin;
68  double m_rightMargin;
70  double m_topMargin;
71 
72  std::unique_ptr<LayoutModule> m_pSubLayoutModule;
73 
74  void computeBoundingBox(const GraphAttributes& graphAttributes, DPoint& min_coord, DPoint& max_coord);
75 };
76 
77 }
Splits and packs the components of a Graph.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
SimpleCCPacker(LayoutModule *pSubLayoutModule=nullptr)
Constructor.
Stores additional attributes of a graph (like layout information).
std::unique_ptr< LayoutModule > m_pSubLayoutModule
Declaration of interface for layout algorithms (class LayoutModule)
Interface of general layout algorithms.
Definition: LayoutModule.h:44
The namespace for all OGDF objects.
void setMargins(double left, double top, double right, double bottom)