Skip to main content

close_gaps

Function close_gaps 

Source
pub(crate) fn close_gaps(
    rects: &[(i32, i32, i32, i32)],
    sizes: &[(i32, i32)],
) -> Vec<(i32, i32, i32, i32)>
Expand description

Rectangles arranged in one space, each about to take a new size: the same arrangement in the space of the new sizes. One whose edge met another’s far edge meets it still; every other coordinate is kept. A session places its screens in its logical space, where a scaled screen is smaller than its mode, so an arrangement stated in capture pixels closes up around it here, and a screen changing scale carries its neighbors with it.