-Added setClip function to make the paint in panel only paint in specific region