src/Foundation/Media/Gimela.Media.Imaging/Helpers/DrawingHelper.cs
/// <summary>
/// Draw a polygon on the specified image.
/// </summary>
/// 
/// <param name="image">Source image to draw on.</param>
/// <param name="points">Points of the polygon to draw.</param>
/// <param name="color">Polygon's color.</param>
/// 
/// <remarks><para>The method draws a polygon by connecting all points from the
/// first one to the last one and then connecting the last point with the first one.
/// </para></remarks>
/// 
Draw a polygon on the specified image.
Draw a polygon on the specified image .
public static void Polygon(UnmanagedImage image, List<IntPoint> points, Color color)
    {
      for (int i = 1, n = points.Count; i < n; i++)
      {
        Line(image, points[i - 1], points[i], color);
      }
      Line(image, points[points.Count - 1], points[0], color);
    }
public static void Polygon ( UnmanagedImage image , List < IntPoint > points , Color color ) { for ( int i = 1 , n = points . Count ; i < n ; i ++ ) { Line ( image , points [ i - 1 ] , points [ i ] , color ) ; } Line ( image , points [ points . Count - 1 ] , points [ 0 ] , color ) ; }
Draw a polygon on the specified image.
Draw a polygon on the specified image .
image
UnmanagedImage
Source image to draw on.
Source image to draw on .
points
List<IntPoint>
Points of the polygon to draw.
Points of the polygon to draw .
color
Color
None
remarks
The method draws a polygon by connecting all points from the
first one to the last one and then connecting the last point with the first one.
The method draws a polygon by connecting all points from the first one to the last one and then connecting the last point with the first one .