Refactor Line in itself, Context and Painter