pub fn brush_line(&self, argx1: i32, argy1: i32, argx2: i32, argy2: i32, radius: i32, 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;
        let r = (radius as f32 * self.zoom_factor.get()) as i32;
        

        loop {
            self.circle(x, y, r, 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 circular shape with mask support
continuus brush circular shape with mask support
continuus brush circular shape with mask support
pub fn brush_line(&self, argx1: i32, argy1: i32, argx2: i32, argy2: i32, radius: i32, 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;
        let r = (radius as f32 * self.zoom_factor.get()) as i32;
        loop {
            self.circle(x, y, r, 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 brush_line ( & self , argx1 : i32 , argy1 : i32 , argx2 : i32 , argy2 : i32 , radius : i32 , 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 ; let r = ( radius as f32 * self . zoom_factor . get ( ) ) as i32 ; loop { self . circle ( x , y , r , 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 circular shape with mask support
continuus brush circular shape with mask support
&self
argx1
i32
argy1
i32
argx2
i32
argy2
i32
radius
i32
color
Color
&self
argx1
i32
argy1
i32
argx2
i32
argy2
i32
radius
i32
color
Color