Is there an optimized way to draw shapes with a gradient stroke ?