MCPcopy Index your code
hub / github.com/lxn/walk / Screenshot

Method Screenshot

window.go:1937–1945  ·  view source on GitHub ↗

Screenshot returns an image of the window.

()

Source from the content-addressed store, hash-verified

1935
1936// Screenshot returns an image of the window.
1937func (wb *WindowBase) Screenshot() (*image.RGBA, error) {
1938 bmp, err := NewBitmapFromWindow(wb)
1939 if err != nil {
1940 return nil, err
1941 }
1942 defer bmp.Dispose()
1943
1944 return bmp.ToImage()
1945}
1946
1947// FocusedWindow returns the Window that has the keyboard input focus.
1948func FocusedWindow() Window {

Callers

nothing calls this directly

Calls 3

NewBitmapFromWindowFunction · 0.85
ToImageMethod · 0.80
DisposeMethod · 0.65

Tested by

no test coverage detected