/// <summary> /// Creates a new ring which is the inverse of this ring. /// </summary> /// <returns>The inverse of this ring.</returns> /// <remarks> /// The inverse function will create a hole from a fill or a fill from a hole. /// If the hold flag is not set the point winding order will be reversed. /// </remarks> public Ring2 GetInverse() { Contract.Ensures(Contract.Result <Ring2>() != null); if (Hole.HasValue) { return(new Ring2(this.Reverse(), !Hole.GetValueOrDefault())); } return(new Ring2(this.Reverse())); }