Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'UVtools.Core/Extensions/EmguExtensions.cs')
-rw-r--r--UVtools.Core/Extensions/EmguExtensions.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/UVtools.Core/Extensions/EmguExtensions.cs b/UVtools.Core/Extensions/EmguExtensions.cs
index 6dd3694..fcc4e50 100644
--- a/UVtools.Core/Extensions/EmguExtensions.cs
+++ b/UVtools.Core/Extensions/EmguExtensions.cs
@@ -490,17 +490,17 @@ public static class EmguExtensions
#region Create methods
- public static Mat CreateMask(this Mat src, VectorOfVectorOfPoint contours)
+ public static Mat CreateMask(this Mat src, VectorOfVectorOfPoint contours, Point offset = default)
{
var mask = src.NewBlank();
- CvInvoke.DrawContours(mask, contours, -1, WhiteColor, -1);
+ CvInvoke.DrawContours(mask, contours, -1, WhiteColor, -1, LineType.EightConnected, null, int.MaxValue, offset);
return mask;
}
- public static Mat CreateMask(this Mat src, Point[][] contours)
+ public static Mat CreateMask(this Mat src, Point[][] contours, Point offset = default)
{
using var vec = new VectorOfVectorOfPoint(contours);
- return src.CreateMask(vec);
+ return src.CreateMask(vec, offset);
}
public static Mat CropByBounds(this Mat src, bool cloneInsteadRoi = false)