/// Calculate the size and position of an outer rectangle.
///
/// Add the offsets to all sides. The expanded rectangle is returned.
/// This method assumes y oriented downward.
Calculate the size and position of an outer rectangle.
Add the offsets to all sides. The expanded rectangle is returned.
This method assumes y oriented downward.
Calculate the size and position of an outer rectangle . Add the offsets to all sides . The expanded rectangle is returned . This method assumes y oriented downward .
pub fn outer_rect(&self, offsets: SideOffsets2D<T, U>) -> Self {
        Rect::new(
            Point2D::new(
                self.origin.x - offsets.left,
                self.origin.y - offsets.top
            ),
            Size2D::new(
                self.size.width + offsets.horizontal(),
                self.size.height + offsets.vertical()
            )
        )
    }
pub fn outer_rect ( & self , offsets : SideOffsets2D < T , U > ) -> Self { Rect :: new ( Point2D :: new ( self . origin . x - offsets . left , self . origin . y - offsets . top ) , Size2D :: new ( self . size . width + offsets . horizontal ( ) , self . size . height + offsets . vertical ( ) ) ) }
Calculate the size and position of an outer rectangle.
Calculate the size and position of an outer rectangle .
&self
offsets
SideOffsets2D<T, U>