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.

void<br />

void<br />

void<br />

void<br />

void<br />

W.draw roundbox(point p, point q, double rndness, color col = window :: fgcol)<br />

draws a round filled rectangle with lower left corner p,<br />

upper right corner q, and roundness rndness.<br />

W.draw triangle(point a, point b, point c, color = window :: fgcol)<br />

draws triangle (a, b, c).<br />

W.draw triangle(const triangle& T, color = window :: fgcol)<br />

draws triangle T .<br />

W.draw filled triangle(point a, point b, point c, color = window :: fgcol)<br />

draws filled triangle (a, b, c).<br />

W.draw filled triangle(const triangle& T, color = window :: fgcol)<br />

draws filled triangle T .<br />

3.4.10 Drawing functions<br />

void<br />

void<br />

W.plot xy(double x 0 , double x 1 , win draw func F, color c = window :: fgcol)<br />

draws the graph of function F in the x-range [x 0 , x 1 ], i.e.,<br />

all pixels (x, y) with y = F (x) and x 0 ≤ x ≤ x 1 .<br />

W.plot yx(double y 0 , double y 1 , win draw func F, color c = window :: fgcol)<br />

draws the graph of function F in the y-range [y 0 , y 1 ], i.e.,<br />

all pixels (x, y) with x = F (y) and y 0 ≤ y ≤ y 1 .<br />

3.4.11 Drawing text<br />

void<br />

void<br />

void<br />

void<br />

void<br />

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

writes string s starting at position (x, y).<br />

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

writes string s starting at position p.<br />

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

writes string s centered at position (x, y).<br />

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

writes string s centered at position p.<br />

W.draw ctext(string s, color c = window :: fgcol)<br />

writes string s centered in window W .

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

Saved successfully!

Ooh no, something went wrong!