Skip to main content

surface

Function surface 

Source
pub fn surface(source: impl Into<SurfaceSource>) -> Surface
Expand description

Creates a Surface that shows source.

The frame is scaled with ObjectFit::Contain unless you change it with Surface::object_fit. Size the element with Styled methods, such as .size_full(), because the frame doesn’t give it a size.