示例#1
0
 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);
     }
 }
示例#2
0
 public bool Contains(Point item) => Corners.Find(c => c == item) != null;
示例#3
0
 public Points RotateEdgesAt(Angle angle, Point point) => Corners.ConvertAll(corner => corner.RotateAt(angle, point));
示例#4
0
 public bool Remove(Point item) => Corners.Remove(item);
示例#5
0
 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));