px

Function px 

Source
pub const fn px(pixels: f32) -> Pixels
Expand description

Constructs a Pixels value representing a length in pixels.

§Arguments

  • pixels - The number of pixels for the length.

§Returns

A Pixels representing the specified number of pixels.