fixed the clipping around the edges of regions with different gradients