@@ -11,95 +11,95 @@ namespace SixLabors.ImageSharp.Drawing.Processing
1111 public static class DrawPolygonExtensions
1212 {
1313 /// <summary>
14- /// Draws the provided Points as a closed Linear Polygon with the provided brush at the provided thickness .
14+ /// Draws the provided Points as a closed Linear Polygon with the provided Pen .
1515 /// </summary>
1616 /// <param name="source">The image this method extends.</param>
17- /// <param name="options">The options.</param>
18- /// <param name="brush">The brush.</param>
19- /// <param name="thickness">The thickness.</param>
17+ /// <param name="pen">The pen.</param>
2018 /// <param name="points">The points.</param>
2119 /// <returns>The <see cref="Image{TPixel}"/>.</returns>
2220 public static IImageProcessingContext DrawPolygon (
2321 this IImageProcessingContext source ,
24- ShapeGraphicsOptions options ,
25- IBrush brush ,
26- float thickness ,
22+ IPen pen ,
2723 params PointF [ ] points ) =>
28- source . Draw ( options , new Pen ( brush , thickness ) , new Polygon ( new LinearLineSegment ( points ) ) ) ;
24+ source . Draw ( source . GetShapeGraphicsOptions ( ) , pen , new Polygon ( new LinearLineSegment ( points ) ) ) ;
2925
3026 /// <summary>
31- /// Draws the provided Points as a closed Linear Polygon with the provided brush at the provided thickness .
27+ /// Draws the provided Points as a closed Linear Polygon with the provided Pen .
3228 /// </summary>
3329 /// <param name="source">The image this method extends.</param>
34- /// <param name="brush ">The brush .</param>
35- /// <param name="thickness ">The thickness .</param>
30+ /// <param name="options ">The options .</param>
31+ /// <param name="pen ">The pen .</param>
3632 /// <param name="points">The points.</param>
3733 /// <returns>The <see cref="Image{TPixel}"/>.</returns>
3834 public static IImageProcessingContext DrawPolygon (
3935 this IImageProcessingContext source ,
40- IBrush brush ,
41- float thickness ,
36+ ShapeGraphicsOptions options ,
37+ IPen pen ,
4238 params PointF [ ] points ) =>
43- source . Draw ( new Pen ( brush , thickness ) , new Polygon ( new LinearLineSegment ( points ) ) ) ;
39+ source . Draw ( options , pen , new Polygon ( new LinearLineSegment ( points ) ) ) ;
4440
4541 /// <summary>
4642 /// Draws the provided Points as a closed Linear Polygon with the provided brush at the provided thickness.
4743 /// </summary>
4844 /// <param name="source">The image this method extends.</param>
49- /// <param name="color">The color.</param>
45+ /// <param name="options">The options.</param>
46+ /// <param name="brush">The brush.</param>
5047 /// <param name="thickness">The thickness.</param>
5148 /// <param name="points">The points.</param>
5249 /// <returns>The <see cref="Image{TPixel}"/>.</returns>
5350 public static IImageProcessingContext DrawPolygon (
5451 this IImageProcessingContext source ,
55- Color color ,
52+ ShapeGraphicsOptions options ,
53+ IBrush brush ,
5654 float thickness ,
5755 params PointF [ ] points ) =>
58- source . DrawPolygon ( new SolidBrush ( color ) , thickness , points ) ;
56+ source . DrawPolygon ( options , new Pen ( brush , thickness ) , points ) ;
5957
6058 /// <summary>
6159 /// Draws the provided Points as a closed Linear Polygon with the provided brush at the provided thickness.
6260 /// </summary>
6361 /// <param name="source">The image this method extends.</param>
64- /// <param name="options">The options.</param>
65- /// <param name="color">The color.</param>
62+ /// <param name="brush">The brush.</param>
6663 /// <param name="thickness">The thickness.</param>
6764 /// <param name="points">The points.</param>
6865 /// <returns>The <see cref="Image{TPixel}"/>.</returns>
6966 public static IImageProcessingContext DrawPolygon (
7067 this IImageProcessingContext source ,
71- ShapeGraphicsOptions options ,
72- Color color ,
68+ IBrush brush ,
7369 float thickness ,
7470 params PointF [ ] points ) =>
75- source . DrawPolygon ( options , new SolidBrush ( color ) , thickness , points ) ;
71+ source . DrawPolygon ( new Pen ( brush , thickness ) , points ) ;
7672
7773 /// <summary>
78- /// Draws the provided Points as a closed Linear Polygon with the provided Pen .
74+ /// Draws the provided Points as a closed Linear Polygon with the provided brush at the provided thickness .
7975 /// </summary>
8076 /// <param name="source">The image this method extends.</param>
81- /// <param name="pen">The pen.</param>
77+ /// <param name="color">The color.</param>
78+ /// <param name="thickness">The thickness.</param>
8279 /// <param name="points">The points.</param>
8380 /// <returns>The <see cref="Image{TPixel}"/>.</returns>
8481 public static IImageProcessingContext DrawPolygon (
8582 this IImageProcessingContext source ,
86- IPen pen ,
83+ Color color ,
84+ float thickness ,
8785 params PointF [ ] points ) =>
88- source . Draw ( new ShapeGraphicsOptions ( ) , pen , new Polygon ( new LinearLineSegment ( points ) ) ) ;
86+ source . DrawPolygon ( new SolidBrush ( color ) , thickness , points ) ;
8987
9088 /// <summary>
91- /// Draws the provided Points as a closed Linear Polygon with the provided Pen .
89+ /// Draws the provided Points as a closed Linear Polygon with the provided brush at the provided thickness .
9290 /// </summary>
9391 /// <param name="source">The image this method extends.</param>
9492 /// <param name="options">The options.</param>
95- /// <param name="pen">The pen.</param>
93+ /// <param name="color">The color.</param>
94+ /// <param name="thickness">The thickness.</param>
9695 /// <param name="points">The points.</param>
9796 /// <returns>The <see cref="Image{TPixel}"/>.</returns>
9897 public static IImageProcessingContext DrawPolygon (
9998 this IImageProcessingContext source ,
10099 ShapeGraphicsOptions options ,
101- IPen pen ,
100+ Color color ,
101+ float thickness ,
102102 params PointF [ ] points ) =>
103- source . Draw ( options , pen , new Polygon ( new LinearLineSegment ( points ) ) ) ;
103+ source . DrawPolygon ( options , new SolidBrush ( color ) , thickness , points ) ;
104104 }
105105}
0 commit comments