31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

double W.text box(double x 0 , double x 1 , double y, string s, bool draw = true)<br />

formats and writes string s into a box with its left border<br />

at x-coordinate x0, its right border at x1, and its upper<br />

border at y-coordinate y. Some LaTeX-like formatting<br />

commands can be used: \bf, \tt, \rm, \n, \c,<br />

\, . . . returns y-coordinate of lower border of box.<br />

If the optional last parameter draw is set to false no drawing<br />

takes place and only the lower y-coordinate of the box<br />

is computed.<br />

void W.text box(string s) as above with x 0 = W.xmin( ), x 1 = W.xmax( ), and<br />

y = W.ymax( ).<br />

void W.message(string s) displays the message s (each call adds a new line).<br />

void W.del message( ) deletes the text written by all previous message operations.<br />

3.4.12 Drawing nodes<br />

Nodes are represented by circles of diameter node width.<br />

void<br />

void<br />

void<br />

void<br />

void<br />

void<br />

void<br />

void<br />

W.draw node(double x 0 , double y 0 , color c = window :: fgcol)<br />

draws a node at position (x 0 , y 0 ).<br />

W.draw node(const point& p, color c = window :: fgcol)<br />

draws a node at position p.<br />

W.draw filled node(double x 0 , double y 0 , color c = window :: bgcol)<br />

draws a filled node at position (x 0 , y 0 ).<br />

W.draw filled node(const point& p, color c = window :: bgcol)<br />

draws a filled node at position p.<br />

W.draw text node(double x, double y, string s, color c = window :: bgcol)<br />

draws a node with label s at position (x, y).<br />

W.draw text node(const point& p, string s, color c = window :: bgcol)<br />

draws a node with label s at position p.<br />

W.draw int node(double x, double y, int i, color c = window :: bgcol)<br />

draws a node with integer label i at position (x, y).<br />

W.draw int node(const point& p, int i, color c = window :: bgcol)<br />

draws a node with integer label i at position p.<br />

3.4.13 Drawing edges<br />

Edges are drawn as straigth line segments or arrows with a clearance of node width/2 at<br />

each end.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!