Skip to main content

render_element_with_state

Function render_element_with_state 

Source
pub fn render_element_with_state<Msg>(
    el: Element<Msg>,
    theme: &Theme,
    size: (u32, u32),
    state: &mut FrameState,
) -> RgbaImage
Expand description

Like render_element, but with caller-provided retained state, so tests can render scrolled (and later focused/hovered) configurations. The requested size is clamped like render_element’s.

§Panics

If no compute-capable GPU adapter exists or rendering fails.