/// <summary>
        /// Add a contour to the polygon.
        /// </summary>
        /// <param name="contour">The contour to insert.</param>
        /// <param name="hole">Point inside the contour, making it a hole.</param>
        public void Add(Contour contour, Point hole)
        {
            this.points.AddRange(contour.Points);
            this.segments.AddRange(contour.GetSegments());

            this.holes.Add(hole);
        }
Beispiel #2
0
        /// <summary>
        /// Add a contour to the polygon.
        /// </summary>
        /// <param name="contour">The contour to insert.</param>
        /// <param name="hole">Point inside the contour, making it a hole.</param>
        public void Add(Contour contour, Point hole)
        {
            points.AddRange(contour.Points);
            segments.AddRange(contour.GetSegments());

            holes.Add(hole);
        }
 /// <summary>
 /// Add a contour to the polygon.
 /// </summary>
 /// <param name="contour">The contour to insert.</param>
 /// <param name="hole">Treat contour as a hole.</param>
 public void Add(Contour contour, bool hole = false)
 {
     if (hole)
     {
         this.Add(contour, contour.FindInteriorPoint());
     }
     else
     {
         this.points.AddRange(contour.Points);
         this.segments.AddRange(contour.GetSegments());
     }
 }
Beispiel #4
0
 /// <summary>
 /// Add a contour to the polygon.
 /// </summary>
 /// <param name="contour">The contour to insert.</param>
 /// <param name="hole">Treat contour as a hole.</param>
 public void Add(Contour contour, bool hole = false, int regionlabel = 0)
 {
     if (hole)
     {
         this.Add(contour, contour.FindInteriorPoint());
     }
     else
     {
         this.points.AddRange(contour.Points);
         this.segments.AddRange(contour.GetSegments());
         if (regionlabel != 0)
         {
             var interiorPoint = contour.FindInteriorPoint();
             this.Regions.Add(new RegionPointer(interiorPoint.X, interiorPoint.Y, regionlabel));
         }
     }
 }
Beispiel #5
0
        /// <summary>
        /// Add a contour to the polygon.
        /// </summary>
        /// <param name="contour">The contour to insert.</param>
        /// <param name="hole">Point inside the contour, making it a hole.</param>
        public void Add(Contour contour, Point hole)
        {
            this.points.AddRange(contour.Points);
            this.segments.AddRange(contour.GetSegments());

            this.holes.Add(hole);
        }
Beispiel #6
0
 /// <summary>
 /// Add a contour to the polygon.
 /// </summary>
 /// <param name="contour">The contour to insert.</param>
 /// <param name="hole">Treat contour as a hole.</param>
 public void Add(Contour contour, bool hole = false)
 {
     if (hole)
     {
         this.Add(contour, contour.FindInteriorPoint());
     }
     else
     {
         this.points.AddRange(contour.Points);
         this.segments.AddRange(contour.GetSegments());
     }
 }