Drawing Api: Line gradients

Can I apply a gradient to a line I drew with the drawing api? Or can I only use gradients on the fill? :puzzle:

I want to draw a line with the api that fades from left to right (to be a little more specific)