Skip to main content

centered_rect_size

Function centered_rect_size 

Source
fn centered_rect_size(w: u16, h: u16, r: Rect) -> Rect
Expand description

Return a rectangle centered in r by the given width and height percentages. Shrink a rectangle to the given absolute width and height, centered. Return a rectangle centered in r by the given width and height percentages.