added clipping to draw helper