pub unsafe fn capture_view(
view: *mut c_void,
width: u32,
height: u32,
) -> RenderedExpand description
Capture any NSView into a width x height bitmap.
Some things SwiftUI draws never reach a hosting view’s own layer — a
.toolbar is installed into the window’s titlebar, which is a sibling of the
content view — so verifying them means capturing a different view than the
one the root was set on. See capture_window.
§Safety
view must be a live NSView.