Snaps a rectangle to the nearest grid points.
public Rect SnapToGrid(Rect rect)
The rectangle to snap.