draw gradient path no matter straight or curved