public native capture(filename as String) as Void throws IOException
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.
| Parameter | Description |
|---|---|
filename | Destination BMP file. |
win = MainWindow("Preview")
win.size = (640, 480)
win.capture("preview.bmp")