Exemplo n.º 1
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));
         }
     }
 }
 /// <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());
     }
 }
Exemplo n.º 3
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());
     }
 }