Window.capture

Capture the pixel data of the current window and returns a Surface with this pixel data. You can also alter the format of the pixel data. Default is <code>Texture.Format.BGRA</code>. This method is predestinated for screenshots.

struct Window
@nogc
capture
nothrow

Examples

Window wnd = ...
...
wnd.capture().saveToFile("samples/img/screenshot.png");

Meta