pub fn join_with_point(&mut self, point: &Point) {
        if point.x() < self.x() {
            self.set_width(self.width() + self.x() - point.x());
            self.set_x(point.x());
        }
        if point.y() < self.y() {
            self.set_height(self.height() + self.y() - point.y());
            self.set_y(point.y());
        }
        if point.x() > self.x() + self.width() {
            self.set_width(point.x() - self.x());
        }
        if point.y() > self.y() + self.height() {
            self.set_height(point.y() - self.y());
        }
    }
/// Extends this rectangle to cover the given point.
Extends this rectangle to cover the given point.
Extends this rectangle to cover the given point .
pub fn join_with_point(&mut self, point: &Point) {
        if point.x() < self.x() {
            self.set_width(self.width() + self.x() - point.x());
            self.set_x(point.x());
        }
        if point.y() < self.y() {
            self.set_height(self.height() + self.y() - point.y());
            self.set_y(point.y());
        }
        if point.x() > self.x() + self.width() {
            self.set_width(point.x() - self.x());
        }
        if point.y() > self.y() + self.height() {
            self.set_height(point.y() - self.y());
        }
    }
pub fn join_with_point ( & mut self , point : & Point ) { if point . x ( ) < self . x ( ) { self . set_width ( self . width ( ) + self . x ( ) - point . x ( ) ) ; self . set_x ( point . x ( ) ) ; } if point . y ( ) < self . y ( ) { self . set_height ( self . height ( ) + self . y ( ) - point . y ( ) ) ; self . set_y ( point . y ( ) ) ; } if point . x ( ) > self . x ( ) + self . width ( ) { self . set_width ( point . x ( ) - self . x ( ) ) ; } if point . y ( ) > self . y ( ) + self . height ( ) { self . set_height ( point . y ( ) - self . y ( ) ) ; } }
Extends this rectangle to cover the given point.
Extends this rectangle to cover the given point .
&mut self
point
&Point