Skip to main content

centered_rect

Function centered_rect 

Source
fn centered_rect(percent_x: u16, percent_y: u16, r: Rect) -> Rect
Expand description

Create a centered rectangle for modal overlays. Return a rectangle centered in r by the given width and height percentages. Return a rectangle centered in r by the given width and height percentages.