updated rect.clip to optimize
updated rect constructor