stroke.py
def _make_debug_grid(self, point, rect, scale_factor, radius_factor):
        """ Creates the reference grid for testing or training."""
        centre_x, centre_y = point
        width, height = rect
        hline_1 = (centre_x-width/2, centre_y-height/scale_factor,
                   centre_x+width/2, centre_y-height/scale_factor)
        hline_2 = (centre_x-width/2, centre_y+height/scale_factor,
                   centre_x+width/2, centre_y+height/scale_factor)
        vline_1 = (centre_x-width/scale_factor, centre_y+height/2,
                   centre_x-width/scale_factor, centre_y-height/2)
        vline_2 = (centre_x+width/scale_factor, centre_y+height/2,
                   centre_x+width/scale_factor, centre_y-height/2)
        x_radius = width*radius_factor/scale_factor
        y_radius = height*radius_factor/scale_factor
        ellipse = (centre_x-x_radius, centre_y-y_radius, x_radius*2, y_radius*2)
        self.debug_grid = (hline_1, hline_2, vline_1, vline_2, ellipse)
 Creates the reference grid for testing or training.
Creates the reference grid for testing or training.
Creates the reference grid for testing or training .
def _make_debug_grid(self, point, rect, scale_factor, radius_factor):
        centre_x, centre_y = point
        width, height = rect
        hline_1 = (centre_x-width/2, centre_y-height/scale_factor,
                   centre_x+width/2, centre_y-height/scale_factor)
        hline_2 = (centre_x-width/2, centre_y+height/scale_factor,
                   centre_x+width/2, centre_y+height/scale_factor)
        vline_1 = (centre_x-width/scale_factor, centre_y+height/2,
                   centre_x-width/scale_factor, centre_y-height/2)
        vline_2 = (centre_x+width/scale_factor, centre_y+height/2,
                   centre_x+width/scale_factor, centre_y-height/2)
        x_radius = width*radius_factor/scale_factor
        y_radius = height*radius_factor/scale_factor
        ellipse = (centre_x-x_radius, centre_y-y_radius, x_radius*2, y_radius*2)
        self.debug_grid = (hline_1, hline_2, vline_1, vline_2, ellipse)
def _make_debug_grid ( self , point , rect , scale_factor , radius_factor ) : centre_x , centre_y = point width , height = rect hline_1 = ( centre_x - width / 2 , centre_y - height / scale_factor , centre_x + width / 2 , centre_y - height / scale_factor ) hline_2 = ( centre_x - width / 2 , centre_y + height / scale_factor , centre_x + width / 2 , centre_y + height / scale_factor ) vline_1 = ( centre_x - width / scale_factor , centre_y + height / 2 , centre_x - width / scale_factor , centre_y - height / 2 ) vline_2 = ( centre_x + width / scale_factor , centre_y + height / 2 , centre_x + width / scale_factor , centre_y - height / 2 ) x_radius = width * radius_factor / scale_factor y_radius = height * radius_factor / scale_factor ellipse = ( centre_x - x_radius , centre_y - y_radius , x_radius * 2 , y_radius * 2 ) self . debug_grid = ( hline_1 , hline_2 , vline_1 , vline_2 , ellipse )
Creates the reference grid for testing or training.
Creates the reference grid for testing or training .
""" Creates the reference grid for testing or training."""
self
point
rect
scale_factor
radius_factor