create clipAndDraw function