def draw_depth_finish(
    surf,
    thickness=1,
    outset=True,
    highlight_color=HIGHLIGHT_COLOR,
    shadow_color=SHADOW_COLOR,
):
    """Give a finish which conveys depth.

    Such finish application consists of drawing polygons
    which work as borders of the surface to simulate
    highlights and shadows, giving depth to the surface.

    Parameters
    ==========

    surf (pygame.Surface instance)
        surface wherein to draw the lines.
    thickness (integer >= 1)
        how thick the finish must be.
    outset (boolean)
        indicates whether the depth must represent an outset
        area (when True) or an inset area (when False).
    highlight_color, shadow_color
        (pygame.Color instances or tuples of integers
        representing RGB values of colors)
        colors used for highlights and shadows, respectively.
    """
    ### if the depth is supposed to look like an inset
    ### (not an outset), swap the highlight and shadow
    ### colors

    if not outset:

        highlight_color, shadow_color = shadow_color, highlight_color

    ### retrieve a rect for the surface
    rect = surf.get_rect()

    ### due to how blitting works, the rect
    ### must be slightly repositioned and resided
    ### before we start blitting

    rect.move_ip(-1, -1)
    rect.width += 1
    rect.height += 1

    ### draw lines

    for _ in range(thickness):

        ## deflate rect
        rect.inflate_ip(-2, -2)

        ## obtain points for each color and
        ## draw the lines

        for color, point_names in (
            (shadow_color, SHADOW_POINT_NAMES),
            (highlight_color, HIGHLIGHT_POINT_NAMES),
        ):

            ## obtain points
            points = [getattr(rect, point_name) for point_name in point_names]

            ## blit lines
            draw_lines(surf, color, False, points)
Give a finish which conveys depth.

    Such finish application consists of drawing polygons
    which work as borders of the surface to simulate
    highlights and shadows, giving depth to the surface.

    Parameters
    ==========

    surf (pygame.Surface instance)
        surface wherein to draw the lines.
    thickness (integer >= 1)
        how thick the finish must be.
    outset (boolean)
        indicates whether the depth must represent an outset
        area (when True) or an inset area (when False).
    highlight_color, shadow_color
        (pygame.Color instances or tuples of integers
        representing RGB values of colors)
        colors used for highlights and shadows, respectively.
    
nodezator/surfsman/draw.py