title
Graph Drawing Toolkit

An object-oriented C++ library for handling and drawing graphs

rel_coord_orth Class Reference

#include <rel_coord_orth.h>

Collaboration diagram for rel_coord_orth:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 rel_coord_orth (void)
 ~rel_coord_orth (void)
 rel_coord_orth (undi_graph ug, algorithm_type alg=ORTH_SIMPLE_PT00)
undi_graph get_underlying_undi_graph () const
gdt::gdtpoint center (gdtnode n) const
gdt::gdtpoint center (int id) const
double xcoord (gdtnode n) const
double xcoord (int id) const
double ycoord (gdtnode n) const
double ycoord (int id) const
int aux_id (int id) const
grid_line next_grid_line (grid_line gl, bool forward)
gdtnode new_node (grid_line l1, grid_line l2)
gdtedge new_edge (gdtnode n1, gdtnode n2)
void insert_node (gdtnode n, grid_line l1, grid_line l2)
void redistribute_coords (double gap)
void redistribute_coords_if_needed (double gap)
void redistribute_coords (int axis, double gap)


Detailed Description

Definition at line 50 of file rel_coord_orth.h.


Constructor & Destructor Documentation

rel_coord_orth::rel_coord_orth ( void   ) 

Void constructor.

rel_coord_orth::~rel_coord_orth ( void   ) 

Deletes the object.

rel_coord_orth::rel_coord_orth ( undi_graph  ug,
algorithm_type  alg = ORTH_SIMPLE_PT00 
)

Builds a drawing starting from the given undi_graph. Graph will be drawn with the following algorithm:


Member Function Documentation

undi_graph rel_coord_orth::get_underlying_undi_graph (  )  const

Return the underlying graph. It makes a copy of it.

gdt::gdtpoint rel_coord_orth::center ( gdtnode  n  )  const

Return the x and y coordinates of a node. PRECONDITIONS: the node must belong to the underlying undi_graph.

gdt::gdtpoint rel_coord_orth::center ( int  id  )  const

Return the x and y coordinates of a node. PRECONDITIONS: the node must belong to the underlying undi_graph.

double rel_coord_orth::xcoord ( gdtnode  n  )  const

Return the x coordinate of a node. PRECONDITIONS: the node must belong to the underlying undi_graph.

double rel_coord_orth::xcoord ( int  id  )  const

Return the x coordinate of a node.

double rel_coord_orth::ycoord ( gdtnode  n  )  const

Return the y coordinate of a node. PRECONDITIONS: the node must belong to the underlying undi_graph.

double rel_coord_orth::ycoord ( int  id  )  const

Return the y coordinate of a node.

int rel_coord_orth::aux_id ( int  id  )  const [inline]

Return the auxiliary id of a node whose id is the given one. This value is the id of the node of the undi_graph from which this node has been generated. Rationale: a node of the undi graph may correspond to a box of the rel_coord_orth. All nodes composing the box have the same aux_id as the original node.

Definition at line 255 of file rel_coord_orth.h.

grid_line rel_coord_orth::next_grid_line ( grid_line  gl,
bool  forward 
)

Return the next grid line in the direction specified by "forward". If gl is the last grid line return NULL.

gdtnode rel_coord_orth::new_node ( grid_line  l1,
grid_line  l2 
) [inline]

Create a new node and insert it in the specified position.

Definition at line 286 of file rel_coord_orth.h.

References insert_node(), and undi_graph::new_node().

Here is the call graph for this function:

gdtedge rel_coord_orth::new_edge ( gdtnode  n1,
gdtnode  n2 
) [inline]

Create a new edge and remember the axis it is parallel to. PRECONDITION: the two input nodes must share a grid line.

Definition at line 306 of file rel_coord_orth.h.

References gdt_error, and undi_graph::new_edge().

Here is the call graph for this function:

void rel_coord_orth::insert_node ( gdtnode  n,
grid_line  l1,
grid_line  l2 
)

Insert the node in the given position. Grid lines l1 and l2 may be swapped without problems.

Referenced by new_node().

Here is the caller graph for this function:

void rel_coord_orth::redistribute_coords ( double  gap  )  [inline]

Since to implement the relative coordinates scenario, this class uses doble coords, after the drawing is fully obtained, you should reassign coords to the planes in order to have grid lines equally spaced

Definition at line 344 of file rel_coord_orth.h.

Referenced by redistribute_coords_if_needed().

Here is the caller graph for this function:

void rel_coord_orth::redistribute_coords_if_needed ( double  gap  )  [inline]

Since to implement the relative coordinates scenario, this class uses doble coords, after the drawing is fully obtained, you should reassign coords to the planes in order to have grid lines equally spaced

Definition at line 363 of file rel_coord_orth.h.

References redistribute_coords().

Here is the call graph for this function:

void rel_coord_orth::redistribute_coords ( int  axis,
double  gap 
)

Since to implement the relative coordinates scenario, this class uses doble coords, after the drawing is fully obtained, you should reassign coords to the planes in order to have grid lines equally spaced


The documentation for this class was generated from the following file:
Generated on Thu Jan 10 14:48:58 2008 for GDToolkit GAPI by  doxygen 1.5.3