added textpainter and edgepainter