klyn.gui.windows.Window.capture
method

    public native capture(filename as String) as Void throws IOException

Description

Captures the current window client area into a BMP image.

The capture uses the same offscreen `Painter` replay pipeline as the native window backend; it does not invoke an external screenshot tool and does not include operating-system window decorations.

Parameters

- filename Destination BMP file.

Throws

- IOException if the destination path is invalid or cannot be written. ```klyn win = MainWindow("Preview") win.size = (640, 480) win.capture("preview.bmp") ```