def get_drawn_subsurf(surf):
    """Remove empty upper part of operator char surf."""

    rect = surf.get_rect()
    bounding_rect = surf.get_bounding_rect()

    bounding_rect.height += rect.bottom - bounding_rect.bottom

    return surf.subsurface(bounding_rect)
Remove empty upper part of operator char surf.
nodezator/graphman/operatornode/surfs.py