Enhanced to paint curves.