Refactor draw_lineno to use draw_graphic