(
        bitmap, start: Tuple[int, int], strokes, bbox: Tuple[int, int, int, int]
)
Helper function of _extract_strokes() which uses depth first search to
    find the pixels of a glyph.
Helper function of _extract_strokes() which uses depth first search to
    find the pixels of a glyph.
Helper function of _extract_strokes () which uses depth first search to find the pixels of a glyph .
def _extract_stroke(
        bitmap, start: Tuple[int, int], strokes, bbox: Tuple[int, int, int, int]
) -> None:
    """Helper function of _extract_strokes() which uses depth first search to
    find the pixels of a glyph."""
    left, upper, right, lower = bbox
    stack = [start, ]
    while stack:
        x, y = stack.pop()
        if y - 1 >= upper and bitmap[x, y - 1] and strokes.add(_xy(x, y - 1)):
            stack.append((x, y - 1))
        if y + 1 < lower and bitmap[x, y + 1] and strokes.add(_xy(x, y + 1)):
            stack.append((x, y + 1))
        if x - 1 >= left and bitmap[x - 1, y] and strokes.add(_xy(x - 1, y)):
            stack.append((x - 1, y))
        if x + 1 < right and bitmap[x + 1, y] and strokes.add(_xy(x + 1, y)):
            stack.append((x + 1, y))
def _extract_stroke ( bitmap , start : Tuple [ int , int ] , strokes , bbox : Tuple [ int , int , int , int ] ) -> None : left , upper , right , lower = bbox stack = [ start , ] while stack : x , y = stack . pop ( ) if y - 1 >= upper and bitmap [ x , y - 1 ] and strokes . add ( _xy ( x , y - 1 ) ) : stack . append ( ( x , y - 1 ) ) if y + 1 < lower and bitmap [ x , y + 1 ] and strokes . add ( _xy ( x , y + 1 ) ) : stack . append ( ( x , y + 1 ) ) if x - 1 >= left and bitmap [ x - 1 , y ] and strokes . add ( _xy ( x - 1 , y ) ) : stack . append ( ( x - 1 , y ) ) if x + 1 < right and bitmap [ x + 1 , y ] and strokes . add ( _xy ( x + 1 , y ) ) : stack . append ( ( x + 1 , y ) )