private void drawBresenhamLine(int color, int sz, int x0, int y0, int x1, int y1) {
        boolean steep = (Math.abs(y1 - y0) > Math.abs(x1 - x0));
        int _x0 = x0;
        int _x1 = x1;
        int _y0 = y0;
        int _y1 = y1;
        if(steep){
//       swap(x0, y0)
            int tmp = _y0;
            _y0 = _x0;
            _x0 = tmp;
//         swap(x1, y1)
            tmp = _y1;
            _y1 = _x1;
            _x1 = tmp;
        }
        if(_x0 > _x1){
//         swap(x0, x1)
            int tmp = _x1;
            _x1 = _x0;
            _x0 = tmp;
//         swap(y0, y1)
            tmp = _y0;
            _y0 = _y1;
            _y1 = tmp;
        }
        
        int deltax = (_x1 - _x0);
        int deltay = Math.abs(_y1 - _y0);
        int error = deltax / 2;
        int ystep;
        int y = _y0;
        if (y0 < y1){
            ystep = 1;
        } else {
            ystep = -1;
        }
        for(int x=_x0;x<=_x1;x++){
            if(steep){
                paintPixelAreaXY(color, sz, y,x);
            } else {
                paintPixelAreaXY(color, sz,x, y);
            }
            error = error - deltay;
            if (error < 0){
                y = y + ystep;
                error = error + deltax;
            }
        }
        
    }