Stores a layout of a graph (coordinates of nodes, bend points of edges). More...
#include <ogdf/basic/Layout.h>
Public Member Functions | |
Layout (const Graph &G) | |
Creates a layout associated with graph G . | |
const NodeArray< double > & | x () const |
Returns a reference to the array storing x-coordinates of nodes. | |
NodeArray< double > & | x () |
Returns a reference to the array storing x-coordinates of nodes. | |
const NodeArray< double > & | y () const |
Returns a reference to the array storing y-coordinates of nodes. | |
NodeArray< double > & | y () |
Returns a reference to the array storing y-coordinates of nodes. | |
const double & | x (node v) const |
Returns the x-coordinate of node v . | |
double & | x (node v) |
Returns the x-coordinate of node v . | |
const double & | y (node v) const |
Returns the y-coordinate of node v . | |
double & | y (node v) |
Returns the y-coordinate of node v . | |
const DPolyline & | bends (edge e) const |
Returns the bend point list of edge e . | |
DPolyline & | bends (edge e) |
Returns the bend point list of edge e . | |
void | computePolyline (GraphCopy &GC, edge eOrig, DPolyline &dpl) const |
Returns the polyline of edge eOrig in dpl . | |
void | computePolylineClear (PlanRep &PG, edge eOrig, DPolyline &dpl) |
Returns the polyline of edge eOrig in dpl and clears the bend points of the copies. | |
DPoint | computeBoundingBox (PlanRep &PG) const |
Computes the bounding box of the layout, which is a drawing of PG . | |
Private Attributes | |
EdgeArray< DPolyline > | m_bends |
The bend points of edges. | |
NodeArray< double > | m_x |
The x-coordinates of nodes. | |
NodeArray< double > | m_y |
The y-coordinates of nodes. | |
Stores a layout of a graph (coordinates of nodes, bend points of edges).
|
inline |
Computes the bounding box of the layout, which is a drawing of PG
.
PG | must be the planarized representation associated with this layout. |
PG
. Returns the polyline of edge eOrig
in dpl
.
GC | is the input graph copy; GC must also be the associated graph. |
eOrig | is an edge in the original graph of GC . |
dpl | is assigned the poyline of eOrig . |
Returns the polyline of edge eOrig
in dpl
and clears the bend points of the copies.
The bend point lists of all edges in the edge path corresponding to eOrig
are empty afterwards! This is a faster version of computePolyline().
PG | is the input graph copy; PG must also be the associated graph. of this layout. |
eOrig | is an edge in the original graph of PG . |
dpl | is assigned the poyline of eOrig . |