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

W.screenshot(string fname, bool full color = true)<br />

creates a screenshot of the current window. On unix systems<br />

suffix .ps is appended to fname and the output format<br />

is postscript. On windows systems the suffix .wmf is added<br />

and the format is windows metafile. If the flag full color<br />

is set to false colors will be translated into grey scales.<br />

3.4.15 Buffering<br />

void W.start buffering( ) starts buffering mode for W . If W has no associated buffer<br />

a buffer pixrect buf of the same size as the current drawing<br />

area of W is created. All subsequent drawing operations<br />

draw into buf instead of W until buffering mode is ended<br />

by calling W.stop buffering( ).<br />

void W.flush buffer( ) copies the contents of the buffer pixrect into the drawing<br />

area of W .<br />

void<br />

W.flush buffer(double dx, double dy)<br />

copies the contents of the buffer pixrect translated by vector<br />

(dx, dy) into the drawing area of W .<br />

void W.flush buffer(double x 0 , double y 0 , double x 1 , double y 1 )<br />

copies the contents of rectangle (x0, y0, x1, y1) of the buffer<br />

pixrect into the corresponding rectangle of the drawin<br />

area.<br />

void W.flush buffer(double dx, double dy, double x 0 , double y 0 , double x 1 , double y 1 )<br />

void W.stop buffering( ) ends buffering mode.<br />

copies the contents of rectangle (x0, y0, x1, y1) of the buffer<br />

pixrect into the corresponding rectangle of the drawin area<br />

translated by vector (dx, dy).<br />

void<br />

W.stop buffering(char ∗ & prect)<br />

ends buffering mode and returns the current buffer pixrect<br />

in prect.<br />

3.4.16 Clipping<br />

void W.set clip rectangle(double x 0 , double y 0 , double x 1 , double y 1 )<br />

sets the clipping region of W to rectangle (x0, y0, x1, y1).<br />

void W.set clip ellipse(double x 0 , double y 0 , double r 1 , double r 2 )<br />

sets the clipping region of W to ellipse with center (x, y)<br />

and horizontal radius r1 and vertical radius r2.<br />

void W.reset clipping( ) restores the clipping region to the entire drawing area of<br />

W .

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

Saved successfully!

Ooh no, something went wrong!