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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

void<br />

void<br />

void<br />

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

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

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

draws an edge from p to q.<br />

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

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

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

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

draws a directed edge from (x 1 , y 1 ) to (x 2 , y 2 ).<br />

void<br />

void<br />

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

draws a directed edge from p to q.<br />

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

draws a directed edge from s.start() to s.end().<br />

3.4.14 Bitmaps and Pixrects<br />

char∗ W.create bitmap(int w, int h, unsigned char ∗ bm data)<br />

char∗ W.create pixrect(const char ∗ ∗xpm str)<br />

char∗ W.create pixrect(string xpm file)<br />

creates a bitmap (monochrome pixrect) of width w, height<br />

h, from the bits in data.<br />

creates a pixrect from the xpm data string xpm str.<br />

creates a pixrect from the xpm file xpm file.<br />

char∗ W.create pixrect(int w, int h, unsigned char ∗ bm data, int fg = window :: fgcol,<br />

int bg = window :: bgcol)<br />

creates a pixrect of width w, height h, foreground color<br />

fg, and background color bg from bitmap data.<br />

char∗ W.get pixrect(double x 1 , double y 1 , double x 2 , double y 2 )<br />

char∗ W.get window pixrect( )<br />

creates a color pixrect of width w = x 2 − x 1 , height h =<br />

y2 − y1, and copies all pixels from the rectangular area<br />

(x 1 , x 2 , y 1 , y 2 ) of W into it.<br />

creates a pixrect copy of the current window contents.<br />

int<br />

W.get width(char ∗ pr) returns the width (number of pixels in a row) of pixrect<br />

pr.

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

Saved successfully!

Ooh no, something went wrong!