modify DrawCurves to support multiple curves.