Drawing rectangle and linear gradients