Added clipToWindowCoordinates