public void Add(Point item) { if (item == null) { throw new NullReferenceException("Cannot add a corner which is null to a region"); } if (Count == 0 || item != Corners[0]) { Corners.Add(item); } }
public bool Contains(Point item) => Corners.Find(c => c == item) != null;
public Points RotateEdgesAt(Angle angle, Point point) => Corners.ConvertAll(corner => corner.RotateAt(angle, point));
public bool Remove(Point item) => Corners.Remove(item);
public abstract bool Inscribes(Point p);
public KtSolidRegion Translate(Point point) => new(TranslateCorners(point))
public override bool Inscribes(Point p) => LoopedCorners().Inscribes(p) && (holes.Count == 0 || holes.All(reg => !reg.Inscribes(p)));
public KtHollowRegion Translate(Point point2D) => new(TranslateCorners(point2D));