Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
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
40namespace ogdf {
41class GraphAttributes;
42
44
49public:
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
68protected:
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}
Declaration of interface for layout algorithms (class LayoutModule)
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
Basic declarations, included by all source files.
Stores additional attributes of a graph (like layout information).
Interface of general layout algorithms.
Splits and packs the components of a Graph.
SimpleCCPacker(LayoutModule *pSubLayoutModule=nullptr)
Constructor.
std::unique_ptr< LayoutModule > m_pSubLayoutModule
virtual void call(GraphAttributes &GA) override
Computes a layout of graph GA.
void setMargins(double left, double top, double right, double bottom)
void computeBoundingBox(const GraphAttributes &graphAttributes, DPoint &min_coord, DPoint &max_coord)
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF dynamic library (shared object / DLL),...
Definition config.h:117
The namespace for all OGDF objects.