diff --git a/ImageSharp.sln b/ImageSharp.sln
index 2e0cbd52e9..ef15dc734e 100644
--- a/ImageSharp.sln
+++ b/ImageSharp.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26403.7
+VisualStudioVersion = 15.0.26430.6
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionItems", "{C317F1B1-D75E-4C6D-83EB-80367343E0D7}"
ProjectSection(SolutionItems) = preProject
@@ -45,6 +45,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageSharp.Benchmarks", "te
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageSharp.Sandbox46", "tests\ImageSharp.Sandbox46\ImageSharp.Sandbox46.csproj", "{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scratch", "Scratch\Scratch.csproj", "{615D14B2-3092-45E7-BA72-817C131E8018}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -127,6 +129,18 @@ Global
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Release|x64.Build.0 = Release|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Release|x86.ActiveCfg = Release|Any CPU
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB}.Release|x86.Build.0 = Release|Any CPU
+ {615D14B2-3092-45E7-BA72-817C131E8018}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {615D14B2-3092-45E7-BA72-817C131E8018}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {615D14B2-3092-45E7-BA72-817C131E8018}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {615D14B2-3092-45E7-BA72-817C131E8018}.Debug|x64.Build.0 = Debug|Any CPU
+ {615D14B2-3092-45E7-BA72-817C131E8018}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {615D14B2-3092-45E7-BA72-817C131E8018}.Debug|x86.Build.0 = Debug|Any CPU
+ {615D14B2-3092-45E7-BA72-817C131E8018}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {615D14B2-3092-45E7-BA72-817C131E8018}.Release|Any CPU.Build.0 = Release|Any CPU
+ {615D14B2-3092-45E7-BA72-817C131E8018}.Release|x64.ActiveCfg = Release|Any CPU
+ {615D14B2-3092-45E7-BA72-817C131E8018}.Release|x64.Build.0 = Release|Any CPU
+ {615D14B2-3092-45E7-BA72-817C131E8018}.Release|x86.ActiveCfg = Release|Any CPU
+ {615D14B2-3092-45E7-BA72-817C131E8018}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -139,5 +153,6 @@ Global
{EA3000E9-2A91-4EC4-8A68-E566DEBDC4F6} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
{2BF743D8-2A06-412D-96D7-F448F00C5EA5} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
{96188137-5FA6-4924-AB6E-4EFF79C6E0BB} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
+ {615D14B2-3092-45E7-BA72-817C131E8018} = {56801022-D71A-4FBE-BC5B-CBA08E2284EC}
EndGlobalSection
EndGlobal
diff --git a/Scratch/Program.cs b/Scratch/Program.cs
new file mode 100644
index 0000000000..b3be8af01f
--- /dev/null
+++ b/Scratch/Program.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Numerics;
+using ImageSharp;
+
+namespace Scratch
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ using (var image = Image.Load(@"C:\Users\tocso\Desktop\92d8758c-471c-11e7-81d8-62ec301b092a (1).jpg")) {
+
+ //image.Fill(Rgba32.Beige, b => b.AddBezier(Vector2.UnitX, Vector2.UnitX, Vector2.UnitX, Vector2.UnitX));
+
+ image.Resize(640, 480)
+ .Save(@"C:\Users\tocso\Desktop\92d8758c-471c-11e7-81d8-62ec301b092a (1)-saved.jpg");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Scratch/Scratch.csproj b/Scratch/Scratch.csproj
new file mode 100644
index 0000000000..99b199b0ad
--- /dev/null
+++ b/Scratch/Scratch.csproj
@@ -0,0 +1,13 @@
+
+
+
+ Exe
+ netcoreapp1.1
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/ImageSharp.Drawing/Brushes/IBrush.cs b/src/ImageSharp.Drawing/Brushes/IBrush.cs
index 8cb7317823..33b516e5c2 100644
--- a/src/ImageSharp.Drawing/Brushes/IBrush.cs
+++ b/src/ImageSharp.Drawing/Brushes/IBrush.cs
@@ -7,6 +7,7 @@ namespace ImageSharp.Drawing
{
using ImageSharp.PixelFormats;
using Processors;
+ using SixLabors.Primitives;
///
/// Brush represents a logical configuration of a brush which can be used to source pixel colors
diff --git a/src/ImageSharp.Drawing/Brushes/ImageBrush{TPixel}.cs b/src/ImageSharp.Drawing/Brushes/ImageBrush{TPixel}.cs
index 59dbd39266..57fcd8ffa6 100644
--- a/src/ImageSharp.Drawing/Brushes/ImageBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Brushes/ImageBrush{TPixel}.cs
@@ -10,6 +10,7 @@ namespace ImageSharp.Drawing.Brushes
using ImageSharp.Memory;
using ImageSharp.PixelFormats;
using Processors;
+ using SixLabors.Primitives;
///
/// Provides an implementation of an image brush for painting images within areas.
diff --git a/src/ImageSharp.Drawing/Brushes/PatternBrush{TPixel}.cs b/src/ImageSharp.Drawing/Brushes/PatternBrush{TPixel}.cs
index 5dd57bda66..5fcb92bdc7 100644
--- a/src/ImageSharp.Drawing/Brushes/PatternBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Brushes/PatternBrush{TPixel}.cs
@@ -11,6 +11,7 @@ namespace ImageSharp.Drawing.Brushes
using ImageSharp.Memory;
using ImageSharp.PixelFormats;
using Processors;
+ using SixLabors.Primitives;
///
/// Provides an implementation of a pattern brush for painting patterns.
diff --git a/src/ImageSharp.Drawing/Brushes/RecolorBrush{TPixel}.cs b/src/ImageSharp.Drawing/Brushes/RecolorBrush{TPixel}.cs
index 96d824b2fc..27aa99b975 100644
--- a/src/ImageSharp.Drawing/Brushes/RecolorBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Brushes/RecolorBrush{TPixel}.cs
@@ -11,6 +11,7 @@ namespace ImageSharp.Drawing.Brushes
using ImageSharp.Memory;
using ImageSharp.PixelFormats;
using Processors;
+ using SixLabors.Primitives;
///
/// Provides an implementation of a brush that can recolor an image
diff --git a/src/ImageSharp.Drawing/Brushes/SolidBrush{TPixel}.cs b/src/ImageSharp.Drawing/Brushes/SolidBrush{TPixel}.cs
index 453b4d29ef..21ebb88a04 100644
--- a/src/ImageSharp.Drawing/Brushes/SolidBrush{TPixel}.cs
+++ b/src/ImageSharp.Drawing/Brushes/SolidBrush{TPixel}.cs
@@ -11,6 +11,7 @@ namespace ImageSharp.Drawing.Brushes
using ImageSharp.Memory;
using ImageSharp.PixelFormats;
using Processors;
+ using SixLabors.Primitives;
///
/// Provides an implementation of a solid brush for painting solid color areas.
diff --git a/src/ImageSharp.Drawing/DrawImage.cs b/src/ImageSharp.Drawing/DrawImage.cs
index db40132c8a..03eb7be289 100644
--- a/src/ImageSharp.Drawing/DrawImage.cs
+++ b/src/ImageSharp.Drawing/DrawImage.cs
@@ -7,6 +7,7 @@ namespace ImageSharp
{
using Drawing.Processors;
using ImageSharp.PixelFormats;
+ using SixLabors.Primitives;
///
/// Extension methods for the type.
diff --git a/src/ImageSharp.Drawing/ImageSharp.Drawing.csproj b/src/ImageSharp.Drawing/ImageSharp.Drawing.csproj
index 13500b65af..10562b08ca 100644
--- a/src/ImageSharp.Drawing/ImageSharp.Drawing.csproj
+++ b/src/ImageSharp.Drawing/ImageSharp.Drawing.csproj
@@ -36,7 +36,7 @@
-
+
All
diff --git a/src/ImageSharp.Drawing/Paths/DrawBeziers.cs b/src/ImageSharp.Drawing/Paths/DrawBeziers.cs
index c4ea8c3785..59bcf40363 100644
--- a/src/ImageSharp.Drawing/Paths/DrawBeziers.cs
+++ b/src/ImageSharp.Drawing/Paths/DrawBeziers.cs
@@ -10,6 +10,7 @@ namespace ImageSharp
using Drawing.Brushes;
using Drawing.Pens;
using ImageSharp.PixelFormats;
+ using SixLabors.Primitives;
using SixLabors.Shapes;
///
@@ -27,10 +28,10 @@ namespace ImageSharp
/// The points.
/// The options.
/// The .
- public static Image DrawBeziers(this Image source, IBrush brush, float thickness, Vector2[] points, GraphicsOptions options)
+ public static Image DrawBeziers(this Image source, IBrush brush, float thickness, PointF[] points, GraphicsOptions options)
where TPixel : struct, IPixel
{
- return source.Draw(new Pen(brush, thickness), new Path(new BezierLineSegment(points)), options);
+ return source.Draw(new Pen(brush, thickness), new Path(new CubicBezierLineSegment(points)), options);
}
///
@@ -42,10 +43,10 @@ namespace ImageSharp
/// The thickness.
/// The points.
/// The .
- public static Image DrawBeziers(this Image source, IBrush brush, float thickness, Vector2[] points)
+ public static Image DrawBeziers(this Image source, IBrush brush, float thickness, PointF[] points)
where TPixel : struct, IPixel
{
- return source.Draw(new Pen(brush, thickness), new Path(new BezierLineSegment(points)));
+ return source.Draw(new Pen(brush, thickness), new Path(new CubicBezierLineSegment(points)));
}
///
@@ -57,7 +58,7 @@ namespace ImageSharp
/// The thickness.
/// The points.
/// The .
- public static Image DrawBeziers(this Image source, TPixel color, float thickness, Vector2[] points)
+ public static Image DrawBeziers(this Image source, TPixel color, float thickness, PointF[] points)
where TPixel : struct, IPixel
{
return source.DrawBeziers(new SolidBrush(color), thickness, points);
@@ -73,7 +74,7 @@ namespace ImageSharp
/// The points.
/// The options.
/// The .
- public static Image DrawBeziers(this Image source, TPixel color, float thickness, Vector2[] points, GraphicsOptions options)
+ public static Image DrawBeziers(this Image source, TPixel color, float thickness, PointF[] points, GraphicsOptions options)
where TPixel : struct, IPixel
{
return source.DrawBeziers(new SolidBrush(color), thickness, points, options);
@@ -88,10 +89,10 @@ namespace ImageSharp
/// The points.
/// The options.
/// The .
- public static Image DrawBeziers(this Image source, IPen pen, Vector2[] points, GraphicsOptions options)
+ public static Image DrawBeziers(this Image source, IPen pen, PointF[] points, GraphicsOptions options)
where TPixel : struct, IPixel
{
- return source.Draw(pen, new Path(new BezierLineSegment(points)), options);
+ return source.Draw(pen, new Path(new CubicBezierLineSegment(points)), options);
}
///
@@ -102,10 +103,10 @@ namespace ImageSharp
/// The pen.
/// The points.
/// The .
- public static Image DrawBeziers(this Image source, IPen pen, Vector2[] points)
+ public static Image DrawBeziers(this Image source, IPen pen, PointF[] points)
where TPixel : struct, IPixel
{
- return source.Draw(pen, new Path(new BezierLineSegment(points)));
+ return source.Draw(pen, new Path(new CubicBezierLineSegment(points)));
}
}
}
diff --git a/src/ImageSharp.Drawing/Paths/DrawLines.cs b/src/ImageSharp.Drawing/Paths/DrawLines.cs
index e8c463638f..3ce0dc4da6 100644
--- a/src/ImageSharp.Drawing/Paths/DrawLines.cs
+++ b/src/ImageSharp.Drawing/Paths/DrawLines.cs
@@ -10,6 +10,7 @@ namespace ImageSharp
using Drawing.Brushes;
using Drawing.Pens;
using ImageSharp.PixelFormats;
+ using SixLabors.Primitives;
using SixLabors.Shapes;
///
@@ -27,7 +28,7 @@ namespace ImageSharp
/// The points.
/// The options.
/// The .
- public static Image DrawLines(this Image source, IBrush brush, float thickness, Vector2[] points, GraphicsOptions options)
+ public static Image DrawLines(this Image source, IBrush brush, float thickness, PointF[] points, GraphicsOptions options)
where TPixel : struct, IPixel
{
return source.Draw(new Pen(brush, thickness), new Path(new LinearLineSegment(points)), options);
@@ -42,7 +43,7 @@ namespace ImageSharp
/// The thickness.
/// The points.
/// The .
- public static Image DrawLines(this Image source, IBrush brush, float thickness, Vector2[] points)
+ public static Image DrawLines(this Image source, IBrush brush, float thickness, PointF[] points)
where TPixel : struct, IPixel
{
return source.Draw(new Pen(brush, thickness), new Path(new LinearLineSegment(points)));
@@ -57,7 +58,7 @@ namespace ImageSharp
/// The thickness.
/// The points.
/// The .
- public static Image DrawLines(this Image source, TPixel color, float thickness, Vector2[] points)
+ public static Image DrawLines(this Image source, TPixel color, float thickness, PointF[] points)
where TPixel : struct, IPixel
{
return source.DrawLines(new SolidBrush(color), thickness, points);
@@ -73,7 +74,7 @@ namespace ImageSharp
/// The points.
/// The options.
/// The .>
- public static Image DrawLines(this Image source, TPixel color, float thickness, Vector2[] points, GraphicsOptions options)
+ public static Image DrawLines(this Image source, TPixel color, float thickness, PointF[] points, GraphicsOptions options)
where TPixel : struct, IPixel
{
return source.DrawLines(new SolidBrush(color), thickness, points, options);
@@ -88,7 +89,7 @@ namespace ImageSharp
/// The points.
/// The options.
/// The .
- public static Image DrawLines(this Image source, IPen pen, Vector2[] points, GraphicsOptions options)
+ public static Image DrawLines(this Image source, IPen pen, PointF[] points, GraphicsOptions options)
where TPixel : struct, IPixel
{
return source.Draw(pen, new Path(new LinearLineSegment(points)), options);
@@ -102,7 +103,7 @@ namespace ImageSharp
/// The pen.
/// The points.
/// The .
- public static Image DrawLines(this Image source, IPen pen, Vector2[] points)
+ public static Image DrawLines(this Image source, IPen pen, PointF[] points)
where TPixel : struct, IPixel
{
return source.Draw(pen, new Path(new LinearLineSegment(points)));
diff --git a/src/ImageSharp.Drawing/Paths/DrawPolygon.cs b/src/ImageSharp.Drawing/Paths/DrawPolygon.cs
index 4b99e60c02..4fa469a496 100644
--- a/src/ImageSharp.Drawing/Paths/DrawPolygon.cs
+++ b/src/ImageSharp.Drawing/Paths/DrawPolygon.cs
@@ -10,6 +10,7 @@ namespace ImageSharp
using Drawing.Brushes;
using Drawing.Pens;
using ImageSharp.PixelFormats;
+ using SixLabors.Primitives;
using SixLabors.Shapes;
///
@@ -27,7 +28,7 @@ namespace ImageSharp
/// The points.
/// The options.
/// The .
- public static Image DrawPolygon(this Image source, IBrush brush, float thickness, Vector2[] points, GraphicsOptions options)
+ public static Image DrawPolygon(this Image source, IBrush brush, float thickness, PointF[] points, GraphicsOptions options)
where TPixel : struct, IPixel
{
return source.Draw(new Pen(brush, thickness), new Polygon(new LinearLineSegment(points)), options);
@@ -42,7 +43,7 @@ namespace ImageSharp
/// The thickness.
/// The points.
/// The .
- public static Image DrawPolygon(this Image source, IBrush brush, float thickness, Vector2[] points)
+ public static Image DrawPolygon(this Image source, IBrush brush, float thickness, PointF[] points)
where TPixel : struct, IPixel
{
return source.Draw(new Pen(brush, thickness), new Polygon(new LinearLineSegment(points)));
@@ -57,7 +58,7 @@ namespace ImageSharp
/// The thickness.
/// The points.
/// The .
- public static Image DrawPolygon(this Image source, TPixel color, float thickness, Vector2[] points)
+ public static Image DrawPolygon(this Image source, TPixel color, float thickness, PointF[] points)
where TPixel : struct, IPixel
{
return source.DrawPolygon(new SolidBrush(color), thickness, points);
@@ -73,7 +74,7 @@ namespace ImageSharp
/// The points.
/// The options.
/// The .
- public static Image DrawPolygon(this Image source, TPixel color, float thickness, Vector2[] points, GraphicsOptions options)
+ public static Image DrawPolygon(this Image source, TPixel color, float thickness, PointF[] points, GraphicsOptions options)
where TPixel : struct, IPixel
{
return source.DrawPolygon(new SolidBrush(color), thickness, points, options);
@@ -87,7 +88,7 @@ namespace ImageSharp
/// The pen.
/// The points.
/// The .
- public static Image DrawPolygon(this Image source, IPen pen, Vector2[] points)
+ public static Image DrawPolygon(this Image source, IPen pen, PointF[] points)
where TPixel : struct, IPixel
{
return source.Draw(pen, new Polygon(new LinearLineSegment(points)), GraphicsOptions.Default);
@@ -102,7 +103,7 @@ namespace ImageSharp
/// The points.
/// The options.
/// The .
- public static Image DrawPolygon(this Image source, IPen pen, Vector2[] points, GraphicsOptions options)
+ public static Image DrawPolygon(this Image source, IPen pen, PointF[] points, GraphicsOptions options)
where TPixel : struct, IPixel
{
return source.Draw(pen, new Polygon(new LinearLineSegment(points)), options);
diff --git a/src/ImageSharp.Drawing/Paths/DrawRectangle.cs b/src/ImageSharp.Drawing/Paths/DrawRectangle.cs
index 0fefc6cab4..b3f0e6fc3b 100644
--- a/src/ImageSharp.Drawing/Paths/DrawRectangle.cs
+++ b/src/ImageSharp.Drawing/Paths/DrawRectangle.cs
@@ -9,6 +9,7 @@ namespace ImageSharp
using Drawing.Brushes;
using Drawing.Pens;
using ImageSharp.PixelFormats;
+ using SixLabors.Primitives;
///
/// Extension methods for the type.
@@ -24,10 +25,10 @@ namespace ImageSharp
/// The shape.
/// The options.
/// The .
- public static Image Draw(this Image source, IPen pen, Rectangle shape, GraphicsOptions options)
+ public static Image Draw(this Image source, IPen pen, RectangleF shape, GraphicsOptions options)
where TPixel : struct, IPixel
{
- return source.Draw(pen, new SixLabors.Shapes.Rectangle(shape.X, shape.Y, shape.Width, shape.Height), options);
+ return source.Draw(pen, new SixLabors.Shapes.RectangularePolygon(shape.X, shape.Y, shape.Width, shape.Height), options);
}
///
@@ -38,7 +39,7 @@ namespace ImageSharp
/// The pen.
/// The shape.
/// The .
- public static Image Draw(this Image source, IPen pen, Rectangle shape)
+ public static Image Draw(this Image source, IPen pen, RectangleF shape)
where TPixel : struct, IPixel
{
return source.Draw(pen, shape, GraphicsOptions.Default);
@@ -54,7 +55,7 @@ namespace ImageSharp
/// The shape.
/// The options.
/// The .
- public static Image Draw(this Image source, IBrush brush, float thickness, Rectangle shape, GraphicsOptions options)
+ public static Image Draw(this Image source, IBrush brush, float thickness, RectangleF shape, GraphicsOptions options)
where TPixel : struct, IPixel
{
return source.Draw(new Pen(brush, thickness), shape, options);
@@ -69,7 +70,7 @@ namespace ImageSharp
/// The thickness.
/// The shape.
/// The .
- public static Image Draw(this Image source, IBrush brush, float thickness, Rectangle shape)
+ public static Image Draw(this Image source, IBrush brush, float thickness, RectangleF shape)
where TPixel : struct, IPixel
{
return source.Draw(new Pen(brush, thickness), shape);
@@ -85,7 +86,7 @@ namespace ImageSharp
/// The shape.
/// The options.
/// The .
- public static Image Draw(this Image source, TPixel color, float thickness, Rectangle shape, GraphicsOptions options)
+ public static Image Draw(this Image source, TPixel color, float thickness, RectangleF shape, GraphicsOptions options)
where TPixel : struct, IPixel
{
return source.Draw(new SolidBrush(color), thickness, shape, options);
@@ -100,7 +101,7 @@ namespace ImageSharp
/// The thickness.
/// The shape.
/// The .
- public static Image Draw(this Image source, TPixel color, float thickness, Rectangle shape)
+ public static Image Draw(this Image source, TPixel color, float thickness, RectangleF shape)
where TPixel : struct, IPixel
{
return source.Draw(new SolidBrush(color), thickness, shape);
diff --git a/src/ImageSharp.Drawing/Paths/FillPathBuilder.cs b/src/ImageSharp.Drawing/Paths/FillPathBuilder.cs
new file mode 100644
index 0000000000..abb5ef73a7
--- /dev/null
+++ b/src/ImageSharp.Drawing/Paths/FillPathBuilder.cs
@@ -0,0 +1,80 @@
+//
+// Copyright (c) James Jackson-South and contributors.
+// Licensed under the Apache License, Version 2.0.
+//
+
+namespace ImageSharp
+{
+ using System;
+ using Drawing;
+ using Drawing.Brushes;
+ using ImageSharp.PixelFormats;
+ using SixLabors.Shapes;
+
+ ///
+ /// Extension methods for the type.
+ ///
+ public static partial class ImageExtensions
+ {
+ ///
+ /// Flood fills the image in the shape of the provided polygon with the specified brush..
+ ///
+ /// The type of the color.
+ /// The image this method extends.
+ /// The brush.
+ /// The shape.
+ /// The graphics options.
+ /// The .
+ public static Image Fill(this Image source, IBrush brush, Action path, GraphicsOptions options)
+ where TPixel : struct, IPixel
+ {
+ var pb = new PathBuilder();
+ path(pb);
+
+ return source.Fill(brush, pb.Build(), options);
+ }
+
+ ///
+ /// Flood fills the image in the shape of the provided polygon with the specified brush.
+ ///
+ /// The type of the color.
+ /// The image this method extends.
+ /// The brush.
+ /// The path.
+ /// The .
+ public static Image Fill(this Image source, IBrush brush, Action path)
+ where TPixel : struct, IPixel
+ {
+ return source.Fill(brush, path, GraphicsOptions.Default);
+ }
+
+ ///
+ /// Flood fills the image in the shape of the provided polygon with the specified brush..
+ ///
+ /// The type of the color.
+ /// The image this method extends.
+ /// The color.
+ /// The path.
+ /// The options.
+ /// The .
+ public static Image Fill(this Image source, TPixel color, Action path, GraphicsOptions options)
+ where TPixel : struct, IPixel
+ {
+ return source.Fill(new SolidBrush(color), path, options);
+ }
+
+ ///
+ /// Flood fills the image in the shape of the provided polygon with the specified brush..
+ ///
+ /// The type of the color.
+ /// The image this method extends.
+ /// The color.
+ /// The path.
+ /// The .
+ public static Image Fill(this Image source, TPixel color, Action