pub fn rect_line(&self, argx1: i32, argy1: i32, argx2: i32, argy2: i32,lenght: u32, width: u32, color: Color) {
        let mut x = argx1;
        let mut y = argy1;

        let dx = if argx1 > argx2 { argx1 - argx2 } else { argx2 - argx1 };
        let dy = if argy1 > argy2 { argy1 - argy2 } else { argy2 - argy1 };

        let sx = if argx1 < argx2 { 1 } else { -1 };
        let sy = if argy1 < argy2 { 1 } else { -1 };

        let mut err = if dx > dy { dx } else {-dy} / 2;
        let mut err_tolerance;

        loop {
            self.rect(x, y, lenght, width, color);

            if x == argx2 && y == argy2 { break };

            err_tolerance = 2 * err;

            if err_tolerance > -dx { err -= dy; x += sx; }
            if err_tolerance < dy { err += dx; y += sy; }
        }
    }
///continuus brush rectangular shape not yet with mask support
continuus brush rectangular shape not yet with mask support
continuus brush rectangular shape not yet with mask support
pub fn rect_line(&self, argx1: i32, argy1: i32, argx2: i32, argy2: i32,lenght: u32, width: u32, color: Color) {
        let mut x = argx1;
        let mut y = argy1;
        let dx = if argx1 > argx2 { argx1 - argx2 } else { argx2 - argx1 };
        let dy = if argy1 > argy2 { argy1 - argy2 } else { argy2 - argy1 };
        let sx = if argx1 < argx2 { 1 } else { -1 };
        let sy = if argy1 < argy2 { 1 } else { -1 };
        let mut err = if dx > dy { dx } else {-dy} / 2;
        let mut err_tolerance;
        loop {
            self.rect(x, y, lenght, width, color);
            if x == argx2 && y == argy2 { break };
            err_tolerance = 2 * err;
            if err_tolerance > -dx { err -= dy; x += sx; }
            if err_tolerance < dy { err += dx; y += sy; }
        }
    }
pub fn rect_line ( & self , argx1 : i32 , argy1 : i32 , argx2 : i32 , argy2 : i32 , lenght : u32 , width : u32 , color : Color ) { let mut x = argx1 ; let mut y = argy1 ; let dx = if argx1 > argx2 { argx1 - argx2 } else { argx2 - argx1 } ; let dy = if argy1 > argy2 { argy1 - argy2 } else { argy2 - argy1 } ; let sx = if argx1 < argx2 { 1 } else { - 1 } ; let sy = if argy1 < argy2 { 1 } else { - 1 } ; let mut err = if dx > dy { dx } else { - dy } / 2 ; let mut err_tolerance ; loop { self . rect ( x , y , lenght , width , color ) ; if x == argx2 && y == argy2 { break } ; err_tolerance = 2 * err ; if err_tolerance > - dx { err -= dy ; x += sx ; } if err_tolerance < dy { err += dx ; y += sy ; } } }
continuus brush rectangular shape not yet with mask support
continuus brush rectangular shape not yet with mask support
&self
argx1
i32
argy1
i32
argx2
i32
argy2
i32
lenght
u32
width
u32
color
Color
&self
argx1
i32
argy1
i32
argx2
i32
argy2
i32
lenght
u32
width
u32
color
Color