rewrite WrapRect