i need to draw rectangle inside panel. If rectangles x,y,w,h exceeds paneles size,location adjust and draw rectangle inside panel. how to calculate anyone help me. fig 1 dis