context: Clean up setcurve type handling