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

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

draws the part of the line l on the ray with source p and<br />

passing through q. This version of draw ray should be used<br />

if p may lie far outside W . Precondition: p and q lie on l<br />

or at least close to l.<br />

3.<strong>5.0</strong> Drawing Arcs and Curves<br />

void W.draw arc(const point& p, const point& q, const point& r,<br />

color c = window :: fgcol)<br />

draws a circular arc starting in p passing through q and<br />

ending in r.<br />

void<br />

void<br />

void<br />

void<br />

W.draw bezier(const list& C, int n, color c = window :: fgcol)<br />

draws the bezier curve with control polygon C by a polyline<br />

with n points.<br />

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

draws a spline curve through the points of L. Each segment<br />

is approximated by a polyline with m points.<br />

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

draws a closed spline through the points of L.<br />

W.draw spline(const polygon& P, int n, color c = window :: fgcol)<br />

draws a closed spline through the vertices of P .<br />

3.4.6 Drawing arrows<br />

void W.draw arrow(double x 1 , double y 1 , double x 2 , double y 2 ,<br />

color c = window :: fgcol)<br />

draws an arrow pointing from (x 1 , y 1 ) to (x 2 , y 2 ).<br />

void<br />

void<br />

void<br />

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

draws an arrow pointing from point p to point q.<br />

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

draws an arrow pointing from s.start() to s.end().<br />

W.draw polyline arrow(const list& lp, color c = window :: fgcol)<br />

draws a polyline arrow with vertex sequence lp.<br />

void W.draw arc arrow(const point& p, const point& q, const point& r,<br />

color c = window :: fgcol)<br />

draws a circular arc arrow starting in p passing through q<br />

and ending in r.

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

Saved successfully!

Ooh no, something went wrong!