Optimization to span drawing function

Unrolled loop.