109 virtual void init(
ClusterGraph &cg,
long initAttributes = 0);
117 virtual void initAtt(
long initAttributes = 0) {
138 double y(
cluster c)
const {
return m_clusterInfo[c].m_y; }
141 double&
y(
cluster c) {
return m_clusterInfo[c].m_y; }
157 return m_clusterInfo[c].m_stroke.m_type;
162 m_clusterInfo[c].m_stroke.m_type = st;
167 return m_clusterInfo[c].m_stroke.m_color;
172 return m_clusterInfo[c].m_stroke.m_color;
177 return m_clusterInfo[c].m_stroke.m_width;
182 return m_clusterInfo[c].m_stroke.m_width;
187 return m_clusterInfo[c].m_fill.m_pattern;
192 m_clusterInfo[c].m_fill.m_pattern = fp;
197 return m_clusterInfo[c].m_fill.m_color;
202 return m_clusterInfo[c].m_fill.m_color;
207 return m_clusterInfo[c].m_fill.m_bgColor;
212 return m_clusterInfo[c].m_fill.m_bgColor;
217 return m_clusterInfo[c].m_label;
222 return m_clusterInfo[c].m_label;
255 virtual void scale(
double sx,
double sy,
bool scaleNodes =
true)
override;
262 virtual void translate(
double dx,
double dy)
override;
269 virtual void flipVertical(
const DRect &box)
override;
276 virtual void flipHorizontal(
const DRect &box)
override;
285 virtual DRect boundingBox()
const override;
288 void updateClusterPositions(
double boundaryDist = 1.0);
Color & strokeColor(cluster c)
Returns the stroke color of cluster c.
const Color & fillColor(cluster c) const
Returns the fill color of cluster c.
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Color & fillColor(cluster c)
Returns the fill color of cluster c.
ClusterGraphAttributes()
Constructs cluster graph attributes for no associated graph.
const Color & fillBgColor(cluster c) const
Returns the background color of fill patterns for cluster c.
Stores information associated with a cluster.
double & width(cluster c)
Returns the width of cluster c.
Data type for general directed graphs (adjacency list representation).
const Color & fillColor(node v) const
Returns the fill color of node v.
FillPattern fillPattern(node v) const
Returns the fill pattern of node v.
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
void addAttributes(long attr)
Enables attributes specified by attr and allocates required memory.
void setStrokeType(cluster c, StrokeType st)
Sets the stroke type of cluster c to st.
cluster clusterOf(node v) const
Returns the cluster to which a node belongs.
#define OGDF_THROW(CLASS)
Replacement for throw.
const Color & strokeColor(node v) const
Returns the stroke color of node v.
Rectangles with real coordinates.
float & strokeWidth(cluster c)
Returns the stroke width of cluster c.
virtual void scale(double sx, double sy, bool scaleNodes=true)
Scales the layout by (sx,sy).
virtual void flipVertical()
Flips the layout vertically within its bounding box.
FillPattern fillPattern(cluster c) const
Returns the fill pattern of cluster c.
StrokeType strokeType(cluster c) const
Returns the stroke type of cluster c.
ClusterInfo & clusterInfo(cluster c)
Returns the cluster info structure of cluster c.
FillPattern
Fill patterns.
string & label(cluster c)
Returns the label of cluster c.
Base class of all ogdf exceptions.
const string & templateCluster(cluster c) const
Returns the template of cluster c.
double m_y
position of lower left corner
cluster clusterOf(node v)
Returns the parent cluster of node v.
double width(cluster c) const
Returns the width of cluster c.
T m_x
The default value for array elements.
Representation of clustered graphs.
double y(node v) const
Returns the y-coordinate of node v.
string m_label
cluster label
virtual void flipHorizontal()
Flips the layout horizontally within its bounding box.
const string & label(node v) const
Returns the label of node v.
double height(cluster c) const
Returns the height of cluster c.
Colors represented as RGBA values.
Stores additional attributes of a graph (like layout information).
virtual void init(const Graph &, long) override
Forbidden initialization, use init(ClusterGraph &cg, long initAttributes) instead! ...
ClusterArray< ClusterInfo > m_clusterInfo
cluster attributes
double x(cluster c) const
Returns the x-position of cluster c's cage (lower left corner).
Standard values for graphical attributes and layouts.
Stores additional attributes of a clustered graph (like layout information).
Dynamic arrays indexed with clusters.
string & templateCluster(cluster c)
Returns the template of cluster c.
double x(node v) const
Returns the x-coordinate of node v.
Class for the representation of nodes.
double & x(cluster c)
Returns the x-position of cluster c's cage (lower left corner).
const ClusterGraph & constClusterGraph() const
Returns the associated cluster graph.
double & height(cluster c)
Returns the height of cluster c.
const Color & fillBgColor(node v) const
Returns the background color of fill patterns for node v.
Fill m_fill
fill (style of interior)
const float & strokeWidth(cluster c) const
Returns the stroke width of cluster c.
StrokeType strokeType(node v) const
Returns the stroke type of node v.
virtual void initAtt(long initAttributes=0)
Initializes the attributes according to initAttributes.
Representation of clusters in a clustered graph.
double & y(cluster c)
Returns the y-position of cluster c's cage (lower left corner).
void setFillPattern(cluster c, FillPattern fp)
Sets the fill pattern of cluster c to fp.
ClusterArray< string > m_clusterTemplate
Name of cluster template.
const NodeArray< double > & height() const
Returns a reference to the node array m_height.
StrokeType
Line types of strokes.
double y(cluster c) const
Returns the y-position of cluster c's cage (lower left corner).
virtual ~ClusterGraphAttributes()
Declaration and implementation of ClusterArray class.
The namespace for all OGDF objects.
float strokeWidth(node v) const
Returns the stroke width of node v.
Stroke m_stroke
stroke (style of boundary)
const ClusterGraph * m_pClusterGraph
Only points to existing graphs.
const Color & strokeColor(cluster c) const
Returns the stroke color of cluster c.
const string & label(cluster c) const
Returns the label of cluster c.
const ClusterInfo & clusterInfo(cluster c) const
Returns the cluster info structure of cluster c.
Color & fillBgColor(cluster c)
Returns the background color of fill patterns for cluster c.
const NodeArray< double > & width() const
Returns a reference to the node array m_width.