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 />

W.draw segment(const segment& s, color c = window :: fgcol)<br />

draws line segment s.<br />

W.draw segment(point p, point q, line l, color c = window :: fgcol)<br />

draws the part of the line l between p and q. This version<br />

of draw segment should be used if p or q may lie far outside<br />

W . Precondition: p and q lie on l or at least close to l.<br />

W.draw segments(const list& L, color c = window :: fgcol)<br />

draws all segments in L.<br />

3.4.3 Drawing lines<br />

void<br />

void<br />

void<br />

void<br />

void<br />

void<br />

W.draw line(double x 1 , double y 1 , double x 2 , double y 2 , color c = window :: fgcol)<br />

draws a straight line passing through points (x 1 , y 1 ) and<br />

(x 2 , y 2 ).<br />

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

draws a straight line passing through points p and q.<br />

W.draw line(const segment& s, color c = window :: fgcol)<br />

draws the line supporting segment s.<br />

W.draw line(const line& l, color c = window :: fgcol)<br />

draws line l.<br />

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

draws a horizontal line with y-coordinate y.<br />

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

draws a vertical line with x-coordinate x.<br />

3.4.4 Drawing Rays<br />

void<br />

void<br />

void<br />

void<br />

W.draw ray(double x 1 , double y 1 , double x 2 , double y 2 , color c = window :: fgcol)<br />

draws a ray starting in (x 1 , y 1 ) and passing through<br />

(x 2 , y 2 ).<br />

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

draws a ray starting in p and passing through q.<br />

W.draw ray(const segment& s, color c = window :: fgcol)<br />

draws a ray starting in s.source() containing s.<br />

W.draw ray(const ray& r, color c = window :: fgcol)<br />

draws ray r.

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

Saved successfully!

Ooh no, something went wrong!